refactor(chat): drop Superset MCP tools from v1 chat runtime

Merged
SA
4mo ago
+1-51

Part of the MCP v2 rework (Phase 0d) — this starts the v1 MCP sunset clock: v1 chat was the last internal consumer of the deprecated /api/agent/mcp endpoint.

  • Deletes getSupersetMcpTools (Mastra MCP client pointed at v1) and its only call site in the chat runtime. This matches v2 chat, which deliberately dropped Superset MCP tools (plans/v1-to-v2-fast-migration.md).
  • Fixes .superset/lib/setup/steps.sh to write the v2 MCP URL into locally provisioned .mcp.json files — it was still writing the v1 path while every checked-in agent config (opencode.json, .codex/config.toml, .mastracode/mcp.json) already uses v2.

Remaining v1 removal (server package + route) lands separately after the deprecation window + traffic check.

https://claude.ai/code/session_01Kub4p3Eim9pc1qaRRmGea2


Open in Stage

Summary by cubic

Drops Superset MCP tool integration from the v1 chat runtime and updates local setup to use the v2 MCP endpoint, removing the last dependency on the deprecated /api/agent/mcp. Aligns v1 chat with v2 and starts the v1 MCP sunset.

  • Refactors

    • Remove getSupersetMcpTools and its only call site in packages/chat/src/server/trpc/service.ts.
    • Delete packages/chat/src/server/trpc/utils/runtime/superset-mcp.ts.
  • Bug Fixes

    • Update .superset/lib/setup/steps.sh to write http://localhost:<port>/api/v2/agent/mcp into local .mcp.json.

Summary by CodeRabbit

  • Bug Fixes
    • Updated local MCP server connectivity to use the current API v2 endpoint.
    • Improved chat runtime setup by removing an outdated MCP tool-loading path, helping ensure more reliable session initialization.
    • Preserved existing runtime lifecycle and chat routing behavior while simplifying tool availability handling.