
Remote MCP Server (recommended)
Dub’s MCP server is hosted at:- Claude
- ChatGPT
- Codex
- Cursor
- Copilot
- OpenCode
- Warp
Use an API key instead of OAuth
If your client runs somewhere a browser login isn’t possible (a server, CI, or a headless agent), pass a Dub API key in theMcp-Dub-Token header instead of using OAuth.
- Claude Code
- JSON config
Managing connections
Each MCP client that a member connects to your workspace using OAuth gets its own connection. You can review and revoke these connections from the Dub MCP integration page in your workspace integration settings.
- Member – the workspace member who authorized the connection, and the date they connected
- Client – the MCP client that was connected (e.g. Claude, Cursor, ChatGPT). Clients that Dub doesn’t recognize appear as Unknown client
- Access – the permissions granted to the client, either Read & write or Read only. Hover over the label to see the exact scopes the client was granted
- Last used – when the client last made a request to your workspace, or Never used if it hasn’t made one yet
- Owners can revoke any connection in the workspace
- Members can only revoke their own connections
Mcp-Dub-Token header, revoke its access by deleting the API
key instead.Local MCP Server
Use the local server only if your MCP client can’t connect to a remote HTTP endpoint. Most current clients can, so try the remote server first. The local server runsmcp-remote through npx. It starts a process on your machine that forwards your client’s requests to Dub’s hosted server. You’ll need Node.js installed and a Dub API key.
Choose your client below. Replace dub_xxxxxx with your API key.
Mcp-Dub-Token:${MCP_DUB_TOKEN}, with no space
after the colon. mcp-remote fills in the key from the MCP_DUB_TOKEN
environment variable, and some clients (Cursor, Codex, and Claude Desktop on
Windows) break arguments that contain spaces.- Claude Code
- Codex
- Cursor
- Claude Desktop
- Copilot
- Gemini CLI
- OpenCode
- Warp
MCP Server tools
The Dub MCP server gives your AI agent native access to the full Dub platform through a single integration. You can manage your partner program, review applications, update commissions, and track attribution using natural language. The Access column shows what each tool does to your data: read only looks it up, write creates or changes it, and destructive deletes it. Your AI client may ask you to confirm before it runs a write or destructive tool.Partners
Partners
Partner links
Partner links
Program applications
Program applications
Analytics and events
Analytics and events
Customers
Customers
Tracking
Tracking
Commissions
Commissions
Bounties
Bounties
Discount codes
Discount codes
Payouts
Payouts
Messages
Messages
Example prompts
Try these prompts once the Dub MCP server is connected.Partners
Add jane@example.com to my program as a partner.
Show me the clicks, leads, and sales for jane@example.com in the last 30 days.
Who are my top 5 partners by total sales?
Ban the partner with the email spam@example.com for fraud.
Show me my pending program applications and approve the one from alex@example.com.
Links
Create a link for jane@example.com that points to https://example.com/pricing.
Create a link to https://example.com/black-friday for each of my top 10 partners.
Which of jane@example.com's links drove the most sales this quarter?
Commissions
Mark the commissions for invoice inv_123 as refunded.
Mark all pending commissions for bob@example.com as fraud.