feat(mcp): remote instance (device) read tools#7726
Open
andypalmi wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/mcp-tools-shared-schemas #7726 +/- ##
=================================================================
+ Coverage 75.41% 75.54% +0.12%
=================================================================
Files 426 426
Lines 22551 22572 +21
Branches 5949 5949
=================================================================
+ Hits 17006 17051 +45
+ Misses 5545 5521 -24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9ccc25a to
6a6f4cb
Compare
8bfb22e to
9742987
Compare
6a6f4cb to
9d267f6
Compare
Add read-only MCP tools for team databases and tables, npm packages, git tokens and shared library entries, with unit and equivalence tests. Also let the shared library route accept the expert-mcp platform token. Allow-list their scopes for the expert-mcp platform token.
9d267f6 to
737394c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 read-only MCP tools for the remote instance (device) resource, added to
forge/ee/lib/mcp/tools/devices.js:platform_get_remote_instance_audit_log-GET /devices/:deviceId/audit-logplatform_export_remote_instance_audit_log-GET /devices/:deviceId/audit-log/exportplatform_get_remote_instance_history-GET /devices/:deviceId/historyplatform_list_remote_instance_http_tokens-GET /devices/:deviceId/httpTokensplatform_list_team_provisioning_tokens-GET /teams/:teamId/devices/provisioningEach tool describes the device resource, so all are filed with the existing device tools, following the one-file-per-resource convention. All tools are annotated
readOnlyHint: true, destructiveHint: false.Device history is plan-gated on feature key
projectHistory(defaults to enabled); when disabled the route returns a 404 regardless of the caller's permissions, so the tool surfaces a clear "feature not enabled for this team" message instead of a bare not-found.platform_list_team_provisioning_tokensreturns the summary view, which omits the token secret.Scopes allow-listed in
IMPLICIT_TOKEN_SCOPES['user:expert-mcp'](forge/routes/auth/permissions.js):device:audit-logproject:historyteam:device:provisioning-token:list(
device:editwas already present from the shipped device tools.)Write, delete, and credential-issuing endpoints for this resource are out of scope for this PR.
Closes #7708
Test plan
eslinton changed files passes with no errors