Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@slack/web-api": "7.15.0",
"@superset/auth": "workspace:*",
"@superset/db": "workspace:*",
"@superset/mcp": "workspace:*",
"@superset/mcp-v2": "workspace:*",
"@superset/shared": "workspace:*",
"@superset/trpc": "workspace:*",
Expand Down
274 changes: 0 additions & 274 deletions apps/api/src/app/api/agent/[transport]/auth-flow.ts

This file was deleted.

30 changes: 12 additions & 18 deletions apps/api/src/app/api/agent/[transport]/route.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import { WebStandardStreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/webStandardStreamableHttp.js";
import { auth } from "@superset/auth/server";
import { createMcpServer } from "@superset/mcp";
import { verifyAccessToken } from "better-auth/oauth2";
import { env } from "@/env";
import { handleMcpRequest, type McpRequestDeps } from "./auth-flow";

const deps: McpRequestDeps = {
apiUrl: env.NEXT_PUBLIC_API_URL,
authApi: auth.api,
createServer: createMcpServer,
createTransport: () => new WebStandardStreamableHTTPServerTransport(),
verifyAccessToken,
};

async function handleRequest(req: Request): Promise<Response> {
return handleMcpRequest(req, deps);
function gone(): Response {
return Response.json(
{
error: {
code: "GONE",
message: "The v1 MCP server has been removed.",
hint: `Connect to ${env.NEXT_PUBLIC_API_URL}/api/v2/agent/mcp instead.`,
},
},
{ status: 410 },
);
}

export const maxDuration = 800;

export { handleRequest as GET, handleRequest as POST, handleRequest as DELETE };
export { gone as GET, gone as POST, gone as DELETE };
2 changes: 1 addition & 1 deletion apps/api/src/app/openapi.json/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const SPEC = {
"",
`Authentication is OAuth 2.1 authorization code + PKCE with RFC 7591 dynamic client registration, or a user-issued Superset API key sent as a Bearer token. Agent walkthrough: ${MARKETING_URL}/auth.md`,
"",
`Versioning and deprecation: the current surface is v2, versioned in the URL path (/api/v2/...). Deprecated surfaces stay available during a migration window — the v1 MCP server at /api/agent/mcp remains served for existing integrations — and deprecations are announced in the changelog (${MARKETING_URL}/changelog).`,
`Versioning and deprecation: the current surface is v2, versioned in the URL path (/api/v2/...). Deprecations are announced in the changelog (${MARKETING_URL}/changelog). The legacy v1 MCP server at /api/agent/mcp has been removed and returns 410 Gone.`,
].join("\n"),
contact: {
name: "Superset support",
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/mcp-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Connect AI agents directly to Superset via MCP
---

<Callout type="info">
This document covers **MCP v2**. The v1 server is deprecated but still available at `https://api.superset.sh/api/agent/mcp` for existing integrations.
This document covers **MCP v2**. The legacy v1 server (`/api/agent/mcp`) has been removed — v1 URLs return `410 Gone`. Point your client at the v2 URL below.
</Callout>

## Overview
Expand Down
20 changes: 0 additions & 20 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/auth/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ export const auth = betterAuth({
validAudiences: [
env.NEXT_PUBLIC_API_URL,
`${env.NEXT_PUBLIC_API_URL}/`,
`${env.NEXT_PUBLIC_API_URL}/api/agent/mcp`,
`${env.NEXT_PUBLIC_API_URL}/api/v2/agent/mcp`,
`${env.NEXT_PUBLIC_API_URL}/mcp`,
],
Expand Down
Loading
Loading