$npx -y skills add rudderlabs/rudder-agent-skills --skill rudder-mcp-workflowConnects AI agents to RudderStack via MCP tool calls for catalog, sources, destinations, transformations, and live events. Use when connecting an AI agent to RudderStack's MCP server, driving RudderStack via MCP, or mentions of mcp.rudderstack.com.
| 1 | # RudderStack MCP Workflow |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## When to use |
| 6 | |
| 7 | 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. |
| 8 | |
| 9 | ## Preflight |
| 10 | |
| 11 | Before running any workflow, verify: |
| 12 | |
| 13 | - [ ] Your MCP client is configured to connect to `https://mcp.rudderstack.com/mcp`. See `rudder-mcp-setup` for the Claude Code walkthrough; the official docs cover Claude Desktop, Cursor, VS Code, Windsurf, and the claude.ai web UI. |
| 14 | - [ ] OAuth flow completed (browser sign-in to your RudderStack account on first tool use). |
| 15 | - [ ] `mcp.rudderstack.com` is reachable on port 443 from your network. |
| 16 | |
| 17 | ## Client configuration |
| 18 | |
| 19 | Claude Code `mcpServers` block (HTTP transport via `mcp-remote`): |
| 20 | |
| 21 | ```json |
| 22 | { |
| 23 | "mcpServers": { |
| 24 | "rudderstack": { |
| 25 | "command": "npx", |
| 26 | "args": ["-y", "mcp-remote", "https://mcp.rudderstack.com/mcp"] |
| 27 | } |
| 28 | } |
| 29 | } |
| 30 | ``` |
| 31 | |
| 32 | For other clients (Claude Desktop, Cursor, VS Code, Windsurf, claude.ai connectors), use the snippets at https://mcp.rudderstack.com/docs. |
| 33 | |
| 34 | ## Tool catalog |
| 35 | |
| 36 | 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. |
| 37 | |
| 38 | ### Data sources |
| 39 | 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?". |
| 40 | |
| 41 | ### Destinations |
| 42 | 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". |
| 43 | |
| 44 | ### Transformations |
| 45 | 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". |
| 46 | |
| 47 | ### Events |
| 48 | 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?". |
| 49 | |
| 50 | ### Documentation |
| 51 | Search RudderStack documentation from inside your client. Useful for: "how does RETL handle late-arriving rows?", "what destination types support transformations?". |
| 52 | |
| 53 | ## Common workflows |
| 54 | |
| 55 | Patterns to ask Claude — phrased as a user would say them: |
| 56 | |
| 57 | - **"What's broken in my sources?"** — list sources, then for each one check event metrics and tracking-plan violations. |
| 58 | - **"Draft a transformation and test it."** — find similar existing transformations, draft a new one, run it against captured payloads, then save. |
| 59 | - **"Live-debug this connection."** — inspect live events for the source and correlate with recent destination errors. |
| 60 | |
| 61 | ## Instrumentation Verification Workflow |
| 62 | |
| 63 | After instrumenting events (via CLI, Terraform, or code), verify they reach destinations: |
| 64 | |
| 65 | ``` |
| 66 | 1. APPLY TRACKING PLAN |
| 67 | └── e.g. rudder-cli apply -l ./ |
| 68 | |
| 69 | 2. TRIGGER EVENTS |
| 70 | └── Run your app, trigger the instrumented events |
| 71 | |
| 72 | 3. VERIFY LIVE EVENTS |
| 73 | └── Ask Claude: "show recent live events from source <id>" |
| 74 | └── Confirm event name, properties, context match the tracking plan |
| 75 | |
| 76 | 4. VERIFY DESTINATION |
| 77 | └── For warehouse destinations: query the warehouse |
| 78 | (Snowflake, BigQuery, Redshift, etc.) for the event |
| 79 | └── For SaaS destinations: check the destination UI |
| 80 | |
| 81 | 5. CHECK FOR VIOLATIONS |
| 82 | └── Ask Claude: "any tracking-plan violations on source <id>?" |
| 83 | └── Review violations to identify schema mismatches |
| 84 | ``` |
| 85 | |
| 86 | ### Example: Verifying an "Audience Created" event |
| 87 | |
| 88 | ``` |
| 89 | 1. Apply tracking plan with "Audience Created" event |
| 90 | 2. Create an audience in the web app |
| 91 | 3. Ask Claude: "any Audience Created events on source <id> in the last hour?" |
| 92 | 4. Verify properties: audience_id, audience_name, condition_count |
| 93 | 5. Confirm the event landed in your warehouse destination |
| 94 | ``` |
| 95 | |
| 96 | ## Dev vs Prod Workspace Pattern |
| 97 | |
| 98 | Recommended for safe iteration: |
| 99 | |
| 100 | | Workspace | Purpose | Governance | |
| 101 | |-----------|---------|------------| |
| 102 | | Dev | Testing, iteration | `unplannedEvents: log` | |
| 103 | | Prod | Production traffic | `unplannedEvents: block` | |
| 104 | |
| 105 | Workflow: |
| 106 | |
| 107 | ``` |
| 108 | 1. Point your MCP client at the D |