$npx -y skills add rudderlabs/rudder-agent-skills --skill rudder-mcp-setupConfigures Claude Code to connect to RudderStack's MCP server at mcp.rudderstack.com. Use when setting up MCP for rudderstack, connecting claude to rudderstack, or configuring the rudderstack MCP server
| 1 | # RudderStack MCP Setup |
| 2 | |
| 3 | Configure Claude Code to connect to RudderStack's hosted MCP server at `mcp.rudderstack.com`. Authoritative reference: https://mcp.rudderstack.com/docs. |
| 4 | |
| 5 | ## Setup Workflow |
| 6 | |
| 7 | ``` |
| 8 | 1. Check Prerequisites ──► which npx |
| 9 | │ |
| 10 | ├── Found ──► Configure Claude Code |
| 11 | │ |
| 12 | └── Not Found ──► Install Node.js first |
| 13 | |
| 14 | 2. Configure Claude Code |
| 15 | │ |
| 16 | ├── Option A: /mcp command (recommended) |
| 17 | │ |
| 18 | └── Option B: Edit settings.json directly |
| 19 | |
| 20 | 3. Authenticate (OAuth) ──► Browser opens, sign in to RudderStack |
| 21 | |
| 22 | 4. Verify Connection ──► Restart Claude, list workspace resources |
| 23 | ``` |
| 24 | |
| 25 | ## Step 1: Check Prerequisites |
| 26 | |
| 27 | ```bash |
| 28 | which npx |
| 29 | ``` |
| 30 | |
| 31 | **If found:** Continue to Step 2. |
| 32 | |
| 33 | **If not found:** Install Node.js first from https://nodejs.org/ (includes npx). |
| 34 | |
| 35 | ## Step 2: Configure Claude Code |
| 36 | |
| 37 | ### Option A: Using /mcp Command (Recommended) |
| 38 | |
| 39 | ``` |
| 40 | /mcp add rudderstack |
| 41 | ``` |
| 42 | |
| 43 | Follow the prompts: |
| 44 | 1. Server name: `rudderstack` |
| 45 | 2. Transport type: `http` (via mcp-remote) |
| 46 | 3. URL: `https://mcp.rudderstack.com/mcp` |
| 47 | |
| 48 | ### Option B: Manual Configuration |
| 49 | |
| 50 | Edit your Claude Code settings file. |
| 51 | |
| 52 | #### Settings File Locations |
| 53 | |
| 54 | | Platform | Path | |
| 55 | |----------|------| |
| 56 | | macOS / Linux | `~/.claude/settings.json` | |
| 57 | | Windows | `%APPDATA%\claude\settings.json` | |
| 58 | |
| 59 | #### Add MCP Server Configuration |
| 60 | |
| 61 | Add under `mcpServers`: |
| 62 | |
| 63 | ```json |
| 64 | { |
| 65 | "mcpServers": { |
| 66 | "rudderstack": { |
| 67 | "command": "npx", |
| 68 | "args": ["-y", "mcp-remote", "https://mcp.rudderstack.com/mcp"] |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | ``` |
| 73 | |
| 74 | ## Step 3: Authenticate (OAuth) |
| 75 | |
| 76 | The first time you invoke an MCP tool, `mcp-remote` opens your browser: |
| 77 | |
| 78 | 1. Sign in with your RudderStack account (email/password) |
| 79 | 2. Review and approve the MCP integration's requested permissions |
| 80 | 3. The browser redirects back; the session is established |
| 81 | |
| 82 | No long-lived tokens to manage — OAuth handles the handshake per session. |
| 83 | |
| 84 | ## Step 4: Verify Connection |
| 85 | |
| 86 | ### Restart Claude Code |
| 87 | |
| 88 | After configuration, restart Claude Code: |
| 89 | - Close and reopen the terminal session, or |
| 90 | - Restart the Claude Code application |
| 91 | |
| 92 | ### Test the Connection |
| 93 | |
| 94 | Ask Claude to inspect your workspace: |
| 95 | |
| 96 | ``` |
| 97 | List my RudderStack sources |
| 98 | ``` |
| 99 | |
| 100 | **If connected:** Claude lists the sources in your workspace. |
| 101 | |
| 102 | **If not connected:** Claude reports the MCP server is unavailable — see Troubleshooting below. |
| 103 | |
| 104 | ### What Becomes Available |
| 105 | |
| 106 | When connected, your MCP client discovers tools covering five categories (per https://mcp.rudderstack.com/docs): |
| 107 | |
| 108 | - **Data sources** — list and inspect configured sources |
| 109 | - **Destinations** — list and inspect destinations and their metrics |
| 110 | - **Transformations** — list, view, create, and test transformations |
| 111 | - **Events** — stream and inspect live events |
| 112 | - **Documentation** — search RudderStack docs from inside Claude |
| 113 | |
| 114 | See `/rudder-mcp-workflow` for workflow patterns that combine these. |
| 115 | |
| 116 | ## Other MCP Clients |
| 117 | |
| 118 | The same hosted server works with Claude Desktop, Cursor, VS Code, Windsurf, and the claude.ai web UI (Team / Enterprise / Individual Paid plans get a one-click connector under `claude.ai/settings/connectors`). For per-client config snippets, see https://mcp.rudderstack.com/docs. |
| 119 | |
| 120 | ## Credential Security |
| 121 | |
| 122 | - OAuth is the only auth path; there are no long-lived tokens to store, rotate, or accidentally commit. |
| 123 | - `mcp-remote` caches session tokens locally — don't share or commit your shell config or the mcp-remote cache directory. |
| 124 | - To revoke access, re-authenticate from your client or revoke from your RudderStack account settings. |
| 125 | - The MCP server does not persist client credentials — auth is verified per session. |
| 126 | |
| 127 | ## Troubleshooting |
| 128 | |
| 129 | | Issue | Solution | |
| 130 | |-------|----------| |
| 131 | | `npx: command not found` | Install Node.js from https://nodejs.org/ | |
| 132 | | MCP server not responding | Verify `https://mcp.rudderstack.com` is reachable; check network/proxy | |
| 133 | | Authentication failed | Clear browser cookies for the RudderStack domain and retry; verify your account is active | |
| 134 | | Tools not appearing | Restart Claude Code; check `settings.json` syntax with `python3 -m json.tool ~/.claude/settings.json` | |
| 135 | | `mcp-remote` errors | Run `npx -y mcp-remote --help` to verify it loads; check the [mcp-remote npm page](https://www.npmjs.com/package/mcp-remote) for the latest version | |
| 136 | | Stale session | Delete the mcp-remote cache (`~/.mcp-auth/`) and re-authenticate | |
| 137 | |
| 138 | If the connection remains broken after these steps, contact your RudderStack administrator. |
| 139 | |
| 140 | ## Network Requirements |
| 141 | |
| 142 | Outbound HTTPS access to `mcp.rudderstack.com` (port 443). If behind a corporate proxy, ensure this domain is allowed. |
| 143 | |
| 144 | ## Handling External Content |
| 145 | |
| 146 | This skill instructs the agent to open a browser to RudderStack's OAuth endpoint and to install `mcp |