Skip to content

feat(mcp): public read-only demo endpoint at /mcp/demo (unblocks directory crawlers, no tenant exposure)#346

Merged
keysersoft merged 1 commit into
mainfrom
feat/public-demo-mcp-endpoint
Jun 19, 2026
Merged

feat(mcp): public read-only demo endpoint at /mcp/demo (unblocks directory crawlers, no tenant exposure)#346
keysersoft merged 1 commit into
mainfrom
feat/public-demo-mcp-endpoint

Conversation

@keysersoft

Copy link
Copy Markdown
Contributor

Why

Our MCP endpoints (/mcp, /mcp/:serverId) return 401 to anonymous callers — correct for a multi-tenant product, but it means directory crawlers (Glama, Smithery, mcp.so) and curious agents can't introspect a working MCP server. That blocks listings and the Glama quality score (which gates the awesome-mcp-servers PR, 89k★).

What

A public, anonymous, static demo MCP server at the exact path /mcp/demo:

  • Exposes only self-describing info tools — anythingmcp_overview, anythingmcp_get_started, anythingmcp_connect_client, anythingmcp_list_connectors — that return text about the product. It never resolves a serverId, queries the DB, or touches connectors/tenant data, so it has nothing to leak.
  • Declared before the :serverId routes so the static segment wins route matching.
  • The combined auth guard exempts only the exact path /mcp/demo; every /mcp/:serverId stays fail-closed. Tenant isolation is unchanged.
  • Rate-limited (60/min); makes zero outbound calls.

Multi-tenant safety

  • No change to the tenant membership/isolation logic. The only auth change is an exact-path early-return for /mcp/demo.
  • The handler is static: it cannot reach any tenant's data by construction.
  • Regression tests pin this:
    • guard exempts exact /mcp/demo (and trailing slash) but denies real server ids and look-alikes like /mcp/demo-evil;
    • controller demo handler never calls findById / getConnectorIds / isUserInOrganization.

Tests

tsc clean; guard + controller specs 16/16 pass.

Follow-up

Point directory listings (Smithery, mcp.so) and a Glama "connectors" entry at https://cloud.anythingmcp.com/mcp/demo so the hosted endpoint introspects cleanly.

…crawlers

Our per-tenant MCP endpoints return 401 to anonymous callers (by design), so
directory crawlers (Glama, Smithery, mcp.so) and curious agents can't introspect
a working server — which blocks listings and the Glama quality score.

Add a public, anonymous, STATIC demo MCP server at the exact path /mcp/demo:
- Exposes only self-describing info tools (overview, get-started, connect-client,
  list-connectors) that return text about AnythingMCP. It NEVER resolves a
  serverId, queries the database, or touches connectors/tenant data — so it has
  nothing to leak.
- Declared before the :serverId routes so the static segment wins matching.
- The combined auth guard exempts ONLY the exact path /mcp/demo; every
  /mcp/:serverId stays fail-closed. Tenant isolation is unchanged.
- Rate-limited (60/min) since it's public; makes zero outbound calls.

Tests: guard exempts exact /mcp/demo (incl. trailing slash) but denies real
server ids and look-alikes (/mcp/demo-evil); controller demo handler never calls
findById/getConnectorIds/isUserInOrganization. 16/16 pass.

Use this URL in directory listings and as a Glama "connectors" entry so the
hosted endpoint introspects cleanly without exposing the multi-tenant cloud.
@keysersoft keysersoft merged commit d3601e8 into main Jun 19, 2026
12 checks passed
@keysersoft keysersoft deleted the feat/public-demo-mcp-endpoint branch June 19, 2026 08:12
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant