Repository navigation
refactor(api): remove v1 MCP server - #6077
Conversation
Removes packages/mcp (18 tools), the /api/agent route and its parallel 274-line auth flow, the workspace dep, and the v1 OAuth audience. v1 URLs now return 410 Gone pointing at /api/v2/agent/mcp. Remaining v1 traffic is desktop builds predating the chat runtime change, which degrade gracefully (chat loses Superset tools, no crash); the 410 also ends the 800-second SSE timeout invocations v1 clients were causing. Claude-Session: https://claude.ai/code/session_01Kub4p3Eim9pc1qaRRmGea2
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Ready to review this PR? Stage has broken it down into 5 individual chapters for you:
Chapters generated by Stage for commit 3c570f6 on Jul 31, 2026 9:10pm UTC. |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Part of the MCP v2 rework (Phase E1). Stacked on #6076 — retargets to main when that merges.
Removes:
packages/mcp(the 18-tool v1 server)apps/api/src/app/api/agent/[transport]/route + its parallel 274-lineauth-flow.ts(incl. the v1-only session-cookie auth path)@superset/mcpworkspace depvalidAudiencesAdds a terse 410 Gone handler at
/api/agent/*with a hint pointing at/api/v2/agent/mcp.Known remaining v1 traffic (Vercel logs, 2026-07-31): MCP handshake triplets + SSE GETs matching desktop builds that predate #6031's chat change. Impact of the 410: chat tool-loading try/catches and returns empty — old desktops lose Superset tools in chat until they update, no crash. Side benefit: v1's hanging SSE GETs were each burning an 800s function invocation (visible as 504s); the 410 ends that.
Follow-up (separate ticket): with v1 gone, nothing writes
agentCommands— evaluate removing the table, its tRPC router, and the desktopuseCommandWatcherchain.Verify post-deploy:
curl -X POST https://api.superset.sh/api/agent/mcp→ 410 with hint; v2 endpoint unaffected; Slack agent smoke.https://claude.ai/code/session_01Kub4p3Eim9pc1qaRRmGea2
Summary by cubic
Removes the v1 MCP server and package, and returns 410 Gone for all
/api/agent/*requests with a hint to/api/v2/agent/mcp. This simplifies the API and stops long-running v1 SSE invocations; v2 remains unchanged.Refactors
packages/mcp(18 tools) and the@superset/mcpdependency./api/agent/[transport]route andauth-flow.ts; added a 410 Gone handler for GET/POST/DELETE.validAudiences.bun.lock.Migration
/api/v2/agent/mcp. v1 URLs now return 410 with a redirect hint./api/agent/mcp→ 410; v2 endpoint and Slack agent remain OK.Written for commit 3c570f6. Summary will update on new commits.