feat(mcp): Sim MCP server for the full Sim API - #7985
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
…cope; CORS on the MCP host
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
…off the OAuth token prefix
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
/api/mcp, orSIM_MCP_URLon a dedicated host such asmcp.sim.ai/mcp) that exposes the full public v2 API — the same 237 operations and names as the CLIsearch_operations,describe_operation,call_read_operation(GET, read-only annotated),call_write_operation(destructive annotated). Unknown names get closest-match suggestions; wrong tool gets pointed at the right onebun run generate:mcp-operations, enforced bycheck:mcp-operations), so auth, OAuth scope, rate limits, validation, use cases, and the error envelope are the route's own — MCP adds no authorization of its ownX-API-Keyor Bearer) or OAuth. OAuth tokens are RFC 8707 audience-bound to the MCP server; in-process v2 routes accept them via a server-only audience context, while the REST API still rejects themapi:read/api:write, and publicly registered clients must bind API grants to the Sim MCP resource (operator clients like the CLI unchanged)insufficient_scopewithresource_metadata, before the tool runsproxy.ts: on the MCP host only the endpoint + OAuth metadata are served; the app host stops serving/api/mcpso clients bind to one URLdescribe_operationreturns the OpenAPI description plus JSON Schema of params/query/body/headersmcpclient-info surface on dispatched requests; new MCP docs tab (overview, authentication, tools);SIM_MCP_URLdocumentedFollow-ups (not in this PR): DNS/ALB for
mcp.sim.ai+SIM_MCP_URLin hosted envs; Client ID Metadata Documents in the authorization server; MCP SDK v2 for the 2026-07-28 protocol revisionType of Change
Testing
bun run lint, type-check,check:audits(all audits),docs-manifest:checkpassChecklist