{{ message }}
fix(mcp): serve /api/v1/mcp/info publicly - #3211
Merged
Merged
Conversation
Allow anonymous cloud visitors to generate AI insights on the public demo host (host=0) via a carve-out in POST /api/v1/insights/generate, mirroring the agent guest path. Signed-in cloud users still get the demo hidden. Exempt GET /api/v1/mcp/info from the global API guard so the agents sidebar can render MCP tools for unsigned visitors. Show friendly model names in the agent model picker instead of raw model ids, backed by a new `name` field in the model registry. Co-Authored-By: duyetbot <bot@duyet.net>
Co-Authored-By: duyetbot <bot@duyet.net>
Production routes /api/v1/mcp/info to the standalone MCP worker, whose default authenticator 401s anonymous callers (CHM_API_KEY_SECRET set). The payload is static tools/resources metadata — no secrets, no ClickHouse access — matching the dashboard's own public info route and the `mcp` feature's `public` access. Pass a no-op authenticator for the info handler only; /api/mcp stays authenticated. Co-Authored-By: duyetbot <bot@duyet.net>
duyet
enabled auto-merge (squash)
August 21, 2026 05:20
Contributor
☁️ Cloudflare Preview Deployment
|
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
Follow-up to #3210: production routes
GET /api/v1/mcp/infoto the standalone MCP worker (chmonitor-mcp, via Workers Routes), whosedefaultAuthenticator401s anonymous callers wheneverCHM_API_KEY_SECRET/CLERK_SECRET_KEYis set — exactly the401 Unauthorizedseen on dash.chmonitor.dev.The info payload is static tools/resources metadata (names + descriptions only — no secrets, no ClickHouse access), matching:
/api/v1/mcp/inforoute (callsbuildServerInfo()with no auth gate), andmcpfeature'spublicaccess in/api/v1/config.Fix: pass a no-op
authenticatefor the info handler inapps/mcp/src/index.ts. The actual MCP protocol endpoint/api/mcp(whose tools can query ClickHouse) stays authenticated. Added a regression test for the no-op-authenticator case inpackages/mcp-server.Tests
packages/mcp-server/src/__tests__/http.test.ts— new "serves info publicly when a no-op authenticator is injected" test; all 25 pass.wrangler deploy --minify --dry-runsucceeds.