diff --git a/.mcp.json b/.mcp.json index 80268502752..53c636811dc 100644 --- a/.mcp.json +++ b/.mcp.json @@ -2,13 +2,7 @@ "mcpServers": { "superset": { "type": "http", - "url": "https://api.superset.sh/api/agent/mcp", - "oauth": { - "clientId": "claude-code", - "authorizationUrl": "https://api.superset.sh/api/auth/mcp/authorize", - "tokenUrl": "https://api.superset.sh/api/auth/mcp/token", - "scopes": ["openid", "profile", "email"] - } + "url": "https://api.superset.sh/api/agent/mcp" }, "expo-mcp": { "type": "http", diff --git a/apps/web/src/app/oauth/consent/components/ConsentForm/ConsentForm.tsx b/apps/web/src/app/oauth/consent/components/ConsentForm/ConsentForm.tsx index 3e0b8967a9c..62cecef7240 100644 --- a/apps/web/src/app/oauth/consent/components/ConsentForm/ConsentForm.tsx +++ b/apps/web/src/app/oauth/consent/components/ConsentForm/ConsentForm.tsx @@ -26,6 +26,7 @@ interface Organization { interface ConsentFormProps { consentCode: string; clientId: string; + clientName?: string; scopes: string[]; userName: string; organizations: Organization[]; @@ -57,6 +58,7 @@ const SCOPE_DESCRIPTIONS: Record< export function ConsentForm({ consentCode, clientId, + clientName, scopes, userName, organizations, @@ -134,16 +136,16 @@ export function ConsentForm({ } }; - const clientName = getClientDisplayName(clientId); + const displayName = clientName ?? getClientDisplayName(clientId); return (

- Authorize {clientName} + Authorize {displayName}

- {clientName} is + {displayName} is requesting access to your Superset account

diff --git a/apps/web/src/app/oauth/consent/page.tsx b/apps/web/src/app/oauth/consent/page.tsx index fa750fcac9e..78b2311aad2 100644 --- a/apps/web/src/app/oauth/consent/page.tsx +++ b/apps/web/src/app/oauth/consent/page.tsx @@ -1,4 +1,5 @@ import { auth } from "@superset/auth/server"; +import { db } from "@superset/db/client"; import { headers } from "next/headers"; import Image from "next/image"; import { redirect } from "next/navigation"; @@ -63,6 +64,11 @@ export default async function ConsentPage({ searchParams }: ConsentPageProps) { const trpc = await api(); const userOrganizations = await trpc.user.myOrganizations.query(); + const oauthApp = await db.query.oauthApplications.findFirst({ + where: (table, { eq }) => eq(table.clientId, client_id), + columns: { name: true }, + }); + const extendedSession = session.session as typeof session.session & { activeOrganizationId?: string | null; }; @@ -86,6 +92,7 @@ export default async function ConsentPage({ searchParams }: ConsentPageProps) { ({