Repository navigation
feat(studio): X03 serve the published agent as an MCP server - #1119
Merged
Merged
Conversation
Adds an McpServerManager that starts/stops the SDK's serveMcp per agent against the published version, guarded by the serve bearer token, with GET/POST /agents/:id/serve/mcp routes, lifecycle wiring in index.ts, and MCP rows on the Serve card (status, start/stop, URL + client snippets). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
5 tasks done
# Conflicts: # apps/agent-forge/server/index.ts
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
McpServerManager(server/serve/mcpServers.ts) starts/stops the SDK'sserveMcpper agent against the published version, reusing the X02a serve bearer token; publish-pointer changes restart a running server, token rotation propagates.GET/POST /agents/:id/serve/mcp(+ stop) with 409LOUSHO_NOT_PUBLISHED/ 503LOUSHO_MCP_PEER_MISSINGmappings; wired throughcreateAppoptions,index.tslifecycle (event subscription + shutdowncloseAll).mcpStatus/startMcp/stopMcpruntime methods,useMcpServeStatushook, and MCP rows on the Serve card (status, start/stop, URL + copyable client snippets) — unpublished agents show a disabled Start.Test plan
mcpServers.test.ts12 tests (lifecycle, auth token reuse, publish restart, rotate, peer-missing, realserveMcptools/list over HTTP — skips without the peer)serveRoutes.test.ts16 tests incl. MCP route integrationServeCard.test.tsx17 tests incl. MCP section statesStacked on #1118.
Generated with Devin