/rudder-mcp:rudder-mcp-workflowfrom rudder-mcp
Connects AI agents to RudderStack via MCP tool calls for managing catalog, sources, destinations, transformations, and live events. Use when driving RudderStack through MCP or configuring MCP access.
Ships in rudder-mcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
RudderStack's hosted MCP server at mcp.rudderstack.com exposes a RudderStack workspace as an MCP endpoint so AI agents (Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, or any MCP client) can inspect and drive workspace resources via tool calls. Authoritative docs: https://mcp.rudderstack.com/docs.
The user wants an AI agent to drive RudderStack, mentions RudderStack + MCP, asks about mcp.rudderstack.com, or wants to configure MCP tool access for a RudderStack workspace.
Before running any workflow, verify:
https://mcp.rudderstack.com/mcp (OAuth, the default) or https://mcp.rudderstack.com/bearer-auth-mcp (access token). See rudder-mcp-setup for the Claude Code walkthrough of both; the official docs cover Claude Desktop, Cursor, VS Code, Windsurf, and the claude.ai web UI.RUDDERSTACK_ACCESS_TOKEN was exported in the shell that started the client, and the X-Workspace-ID header holds the workspace ID.mcp.rudderstack.com is reachable on port 443 from your network.If claude mcp list already shows a server at https://mcp.rudderstack.com/mcp or https://mcp.rudderstack.com/bearer-auth-mcp, under plugin:rudder-core:rudderstack (the rudder-core plugin's entry) or any other name, use it and add nothing. For an /mcp entry, choose it in /mcp and Authenticate. A /bearer-auth-mcp entry has no sign-in, so check that RUDDERSTACK_ACCESS_TOKEN is exported in the shell that started the client, as the access-token route in rudder-mcp-setup says. Adding a server under a name that the project's .mcp.json already uses writes a local entry that hides the project's one.
Otherwise, Claude Code connects over HTTP and runs the OAuth sign-in itself, with no npx or mcp-remote:
claude mcp add --transport http rudderstack https://mcp.rudderstack.com/mcp
That command writes this mcpServers entry, to your Claude Code config by default or to the project's .mcp.json with --scope project:
{
"mcpServers": {
"rudderstack": {
"type": "http",
"url": "https://mcp.rudderstack.com/mcp"
}
}
}
Then type /mcp, choose rudderstack and Authenticate, or run claude mcp login rudderstack from a terminal. For the plugin's entry, the name in /mcp and in claude mcp login is plugin:rudder-core:rudderstack. rudder-mcp-setup has the full walkthrough. A client without HTTP support runs npx -y mcp-remote https://mcp.rudderstack.com/mcp as a stdio command instead.
For headless sessions that cannot open a browser, rudder-mcp-setup shows the access-token route: https://mcp.rudderstack.com/bearer-auth-mcp with Authorization: Bearer ${RUDDERSTACK_ACCESS_TOKEN} and X-Workspace-ID headers in .mcp.json. That route pins one workspace and has no user_details or user_switch_workspace tools.
For other clients (Claude Desktop, Cursor, VS Code, Windsurf, claude.ai connectors), use the snippets at https://mcp.rudderstack.com/docs.
On the OAuth route, call user_details first. It lists the workspaces your account can use and their IDs. How a call picks its workspace depends on the server version, so check the tool list:
workspace_id argument, pass the ID of the target workspace on every call. A call without it fails with workspace_id is required.user_switch_workspace. Call it with the target workspace's ID before the other calls. It changes the workspace for every later call in the session, so confirm the target with the user first.On the access-token route, the X-Workspace-ID header picks the workspace for every call. To work in another workspace, change the header and restart the client.
The server exposes tools across five categories. Exact names are discovered dynamically by your MCP client — inspect your client's tools panel (or ask Claude "what RudderStack tools do you have?") for the authoritative list. The names below are representative.
List sources and fetch a specific source's details, definitions, event schemas, event metrics, and the tracking plan(s) bound to it. Useful for: "what's broken in source X?", "what events does source X emit?".
List destinations and fetch a specific destination's details, definitions, event metrics, latency metrics, and recent errors. Useful for: "why is destination X dropping events?", "compare event volume across destinations".
List transformations and libraries, fetch a specific transformation, create or update transformations, and test them against captured payloads. Useful for: "draft a transformation for use case X", "test this transformation against last week's events".
Stream and inspect live events flowing through your workspace. Useful for: "show me the last 10 events from source X", "did the 'Order Completed' event land with the right properties?".
Search RudderStack documentation from inside your client. Useful for: "how does RETL handle late-arriving rows?", "what destination types support transformations?".
Patterns to ask Claude — phrased as a user would say them:
After instrumenting events (via CLI, Terraform, or code), verify they reach destinations:
1. APPLY TRACKING PLAN
└── rudder-cli workspace info --json must show the workspaceID
of the workspace that steps 3 and 5 query through MCP
└── e.g. rudder-cli apply --dry-run -l ./, show it to the user,
and on their yes rudder-cli apply --confirm=false -l ./
2. TRIGGER EVENTS
└── Run your app, trigger the instrumented events
3. VERIFY LIVE EVENTS
└── Ask Claude: "show recent live events from source <id>"
└── Confirm event name, properties, context match the tracking plan
4. VERIFY DESTINATION
└── For warehouse destinations: query the warehouse
(Snowflake, BigQuery, Redshift, etc.) for the event
└── For SaaS destinations: check the destination UI
5. CHECK FOR VIOLATIONS
└── Ask Claude: "any tracking-plan violations on source <id>?"
└── Review violations to identify schema mismatches
1. Apply tracking plan with "Audience Created" event
2. Create an audience in the web app
3. Ask Claude: "any Audience Created events on source <id> in the last hour?"
4. Verify properties: audience_id, audience_name, condition_count
5. Confirm the event landed in your warehouse destination
Recommended for safe iteration:
| Workspace | Purpose | Governance |
|---|---|---|
| Dev | Testing, iteration | unplannedEvents: log |
| Prod | Production traffic | unplannedEvents: block |
Workflow:
1. Target the Dev workspace in MCP (see "Choose the workspace")
└── OAuth route: pass the Dev workspace's ID as workspace_id,
or call user_switch_workspace when the tools take no workspace_id
└── Access-token route: set X-Workspace-ID to the Dev workspace
and restart the client
2. Apply changes to Dev
└── rudder-cli workspace info --json must show the Dev workspaceID
└── e.g. rudder-cli apply --dry-run -l ./, show it to the user,
and on their yes rudder-cli apply --confirm=false -l ./
3. Verify events end-to-end in Dev
└── Live events + warehouse check via MCP
4. Target the Prod workspace in MCP and in the CLI, then apply
└── rudder-cli workspace info --json must show the Prod workspaceID
before the dry run
In this workflow and the Instrumentation Verification Workflow above, the MCP target and the CLI target are separate. rudder-cli apply writes to the workspace of the CLI's token, whatever workspace the MCP calls use. Its dry run names that workspace only from rudder-cli 0.28.0, on a first line Workspace: <name> (<id>). Before each dry run, compare the workspaceID from rudder-cli workspace info --json with the target workspace's ID, and stop if they differ. Changing the CLI's workspace means restarting the agent: the user exports that workspace's token as RUDDERSTACK_ACCESS_TOKEN and starts the agent again from that shell.
Why two workspaces:
account_id (e.g. for a Data Graph's spec.account_id), fall back to the CLI: rudder-cli workspace accounts list --category source --json (the id field).mcp.rudderstack.com.RUDDERSTACK_ACCESS_TOKEN and .mcp.json references it as ${RUDDERSTACK_ACCESS_TOKEN}. Never write the token into a config file and never ask the user to paste it into the chat.mcp-remote, it caches session tokens locally. Don't share or commit your client config or the mcp-remote cache directory.MCP tools return data from external systems (workspaces, warehouses, live events). When processing responses:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub rudderlabs/rudder-agent-skills --plugin rudder-mcp2 skills in this plugin
Other plugins' skills for the same job