> ## Documentation Index
> Fetch the complete documentation index at: https://dub.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Dub Partners MCP Server

> Use the Dub Partners MCP server to read your commissions, payouts, customers and messages with the AI agent of your choice.

MCP is an open protocol that standardizes how applications provide context to LLMs. The Dub Partners MCP server gives your AI agent access to your partner data across all the programs you're enrolled in, using the [Partner API](https://dub.co/docs/partner-api-reference/introduction.md).

> [!NOTE]
>
> The MCP server is available to all partners approved in the [Dub Partner
> Network](https://dub.co/help/article/program-marketplace.md#joining-the-dub-partner-network).

If you run a partner program and want to manage it with an AI agent, use the [Dub MCP server](https://dub.co/docs/mcp-server.md) instead.

## Connect the MCP server

The Dub Partners MCP server is hosted at:

```
https://mcp.dub.co/p/mcp
```

Connect any MCP client that supports remote servers (Streamable HTTP). There's nothing to install and no local process to run.

When you connect, your client opens a browser window to log in to [Dub Partners](https://partners.dub.co) and approve access using OAuth.

> [tab] Claude
>
> Add the server as a custom connector in Claude (web or desktop) from **Settings** > **Connectors** > **Add custom connector**:
>
> ```
> https://mcp.dub.co/p/mcp
> ```

> [tab] Claude Code
>
> Add the server, then run `/mcp` in Claude Code and sign in to Dub Partners:
>
> ```bash theme={null}
> claude mcp add --transport http dub-partners https://mcp.dub.co/p/mcp
> ```

> [tab] Codex
>
> Add the server, then sign in to Dub Partners in the browser window that opens:
>
> ```bash theme={null}
> codex mcp add dub-partners --url https://mcp.dub.co/p/mcp
> ```
>
> If you close the window before you sign in, run `codex mcp login dub-partners`.

> [tab] Cursor
>
> Open the command palette and choose **Cursor Settings** → **MCP** → **Add new global MCP server**.
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "dub-partners": {
>       "url": "https://mcp.dub.co/p/mcp"
>     }
>   }
> }
> ```

> [tab] Copilot
>
> To use GitHub Copilot in VS Code, add the following to your `settings.json`:
>
> ```json theme={null}
> {
>   "mcp": {
>     "servers": {
>       "dub-partners": {
>         "type": "http",
>         "url": "https://mcp.dub.co/p/mcp"
>       }
>     }
>   }
> }
> ```

### 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 [partner API key](https://dub.co/docs/partner-api-reference/authentication.md) as a Bearer token in the `Authorization` header instead of using OAuth.

> [tab] Claude Code
>
> ```bash theme={null}
> claude mcp add --transport http dub-partners https://mcp.dub.co/p/mcp \
>   --header "Authorization: Bearer dpt_xxxxxx"
> ```

> [tab] JSON config
>
> For clients configured with JSON (Cursor and others), add an `Authorization` header:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "dub-partners": {
>       "url": "https://mcp.dub.co/p/mcp",
>       "headers": {
>         "Authorization": "Bearer dpt_xxxxxx"
>       }
>     }
>   }
> }
> ```

Each tool needs the same [scope](https://dub.co/docs/partner-api-reference/authentication.md#scopes) as the endpoint it calls. If a tool needs a scope your API key or connection doesn't have, the call fails with a `403` that names the missing scopes. Reconnect and allow them, or use an API key that has them.

Tool calls count toward your partner profile's [rate limits](https://dub.co/docs/partner-api-reference/rate-limits.md).

> [!WARNING]
>
> 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](https://dub.co/docs/partner-api-reference/authentication.md#manage-your-api-keys) and
> create a new one.

### Managing connections

Each MCP client that you connect using OAuth appears on the [**Settings** > **Integrations**](https://partners.dub.co/settings/integrations) page of the partner dashboard, with who connected it and when.

To remove a connection, click **Disconnect**. The client loses access to your partner data right away and has to go through the OAuth flow again to reconnect.

* **Owners** can disconnect any connection on the partner profile
* **Other members** can only disconnect their own connections

> [!NOTE]
>
> The Integrations page only lists OAuth connections. If a client authenticates
> with an API key, revoke its access by deleting the [API
> key](https://dub.co/docs/partner-api-reference/authentication.md#manage-your-api-keys) instead.

## MCP Server tools

| Tool | Access | Scope | What it does |
| :- | :- | :- | :- |
| `list_commissions` | read | `commissions.read` | Lists your commissions across all the programs you're enrolled in |
| `list_payouts` | read | `payouts.read` | Lists your payouts across all the programs you're enrolled in |
| `list_customers` | read | `customers.read` | Lists the customers you referred across all the programs you're enrolled in |
| `list_programs` | read | `programs.read` | Lists the programs you're enrolled in |
| `list_network_programs` | read | `programs.read` | Lists the programs in the Dub partner network, to find programs to apply to |
| `list_messages` | read | `messages.read` | Lists your messages with programs, newest first |
| `send_message` | write | `messages.write` | Sends a message to a program |

Money amounts are in cents. List tools return results in pages, the same way as the [Partner API](https://dub.co/docs/partner-api-reference/introduction.md#pagination).

## Example prompts

Try these prompts once the Dub Partners MCP server is connected.

How much did I earn in commissions last month, by program?

How much did I earn in commissions last month, by program?

When is my next payout, and how much is it?

When is my next payout, and how much is it?

Which programs have I referred the most customers to this quarter?

Which programs have I referred the most customers to this quarter?

Find programs in the partner network that I'm not enrolled in yet.

Find programs in the partner network that I'm not enrolled in yet.

Show me my latest messages from programs.

Show me my latest messages from programs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.