Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix: final improvements of mcp docs

Carl-Gerhard Lindesvärd3dbf9e21b0ba
diff --git a/README.md b/README.md
index efc5165eb..4a4c56bfb 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,9 @@ Openpanel is an open-source web and product analytics platform that combines the
- **💸 Transparent Pricing**: No hidden costs or usage limits
- **🛠️ Custom Dashboards**: Flexible chart creation and data visualization
- **📱 Multi-Platform**: Web, mobile (iOS/Android), and server-side tracking
+- **🤖 MCP Server**: Ask Claude, Cursor, or any MCP client about your users — 38 tools, hosted, no install
+- **💰 Revenue Tracking**: Monitor purchases, subscriptions, and LTV alongside product events
+- **🔌 Integrations**: Connect Google Search Console, and more to enrich your data
## 📊 Analytics Platform Comparison
diff --git a/apps/public/content/docs/index.mdx b/apps/public/content/docs/index.mdx
index 9b0ba1ae2..56af37e6d 100644
--- a/apps/public/content/docs/index.mdx
+++ b/apps/public/content/docs/index.mdx
@@ -18,6 +18,9 @@ import { UserIcon,HardDriveIcon } from 'lucide-react'
- **💸 Transparent Pricing**: No hidden costs
- **🛠️ Custom Dashboards**: Flexible chart creation and [data visualization](/features/data-visualization)
- **📱 Multi-Platform**: Web, mobile (iOS/Android), and server-side tracking
+- **🤖 MCP Server**: [Ask your AI about your users](/features/mcp) — connect Claude, Cursor, or any MCP client
+- **💰 Revenue Tracking**: [Monitor purchases and subscriptions](/features/revenue-tracking) alongside product events
+- **🔌 Integrations**: [Google Search Console](/features/integrations), and more
## 📊 Analytics Platform Comparison
diff --git a/apps/public/content/features/mcp.json b/apps/public/content/features/mcp.json
index e792310af..670ba41a4 100644
--- a/apps/public/content/features/mcp.json
+++ b/apps/public/content/features/mcp.json
@@ -13,8 +13,8 @@
]
},
"hero": {
- "heading": "Ask your AI about your users",
- "subheading": "Point Claude, Cursor, Windsurf, or any MCP client at api.openpanel.dev/mcp and your AI can query funnels, retention, user profiles, and events directly. No dashboard required.",
+ "heading": "MCP: Ask your AI about your users",
+ "subheading": "Let your AI deep dive into your OpenPanel data and understand what's going on. Skip dashboards and reports when you just want a quick answer.",
"badges": [
"38 tools",
"Works with Claude, Cursor & Windsurf",
@@ -58,7 +58,7 @@
],
"screenshots": [
{
- "src": "/features/feature-mcp-placeholder.webp",
+ "src": "/features/feature-mcp-claude.webp",
"alt": "Claude Desktop querying OpenPanel analytics via MCP",
"caption": "Ask about retention, funnels, or individual users directly from Claude Desktop."
}
@@ -158,4 +158,4 @@
"label": "Connect your AI to your analytics",
"href": "https://dashboard.openpanel.dev/onboarding"
}
-}
+}
\ No newline at end of file
diff --git a/apps/public/package.json b/apps/public/package.json
index 4105672a7..b40c360e0 100644
--- a/apps/public/package.json
+++ b/apps/public/package.json
@@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build": "next build",
- "dev": "next dev",
+ "dev": "next dev -p 9090",
"start": "next start",
"typecheck": "fumadocs-mdx && tsc --noEmit",
"postinstall": "fumadocs-mdx",
diff --git a/apps/public/public/features/feature-mcp-claude.webp b/apps/public/public/features/feature-mcp-claude.webp
new file mode 100644
index 000000000..5a51cfc43
Binary files /dev/null and b/apps/public/public/features/feature-mcp-claude.webp differ
diff --git a/apps/start/src/components/clients/create-client-success.tsx b/apps/start/src/components/clients/create-client-success.tsx
index 40ff32e95..09e0c7fe5 100644
--- a/apps/start/src/components/clients/create-client-success.tsx
+++ b/apps/start/src/components/clients/create-client-success.tsx
@@ -4,13 +4,16 @@ import { DownloadIcon, RocketIcon } from 'lucide-react';
import CopyInput from '../forms/copy-input';
-type Props = { id: string; secret: string };
+type Props = { id: string; secret: string; type?: 'read' | 'write' | 'root' };
-export function CreateClientSuccess({ id, secret }: Props) {
+export function CreateClientSuccess({ id, secret, type }: Props) {
const mcpToken = btoa(`${id}:${secret}`);
+ const showMcpToken = type === 'root' || type === 'read';
const download = () => {
- const credentials = `CLIENT_ID=${id}\nCLIENT_SECRET=${secret}\nMCP_TOKEN=${mcpToken}`;
+ const credentials = showMcpToken
+ ? `CLIENT_ID=${id}\nCLIENT_SECRET=${secret}\nMCP_TOKEN=${mcpToken}`
+ : `CLIENT_ID=${id}\nCLIENT_SECRET=${secret}`;
const blob = new Blob([credentials], { type: 'text/plain' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
@@ -20,18 +23,18 @@ export function CreateClientSuccess({ id, secret }: Props) {
};
return (
- <div className="grid gap-4">
+ <div className="grid min-w-0 gap-4 [&>*]:min-w-0">
<CopyInput label="Client ID" value={id} />
{secret && (
- <div className="w-full">
+ <div className="w-full min-w-0">
<CopyInput label="Secret" value={secret} />
<p className="mt-1 text-sm text-muted-foreground">
You will only need the secret if you want to send server events.
</p>
</div>
)}
- {secret && (
- <div className="w-full">
+ {secret && showMcpToken && (
+ <div className="w-full min-w-0">
<CopyInput label="MCP Token" value={mcpToken} />
<p className="mt-1 text-sm text-muted-foreground">
Use this token to authenticate with the MCP server (base64 encoded
diff --git a/apps/start/src/components/forms/copy-input.tsx b/apps/start/src/components/forms/copy-input.tsx
index f21413cf4..ba3e694b6 100644
--- a/apps/start/src/components/forms/copy-input.tsx
+++ b/apps/start/src/components/forms/copy-input.tsx
@@ -14,13 +14,13 @@ const CopyInput = ({ label, value, className }: Props) => {
return (
<button
type="button"
- className={cn('w-full text-left', className)}
+ className={cn('w-full min-w-0 text-left', className)}
onClick={() => clipboard(value)}
>
{!!label && <Label>{label}</Label>}
- <div className="font-mono flex items-center justify-between rounded bg-muted p-2 px-3 ">
- {value}
- <CopyIcon size={16} />
+ <div className="font-mono flex items-center justify-between gap-2 rounded bg-muted p-2 px-3">
+ <span className="min-w-0 flex-1 truncate">{value}</span>
+ <CopyIcon size={16} className="shrink-0" />
</div>
</button>
);
diff --git a/apps/start/src/components/ui/dialog.tsx b/apps/start/src/components/ui/dialog.tsx
index 55b1f5029..1b96fca1a 100644
--- a/apps/start/src/components/ui/dialog.tsx
+++ b/apps/start/src/components/ui/dialog.tsx
@@ -63,7 +63,7 @@ function DialogContent({
'mt-auto', // Add margin-top: auto for all screen sizes
'focus:outline-none focus:ring-0 transition-none',
'border bg-def-100 shadow-lg sm:rounded-lg md:max-h-[90vh]',
- 'bg-def-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',
+ 'bg-def-100 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg [&>*]:min-w-0',
className,
)}
{...props}
diff --git a/apps/start/src/components/ui/tabs.tsx b/apps/start/src/components/ui/tabs.tsx
index e8f51b7fd..2b42edb73 100644
--- a/apps/start/src/components/ui/tabs.tsx
+++ b/apps/start/src/components/ui/tabs.tsx
@@ -11,7 +11,7 @@ const TabsList = React.forwardRef<
<TabsPrimitive.List
ref={ref}
className={cn(
- 'inline-flex w-full h-auto items-center justify-start border-b border-border text-muted-foreground',
+ 'inline-flex w-full h-auto items-center justify-start overflow-x-auto border-b border-border text-muted-foreground hide-scrollbar',
className,
)}
{...props}
diff --git a/apps/start/src/routeTree.gen.ts b/apps/start/src/routeTree.gen.ts
index 3b22c2a14..c24e8b729 100644
--- a/apps/start/src/routeTree.gen.ts
+++ b/apps/start/src/routeTree.gen.ts
@@ -72,6 +72,7 @@ import { Route as AppOrganizationIdProjectIdNotificationsTabsIndexRouteImport }
import { Route as AppOrganizationIdProjectIdEventsTabsIndexRouteImport } from './routes/_app.$organizationId.$projectId.events._tabs.index'
import { Route as AppOrganizationIdProjectIdSettingsTabsWidgetsRouteImport } from './routes/_app.$organizationId.$projectId.settings._tabs.widgets'
import { Route as AppOrganizationIdProjectIdSettingsTabsTrackingRouteImport } from './routes/_app.$organizationId.$projectId.settings._tabs.tracking'
+import { Route as AppOrganizationIdProjectIdSettingsTabsMcpRouteImport } from './routes/_app.$organizationId.$projectId.settings._tabs.mcp'
import { Route as AppOrganizationIdProjectIdSettingsTabsImportsRouteImport } from './routes/_app.$organizationId.$projectId.settings._tabs.imports'
import { Route as AppOrganizationIdProjectIdSettingsTabsGscRouteImport } from './routes/_app.$organizationId.$projectId.settings._tabs.gsc'
import { Route as AppOrganizationIdProjectIdSettingsTabsEventsRouteImport } from './routes/_app.$organizationId.$projectId.settings._tabs.events'
@@ -510,6 +511,12 @@ const AppOrganizationIdProjectIdSettingsTabsTrackingRoute =
path: '/tracking',
getParentRoute: () => AppOrganizationIdProjectIdSettingsTabsRoute,
} as any)
+const AppOrganizationIdProjectIdSettingsTabsMcpRoute =
+ AppOrganizationIdProjectIdSettingsTabsMcpRouteImport.update({
+ id: '/mcp',
+ path: '/mcp',
+ getParentRoute: () => AppOrganizationIdProjectIdSettingsTabsRoute,
+ } as any)
const AppOrganizationIdProjectIdSettingsTabsImportsRoute =
AppOrganizationIdProjectIdSettingsTabsImportsRouteImport.update({
id: '/imports',
@@ -702,6 +709,7 @@ export interface FileRoutesByFullPath {
'/$organizationId/$projectId/settings/events': typeof AppOrganizationIdProjectIdSettingsTabsEventsRoute
'/$organizationId/$projectId/settings/gsc': typeof AppOrganizationIdProjectIdSettingsTabsGscRoute
'/$organizationId/$projectId/settings/imports': typeof AppOrganizationIdProjectIdSettingsTabsImportsRoute
+ '/$organizationId/$projectId/settings/mcp': typeof AppOrganizationIdProjectIdSettingsTabsMcpRoute
'/$organizationId/$projectId/settings/tracking': typeof AppOrganizationIdProjectIdSettingsTabsTrackingRoute
'/$organizationId/$projectId/settings/widgets': typeof AppOrganizationIdProjectIdSettingsTabsWidgetsRoute
'/$organizationId/$projectId/events/': typeof AppOrganizationIdProjectIdEventsTabsIndexRoute
@@ -777,6 +785,7 @@ export interface FileRoutesByTo {
'/$organizationId/$projectId/settings/events': typeof AppOrganizationIdProjectIdSettingsTabsEventsRoute
'/$organizationId/$projectId/settings/gsc': typeof AppOrganizationIdProjectIdSettingsTabsGscRoute
'/$organizationId/$projectId/settings/imports': typeof AppOrganizationIdProjectIdSettingsTabsImportsRoute
+ '/$organizationId/$projectId/settings/mcp': typeof AppOrganizationIdProjectIdSettingsTabsMcpRoute
'/$organizationId/$projectId/settings/tracking': typeof AppOrganizationIdProjectIdSettingsTabsTrackingRoute
'/$organizationId/$projectId/settings/widgets': typeof AppOrganizationIdProjectIdSettingsTabsWidgetsRoute
'/$organizationId/$projectId/groups/$groupId/events': typeof AppOrganizationIdProjectIdGroupsGroupIdTabsEventsRoute
@@ -865,6 +874,7 @@ export interface FileRoutesById {
'/_app/$organizationId/$projectId/settings/_tabs/events': typeof AppOrganizationIdProjectIdSettingsTabsEventsRoute
'/_app/$organizationId/$projectId/settings/_tabs/gsc': typeof AppOrganizationIdProjectIdSettingsTabsGscRoute
'/_app/$organizationId/$projectId/settings/_tabs/imports': typeof AppOrganizationIdProjectIdSettingsTabsImportsRoute
+ '/_app/$organizationId/$projectId/settings/_tabs/mcp': typeof AppOrganizationIdProjectIdSettingsTabsMcpRoute
'/_app/$organizationId/$projectId/settings/_tabs/tracking': typeof AppOrganizationIdProjectIdSettingsTabsTrackingRoute
'/_app/$organizationId/$projectId/settings/_tabs/widgets': typeof AppOrganizationIdProjectIdSettingsTabsWidgetsRoute
'/_app/$organizationId/$projectId/events/_tabs/': typeof AppOrganizationIdProjectIdEventsTabsIndexRoute
@@ -947,6 +957,7 @@ export interface FileRouteTypes {
| '/$organizationId/$projectId/settings/events'
| '/$organizationId/$projectId/settings/gsc'
| '/$organizationId/$projectId/settings/imports'
+ | '/$organizationId/$projectId/settings/mcp'
| '/$organizationId/$projectId/settings/tracking'
| '/$organizationId/$projectId/settings/widgets'
| '/$organizationId/$projectId/events/'
@@ -1022,6 +1033,7 @@ export interface FileRouteTypes {
| '/$organizationId/$projectId/settings/events'
| '/$organizationId/$projectId/settings/gsc'
| '/$organizationId/$projectId/settings/imports'
+ | '/$organizationId/$projectId/settings/mcp'
| '/$organizationId/$projectId/settings/tracking'
| '/$organizationId/$projectId/settings/widgets'
| '/$organizationId/$projectId/groups/$groupId/events'
@@ -1109,6 +1121,7 @@ export interface FileRouteTypes {
| '/_app/$organizationId/$projectId/settings/_tabs/events'
| '/_app/$organizationId/$projectId/settings/_tabs/gsc'
| '/_app/$organizationId/$projectId/settings/_tabs/imports'
+ | '/_app/$organizationId/$projectId/settings/_tabs/mcp'
| '/_app/$organizationId/$projectId/settings/_tabs/tracking'
| '/_app/$organizationId/$projectId/settings/_tabs/widgets'
| '/_app/$organizationId/$projectId/events/_tabs/'
@@ -1633,6 +1646,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof AppOrganizationIdProjectIdSettingsTabsTrackingRouteImport
parentRoute: typeof AppOrganizationIdProjectIdSettingsTabsRoute
}
+ '/_app/$organizationId/$projectId/settings/_tabs/mcp': {
+ id: '/_app/$organizationId/$projectId/settings/_tabs/mcp'
+ path: '/mcp'
+ fullPath: '/$organizationId/$projectId/settings/mcp'
+ preLoaderRoute: typeof AppOrganizationIdProjectIdSettingsTabsMcpRouteImport
+ parentRoute: typeof AppOrganizationIdProjectIdSettingsTabsRoute
+ }
'/_app/$organizationId/$projectId/settings/_tabs/imports': {
id: '/_app/$organizationId/$projectId/settings/_tabs/imports'
path: '/imports'
@@ -1942,6 +1962,7 @@ interface AppOrganizationIdProjectIdSettingsTabsRouteChildren {
AppOrganizationIdProjectIdSettingsTabsEventsRoute: typeof AppOrganizationIdProjectIdSettingsTabsEventsRoute
AppOrganizationIdProjectIdSettingsTabsGscRoute: typeof AppOrganizationIdProjectIdSettingsTabsGscRoute
AppOrganizationIdProjectIdSettingsTabsImportsRoute: typeof AppOrganizationIdProjectIdSettingsTabsImportsRoute
+ AppOrganizationIdProjectIdSettingsTabsMcpRoute: typeof AppOrganizationIdProjectIdSettingsTabsMcpRoute
AppOrganizationIdProjectIdSettingsTabsTrackingRoute: typeof AppOrganizationIdProjectIdSettingsTabsTrackingRoute
AppOrganizationIdProjectIdSettingsTabsWidgetsRoute: typeof AppOrganizationIdProjectIdSettingsTabsWidgetsRoute
AppOrganizationIdProjectIdSettingsTabsIndexRoute: typeof AppOrganizationIdProjectIdSettingsTabsIndexRoute
@@ -1959,6 +1980,8 @@ const AppOrganizationIdProjectIdSettingsTabsRouteChildren: AppOrganizationIdProj
AppOrganizationIdProjectIdSettingsTabsGscRoute,
AppOrganizationIdProjectIdSettingsTabsImportsRoute:
AppOrganizationIdProjectIdSettingsTabsImportsRoute,
+ AppOrganizationIdProjectIdSettingsTabsMcpRoute:
+ AppOrganizationIdProjectIdSettingsTabsMcpRoute,
AppOrganizationIdProjectIdSettingsTabsTrackingRoute:
AppOrganizationIdProjectIdSettingsTabsTrackingRoute,
AppOrganizationIdProjectIdSettingsTabsWidgetsRoute:
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.mcp.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.mcp.tsx
new file mode 100644
index 000000000..e0789e9cd
--- /dev/null
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.mcp.tsx
@@ -0,0 +1,258 @@
+import { createFileRoute } from '@tanstack/react-router';
+import { ExternalLinkIcon, PlusIcon } from 'lucide-react';
+import CopyInput from '@/components/forms/copy-input';
+import Syntax from '@/components/syntax';
+import {
+ Accordion,
+ AccordionContent,
+ AccordionItem,
+ AccordionTrigger,
+} from '@/components/ui/accordion';
+import { Button, buttonVariants } from '@/components/ui/button';
+import { useAppContext } from '@/hooks/use-app-context';
+import { pushModal } from '@/modals';
+import { cn } from '@/utils/cn';
+
+export const Route = createFileRoute(
+ '/_app/$organizationId/$projectId/settings/_tabs/mcp',
+)({
+ component: Component,
+});
+
+const TOKEN_PLACEHOLDER = 'BASE64_TOKEN';
+const DOCS_URL = 'https://openpanel.dev/docs/mcp';
+
+type AiClient = {
+ id: string;
+ name: string;
+ description: React.ReactNode;
+ configFile?: string;
+ language: 'json' | 'bash';
+ snippet: (mcpUrl: string) => string;
+};
+
+const buildClients = (mcpEndpoint: string): AiClient[] => {
+ const url = `${mcpEndpoint}?token=${TOKEN_PLACEHOLDER}`;
+
+ return [
+ {
+ id: 'claude-desktop',
+ name: 'Claude Desktop',
+ description: (
+ <>
+ Add the following block to <code>claude_desktop_config.json</code>.
+ You can open it from <strong>Settings → Developer → Edit Config</strong>.
+ </>
+ ),
+ configFile:
+ 'macOS: ~/Library/Application Support/Claude/claude_desktop_config.json',
+ language: 'json',
+ snippet: () =>
+ JSON.stringify(
+ {
+ mcpServers: {
+ openpanel: {
+ type: 'streamable-http',
+ url,
+ },
+ },
+ },
+ null,
+ 2,
+ ),
+ },
+ {
+ id: 'claude-code',
+ name: 'Claude Code (CLI)',
+ description: (
+ <>
+ Run this once in your terminal. The token can also be passed as a
+ header via <code>--header "Authorization: Bearer BASE64_TOKEN"</code>.
+ </>
+ ),
+ language: 'bash',
+ snippet: () => `claude mcp add --transport http openpanel "${url}"`,
+ },
+ {
+ id: 'cursor',
+ name: 'Cursor',
+ description: (
+ <>
+ Add the server to your global config at <code>~/.cursor/mcp.json</code>{' '}
+ or your project config at <code>.cursor/mcp.json</code>.
+ </>
+ ),
+ configFile: '~/.cursor/mcp.json',
+ language: 'json',
+ snippet: () =>
+ JSON.stringify(
+ {
+ mcpServers: {
+ openpanel: {
+ url,
+ transport: 'streamable-http',
+ },
+ },
+ },
+ null,
+ 2,
+ ),
+ },
+ {
+ id: 'windsurf',
+ name: 'Windsurf',
+ description: (
+ <>
+ Add the server to <code>~/.codeium/windsurf/mcp_config.json</code>.
+ Windsurf accepts both <code>serverUrl</code> and <code>url</code>.
+ </>
+ ),
+ configFile: '~/.codeium/windsurf/mcp_config.json',
+ language: 'json',
+ snippet: () =>
+ JSON.stringify(
+ {
+ mcpServers: {
+ openpanel: {
+ serverUrl: url,
+ },
+ },
+ },
+ null,
+ 2,
+ ),
+ },
+ {
+ id: 'vscode',
+ name: 'VS Code (Copilot)',
+ description: (
+ <>
+ Add the server to <code>.vscode/mcp.json</code> in your workspace, or
+ to your user-level MCP config.
+ </>
+ ),
+ configFile: '.vscode/mcp.json',
+ language: 'json',
+ snippet: () =>
+ JSON.stringify(
+ {
+ servers: {
+ openpanel: {
+ type: 'http',
+ url,
+ },
+ },
+ },
+ null,
+ 2,
+ ),
+ },
+ {
+ id: 'raycast',
+ name: 'Raycast',
+ description: (
+ <>
+ Copy the JSON below, then run the <strong>Install Server</strong>{' '}
+ command in Raycast — it auto-fills the form from your clipboard.
+ </>
+ ),
+ language: 'json',
+ snippet: () =>
+ JSON.stringify(
+ {
+ name: 'openpanel',
+ transport: 'streamable-http',
+ url,
+ },
+ null,
+ 2,
+ ),
+ },
+ ];
+};
+
+function Component() {
+ const { apiUrl } = useAppContext();
+ const mcpEndpoint = `${apiUrl}/mcp`;
+ const fullUrl = `${mcpEndpoint}?token=${TOKEN_PLACEHOLDER}`;
+ const clients = buildClients(mcpEndpoint);
+
+ return (
+ <div className="col gap-6">
+ <div className="col gap-2">
+ <h2 className="font-semibold text-lg">MCP Server</h2>
+ <p className="text-muted-foreground text-sm">
+ Connect any MCP-compatible AI client (Claude, Cursor, Windsurf, …) to
+ your OpenPanel data. The server is read-only and exposes 38 tools for
+ querying events, sessions, profiles, funnels, retention and more.
+ </p>
+ </div>
+
+ <div className="col gap-2">
+ <CopyInput label="Endpoint" value={fullUrl} />
+ <p className="text-muted-foreground text-xs">
+ Replace <code>{TOKEN_PLACEHOLDER}</code> with{' '}
+ <code>base64(clientId:clientSecret)</code>. You can also pass it as an{' '}
+ <code>Authorization: Bearer</code> header instead of a query param.
+ </p>
+ </div>
+
+ <div className="col gap-3 rounded-lg border bg-def-200 p-4">
+ <div className="col gap-1">
+ <div className="font-medium">Need a token?</div>
+ <p className="text-muted-foreground text-sm">
+ Only <code>read</code> and <code>root</code> clients can authenticate
+ with MCP. Create one and copy the MCP token from the success screen
+ — it's only shown once.
+ </p>
+ </div>
+ <div>
+ <Button icon={PlusIcon} onClick={() => pushModal('AddClient')}>
+ Create MCP client
+ </Button>
+ </div>
+ </div>
+
+ <div className="col gap-2">
+ <div className="font-medium">Configure your AI client</div>
+ <Accordion className="rounded-lg border" collapsible type="single">
+ {clients.map((client) => (
+ <AccordionItem
+ className="px-4"
+ key={client.id}
+ value={client.id}
+ >
+ <AccordionTrigger>{client.name}</AccordionTrigger>
+ <AccordionContent className="col gap-3">
+ <p className="text-muted-foreground text-sm">
+ {client.description}
+ </p>
+ {client.configFile && (
+ <p className="text-muted-foreground text-xs">
+ <span className="font-medium">Config file:</span>{' '}
+ <code>{client.configFile}</code>
+ </p>
+ )}
+ <Syntax
+ className="border"
+ code={client.snippet(mcpEndpoint)}
+ language={client.language}
+ />
+ </AccordionContent>
+ </AccordionItem>
+ ))}
+ </Accordion>
+ </div>
+
+ <a
+ className={cn(buttonVariants({ variant: 'outline' }), 'self-start')}
+ href={DOCS_URL}
+ rel="noreferrer"
+ target="_blank"
+ >
+ <ExternalLinkIcon className="h-4 w-4" />
+ Read the full MCP docs
+ </a>
+ </div>
+ );
+}
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.tsx
index b0037ed9c..b1341cdc0 100644
--- a/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.tsx
+++ b/apps/start/src/routes/_app.$organizationId.$projectId.settings._tabs.tsx
@@ -43,6 +43,7 @@ function ProjectDashboard() {
{ id: 'events', label: 'Events' },
{ id: 'clients', label: 'Clients' },
{ id: 'tracking', label: 'Tracking script' },
+ { id: 'mcp', label: 'MCP' },
{ id: 'widgets', label: 'Widgets' },
{ id: 'imports', label: 'Imports' },
{ id: 'gsc', label: 'Google Search' },