fix(rest): advertise routes.mcp in /discovery when MCP enabled (cloud#152)#1635
Merged
Conversation
…#152) objectui's Integrations page reads discovery.routes.mcp to show the connect card, but it was absent on live envs. Root cause (not a cache): @objectstack/rest serves its OWN /discovery (protocol.getDiscovery), separate from the dispatcher's getDiscoveryInfo where mcp was added — so the REST discovery never advertised it. REST discovery handler now adds routes.mcp (unscoped /api/v1/mcp — the route is mounted bare) when OS_MCP_SERVER_ENABLED=true, omits otherwise. 2 tests. rest 90 green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Fixes the root cause of objectstack-ai/cloud#152.
objectui's Integrations page reads
discovery.routes.mcpto show the 'Connect an AI agent' card, but it stayed absent on live envs even with MCP enabled. Root cause (NOT a cache, as #152 first suspected):@objectstack/restserves its OWN/discovery(protocol.getDiscovery()), separate from the dispatcher'sgetDiscoveryInfowhere themcpfield was added — so the REST-served discovery never advertised it.The REST discovery handler now adds
routes.mcp(unscoped/api/v1/mcp— the route is mounted bare) whenOS_MCP_SERVER_ENABLED=true, omits otherwise. 2 tests; rest suite 90 green.🤖 Generated with Claude Code