Skip to content

fix(rest): advertise routes.mcp in /discovery when MCP enabled (cloud#152)#1635

Merged
xuyushun441-sys merged 1 commit into
mainfrom
fix/rest-discovery-mcp
Jun 7, 2026
Merged

fix(rest): advertise routes.mcp in /discovery when MCP enabled (cloud#152)#1635
xuyushun441-sys merged 1 commit into
mainfrom
fix/rest-discovery-mcp

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

Fixes the root cause of objectstack-ai/cloud#152.

objectui's Integrations page reads discovery.routes.mcp to 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/rest serves its OWN /discovery (protocol.getDiscovery()), separate from the dispatcher's getDiscoveryInfo where the mcp field 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) when OS_MCP_SERVER_ENABLED=true, omits otherwise. 2 tests; rest suite 90 green.

🤖 Generated with Claude Code

…#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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 7, 2026 2:50am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/s and removed documentation Improvements or additions to documentation tests tooling labels Jun 7, 2026
@xuyushun441-sys xuyushun441-sys merged commit ae7fb3f into main Jun 7, 2026
10 of 11 checks passed
@xuyushun441-sys xuyushun441-sys deleted the fix/rest-discovery-mcp branch June 7, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants