feat(mcp): broker read tools#7723
Open
andypalmi wants to merge 1 commit 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 #7723 +/- ##
=================================================================
+ Coverage 75.41% 75.61% +0.20%
=================================================================
Files 426 427 +1
Lines 22551 22574 +23
Branches 5949 5949
=================================================================
+ Hits 17006 17069 +63
+ Misses 5545 5505 -40
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:
|
de587bd to
c72a379
Compare
8bfb22e to
9742987
Compare
c72a379 to
4b1fa96
Compare
Add read-only MCP tools for MQTT broker clients, brokers, topics and schema, with unit and equivalence tests. Allow-list their scopes for the expert-mcp platform token.
4b1fa96 to
cb1cf5c
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
Adds read-only MCP tools for the team broker (built-in MQTT broker) and 3rd-party broker surface in
forge/ee/lib/mcp/tools/broker.js:platform_list_broker_clients-GET /api/v1/teams/:teamId/broker/clientsplatform_get_broker_client-GET /api/v1/teams/:teamId/broker/client/:usernameplatform_list_brokers-GET /api/v1/teams/:teamId/brokersplatform_get_broker-GET /api/v1/teams/:teamId/brokers/:brokerIdplatform_list_broker_topics-GET /api/v1/teams/:teamId/brokers/:brokerId/topicsplatform_get_broker_schema-GET /api/v1/teams/:teamId/broker/:brokerId/schemaAll six tools carry
readOnlyHint: true/destructiveHint: falseand none of them return raw broker credentials.Allow-lists the backing scopes in
IMPLICIT_TOKEN_SCOPES['user:expert-mcp'](forge/routes/auth/permissions.js):broker:clients:listbroker:credentials:listbroker:topics:listThis scope is under special review (credential-sensitive category), so only these read tools are proposed here. The credential-issuing endpoints (broker client create/link, client password update, 3rd-party broker registration, raw credential fetch) and the non-credential write/delete surface (topic CRUD, lifecycle, delete client) are intentionally out of scope for this PR.
Closes #7711
Test plan
eslintclean onforge/ee/lib/mcp/tools/broker.jsandforge/routes/auth/permissions.jsforge/ee/routes/teamBroker/index.js,forge/ee/routes/teamBroker/3rdPartyBroker.js, andforge/ee/routes/teamBroker/schema.js