Skip to main content
MCP is an open protocol that standardizes how applications provide context to LLMs. Among other benefits, it provides LLMs tools to act on your behalf. Dub offers both a remote MCP server and a local MCP server.
MCP Server
Looking for the Dub Links MCP server? Check out the Dub Links MCP server docs.
Dub’s MCP server is hosted at:
Connect any MCP client that supports remote servers (Streamable HTTP). There’s nothing to install and no local process to run, which makes it the best option for web-based clients like Claude and hosted agent platforms. When you connect, your client opens a browser window to log in to Dub and approve access using OAuth.
You can install the Dub MCP server as a custom connector in Claude:
To install only the MCP server, add it manually in Claude (web or desktop) from Settings > Connectors > Add custom connector:

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 the Mcp-Dub-Token header instead of using OAuth.

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.
The Connections table on the Dub MCP integration page, listing each member's connected MCP client with its access level, last used time, and a Revoke button
The Connections table has one row per connection, showing:
  • 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
To remove a connection, click Revoke on its row. This signs that client out: it immediately loses access to your workspace and has to go through the OAuth flow again to reconnect. Other connections, including the same member’s other clients, are not affected. Who can revoke a connection depends on your workspace role:
  • Owners can revoke any connection in the workspace
  • Members can only revoke their own connections
The Connections table only lists OAuth connections. If a client authenticates with the 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 runs mcp-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.
Keep the header argument as 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.
Your API key is stored in plain text in your client’s config file. Don’t commit that file to a repository or share it. If a key leaks, delete it and create a new one.

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.

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.

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.