You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Use the Dub MCP server to manage your partner program with the AI agent of your choice."
3
+
description: "Use the Dub MCP server to manage your Dub resources with the AI agent of your choice."
4
4
sidebarTitle: "MCP Server"
5
5
---
6
6
7
-
## What is an MCP Server?
7
+
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](#remote-mcp-server-recommended) and a [local MCP server](#local-mcp-server).
8
8
9
-
MCP (Model Context Protocol) is an open standard for connecting AI applications to external tools and data. It gives your AI agent structured access to APIs so it can take actions on your behalf — like approving partner applications or updating commissions — using natural language.
10
-
11
-
## What can the Dub MCP server do?
12
-
13
-
The Dub [MCP server](https://mcp.dub.sh/mcp/dub-partners) 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.
14
-
15
-
-**Partners** — Create or update partners, list all partners, deactivate, or ban partners from your program
16
-
-**Partner links** — Create and upsert links for enrolled partners
17
-
-**Applications** — List, approve, and reject pending partner applications
18
-
-**Analytics** — Retrieve analytics and list events for any partner, [partner groups](/help/article/partner-groups), or their specific links
19
-
-**Customers** — List, retrieve, update, and delete customers
20
-
-**Tracking** — Track lead, sale, and deep link open events
21
-
-**Bounties** — List, approve, and reject bounty submissions
22
-
-**Commissions** — List and update commissions (e.g. for refunds or fraud)
23
-
-**Payouts** — List payouts for your partner program
24
-
25
-
As an example, you could use this to triage partner applications, adjust commissions after a refund, or pull attribution analytics for a top partner — all from your AI client.
Looking for the [Dub Links](https://dub.co/links) MCP server? Check out the
29
15
[Dub Links MCP server docs](https://mcp.dub.sh/mcp/dub-links).
30
16
</Tip>
31
17
32
-
## Prerequisites
18
+
## Remote MCP Server (recommended)
19
+
20
+
Dub's MCP server is hosted at:
33
21
34
-
The Dub MCP server is hosted remotely and connects to any [supported MCP client](#mcp-client-integrations) via [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) and `npx`. To use the MCP server, you'll need to:
22
+
```
23
+
https://mcp.dub.sh/mcp/dub-partners
24
+
```
35
25
36
-
-[Create a Dub API key](https://app.dub.co/settings/tokens) with access to your partner program
26
+
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.
37
27
38
-
## How to use the MCP Server
28
+
When you connect, your client opens a browser window to log in to Dub and approve access using OAuth.
29
+
30
+
<Tabs>
31
+
<Tabtitle="Claude">
32
+
You can install the Dub MCP server as a [custom connector in
To install only the MCP server, add it manually in Claude (web or desktop) from **Settings** > **Connectors** > **Add custom connector**:
46
+
47
+
```
48
+
https://mcp.dub.sh/mcp/dub-partners
49
+
```
39
50
40
-
Dub's MCP server runs over HTTP at `https://mcp.dub.sh/mcp/dub-partners`. Most clients connect through **`mcp-remote`**, which bridges stdio-based clients to the remote endpoint and forwards your API key in the `Mcp-Dub-Token` header.
51
+
</Tab>
52
+
53
+
<Tabtitle="ChatGPT">
54
+
You can install the Dub MCP server as a [ChatGPT
55
+
plugin](https://chatgpt.com/plugins):
56
+
57
+
<Tip>
58
+
Make sure to enable [Developer Mode](https://developers.openai.com/api/docs/guides/developer-mode) in ChatGPT first before installing the plugin.
Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actual Dub API key.
136
+
---
43
137
44
-
### MCP client integrations
138
+
_If your client runs somewhere a browser login isn't possible_ (a server, CI, or a headless agent), pass a [Dub API key](/docs/api-reference/authentication#api-keys) in the `Mcp-Dub-Token` header instead of using OAuth.
For clients configured with JSON (Cursor, Windsurf, and others), add a `Mcp-Dub-Token` header:
151
+
152
+
```json
153
+
{
154
+
"mcpServers": {
155
+
"dub": {
156
+
"url": "https://mcp.dub.sh/mcp/dub-partners",
157
+
"headers": {
158
+
"Mcp-Dub-Token": "dub_xxxxxx"
159
+
}
160
+
}
161
+
}
162
+
}
163
+
```
164
+
165
+
</Tab>
166
+
</Tabs>
167
+
168
+
## Local MCP Server
169
+
170
+
If your MCP client doesn't support connecting directly to a remote HTTP endpoint, use [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) to run a local process that proxies requests to Dub's hosted server. You can integrate it into any supported MCP client using `npx`. You'll need a [Dub API key](/docs/api-reference/authentication#api-keys).
171
+
172
+
Choose your client below to get started. Remember to replace `dub_xxxxxx` with your actual API key.
Open the command palette and choose **Cursor Settings** → **MCP** → **Add new global MCP server**.
67
194
68
195
```json
69
196
{
70
197
"mcpServers": {
71
-
"dub-partners": {
198
+
"dub": {
72
199
"command": "npx",
73
200
"args": [
74
201
"-y",
@@ -93,7 +220,7 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu
93
220
```json
94
221
{
95
222
"mcpServers": {
96
-
"dub-partners": {
223
+
"dub": {
97
224
"command": "npx",
98
225
"args": [
99
226
"-y",
@@ -119,7 +246,7 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu
119
246
{
120
247
"mcp": {
121
248
"servers": {
122
-
"dub-partners": {
249
+
"dub": {
123
250
"command": "npx",
124
251
"args": [
125
252
"-y",
@@ -143,7 +270,7 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu
143
270
```json
144
271
{
145
272
"mcpServers": {
146
-
"dub-partners": {
273
+
"dub": {
147
274
"command": "npx",
148
275
"args": [
149
276
"-y",
@@ -168,7 +295,7 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu
168
295
{
169
296
"$schema": "https://opencode.ai/config.json",
170
297
"mcp": {
171
-
"dub-partners": {
298
+
"dub": {
172
299
"type": "local",
173
300
"command": [
174
301
"npx",
@@ -193,7 +320,7 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu
193
320
```json
194
321
{
195
322
"mcpServers": {
196
-
"dub-partners": {
323
+
"dub": {
197
324
"command": "npx",
198
325
"args": [
199
326
"-y",
@@ -211,66 +338,28 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu
211
338
```
212
339
</Tab>
213
340
214
-
<Tabtitle="Other clients">
215
-
For any MCP client not listed above, use the raw configuration below:
341
+
<Tabtitle="Warp">
342
+
In Warp's Settings, navigate to **Agents** > **MCP servers**, and click **+ Add** to add a new server.
216
343
217
344
```json
218
345
{
219
-
"command": "npx",
220
-
"args": [
221
-
"-y",
222
-
"mcp-remote@0.1.25",
223
-
"https://mcp.dub.sh/mcp/dub-partners",
224
-
"--header",
225
-
"Mcp-Dub-Token:${MCP_DUB_TOKEN}"
226
-
],
227
-
"env": {
228
-
"MCP_DUB_TOKEN": "dub_xxxxxx"
229
-
}
230
-
}
231
-
```
232
-
233
-
</Tab>
234
-
</Tabs>
235
-
236
-
### Native HTTP
237
-
238
-
Some MCP clients support connecting directly to a remote HTTP endpoint without `mcp-remote`. In that case, point your client at the Dub MCP URL and pass your API key in the `Mcp-Dub-Token` header.
Open the command palette and choose **Cursor Settings** → **MCP** → **Add new global MCP server**.
251
-
252
-
```json
253
-
{
254
-
"mcpServers": {
255
-
"dub-partners": {
256
-
"url": "https://mcp.dub.sh/mcp/dub-partners",
257
-
"headers": {
258
-
"Mcp-Dub-Token": "dub_xxxxxx"
259
-
}
346
+
"dub": {
347
+
"command": "npx",
348
+
"args": [
349
+
"-y",
350
+
"mcp-remote@0.1.25",
351
+
"https://mcp.dub.sh/mcp/dub-partners",
352
+
"--header",
353
+
"Mcp-Dub-Token:${MCP_DUB_TOKEN}"
354
+
],
355
+
"env": {
356
+
"MCP_DUB_TOKEN": "dub_xxxxxx"
260
357
}
261
358
}
262
359
}
263
360
```
264
361
265
362
</Tab>
266
-
267
-
<Tabtitle="Other clients">
268
-
Use your client's remote MCP configuration with:
269
-
270
-
-**URL:**`https://mcp.dub.sh/mcp/dub-partners`
271
-
-**Header:**`Mcp-Dub-Token: dub_xxxxxx`
272
-
273
-
</Tab>
274
363
</Tabs>
275
364
276
365
### Environment variables
@@ -281,3 +370,24 @@ Some MCP clients support connecting directly to a remote HTTP endpoint without `
281
370
Store your API key in the `env` block or an environment variable rather than
282
371
hardcoding it in shared config files when possible.
283
372
</Info>
373
+
374
+
## MCP Server tools
375
+
376
+
The Dub [MCP server](https://mcp.dub.sh/mcp/dub-partners) 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.
377
+
378
+
-**Partners** — Create or update partners, list all partners, deactivate, or ban partners from your program
379
+
-**Partner links** — Create and upsert links for enrolled partners
380
+
-**Applications** — List, approve, and reject pending partner applications
381
+
-**Analytics** — Retrieve analytics and list events for any partner, [partner groups](/help/article/partner-groups), or their specific links
382
+
-**Customers** — List, retrieve, update, and delete customers
383
+
-**Tracking** — Track lead, sale, and deep link open events
384
+
-**Bounties** — List, approve, and reject bounty submissions
385
+
-**Commissions** — List and update commissions (e.g. for refunds or fraud)
386
+
-**Payouts** — List payouts for your partner program
387
+
388
+
Here are some real examples of what your agent can do with these tools:
389
+
390
+
- Triage pending partner applications and approve or reject them in bulk
391
+
- Adjust commissions after a refund or flag suspicious activity
392
+
- Pull attribution analytics for a top partner or [partner group](/help/article/partner-groups)
393
+
- Create partner links and track lead or sale conversion events
0 commit comments