From a49866c771ff3cdf4bcc28438ded22e2440100a2 Mon Sep 17 00:00:00 2001 From: Pedro Ladeira Date: Thu, 30 Apr 2026 19:23:08 -0300 Subject: [PATCH 1/8] add mcp servers documentation --- docs.json | 7 ++ docs/sdks/mcp/dub-links.mdx | 217 +++++++++++++++++++++++++++++++++ docs/sdks/mcp/dub-partners.mdx | 210 +++++++++++++++++++++++++++++++ 3 files changed, 434 insertions(+) create mode 100644 docs/sdks/mcp/dub-links.mdx create mode 100644 docs/sdks/mcp/dub-partners.mdx diff --git a/docs.json b/docs.json index 0d9e35b5..f83c50ea 100644 --- a/docs.json +++ b/docs.json @@ -116,6 +116,13 @@ "group": "INTEGRATIONS", "pages": ["docs/integrations", "docs/integrations/quickstart"] }, + { + "group": "MCP SERVERS", + "pages": [ + "docs/sdks/mcp/dub-links", + "docs/sdks/mcp/dub-partners" + ] + }, { "group": "OPEN SOURCE", "pages": ["docs/local-development", "docs/self-hosting"] diff --git a/docs/sdks/mcp/dub-links.mdx b/docs/sdks/mcp/dub-links.mdx new file mode 100644 index 00000000..bc1a8f28 --- /dev/null +++ b/docs/sdks/mcp/dub-links.mdx @@ -0,0 +1,217 @@ +--- +title: "Dub Links MCP Server" +description: "Use the Dub Links MCP server to manage links, analytics, domains, and more with any MCP-compatible AI client." +"og:title": "Dub Links MCP Server" +--- + +The Dub Links [MCP server](https://mcp.dub.sh/mcp/dub-links) gives your AI agent native access to the full Dub Links platform through a single integration. You can manage links, track conversions, and retrieve analytics using natural language. + +## What can the Dub Links MCP server do? + +- **Links** — Create, upsert, bulk-create, retrieve, list, update, bulk-update, delete, bulk-delete, and count links +- **Analytics** — Retrieve analytics and list events for any link, domain, or workspace +- **QR codes** — Retrieve a QR code for any link +- **Customers** — List, retrieve, update, and delete customers +- **Tracking** — Track lead, sale, and deep link open events +- **Domains** — Create, list, update, and delete custom domains +- **Tags** — Create, list, update, and delete tags +- **Folders** — Create, list, update, and delete folders + +## Prerequisites + +You'll need a Dub API key to authenticate with the MCP server. You can create one in your [Dub workspace settings](https://app.dub.co/settings/tokens). + +## Setup + +Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actual Dub API key. + + + + Open **Cursor Settings** → **MCP** → **Add new global MCP server** and paste the following: + + ```json + { + "mcpServers": { + "dub-links": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-links", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + Open **Claude Desktop** settings → **Developer** tab → **Edit Config** and add the following: + + ```json + { + "mcpServers": { + "dub-links": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-links", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + ```bash + claude mcp add dub-links \ + --env MCP_DUB_TOKEN=dub_xxxxxx \ + -- npx -y mcp-remote@0.1.25 https://mcp.dub.sh/mcp/dub-links \ + --header "Mcp-Dub-Token:\${MCP_DUB_TOKEN}" + ``` + + + Add the following to your `settings.json`: + + ```json + { + "mcp": { + "servers": { + "dub-links": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-links", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + } + ``` + + + ```json + { + "mcpServers": { + "dub-links": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-links", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + For any MCP client not listed above, use the raw configuration below: + + ```json + { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-links", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + ``` + + + +## Available tools + + + + | Tool | Description | + |------|-------------| + | `dub_create_link` | Create a link for the authenticated workspace | + | `dub_upsert_link` | Upsert a link by URL — returns the existing link or creates a new one | + | `dub_bulk_create_links` | Bulk create up to 100 links | + | `dub_get_link_info` | Retrieve the info for a link | + | `dub_get_links` | Retrieve a paginated list of links | + | `dub_get_links_count` | Retrieve the total number of links | + | `dub_update_link` | Update a link | + | `dub_bulk_update_links` | Bulk update up to 100 links with the same data | + | `dub_delete_link` | Delete a link | + | `dub_bulk_delete_links` | Bulk delete up to 100 links | + + + | Tool | Description | + |------|-------------| + | `dub_retrieve_analytics` | Retrieve analytics for a link, domain, or workspace. The response type depends on the `event` and `type` query parameters | + | `dub_list_events` | Retrieve a paginated list of events for the authenticated workspace | + + + | Tool | Description | + |------|-------------| + | `dub_get_qr_code` | Retrieve a QR code for a link | + + + | Tool | Description | + |------|-------------| + | `dub_get_customers` | Retrieve a paginated list of customers | + | `dub_get_customer` | Retrieve a customer by ID. Prefix the ID with `ext_` to look up by external ID | + | `dub_update_customer` | Update a customer | + | `dub_delete_customer` | Delete a customer from the workspace | + + + | Tool | Description | + |------|-------------| + | `dub_track_lead` | Track a lead event for a short link | + | `dub_track_sale` | Track a sale event for a short link | + | `dub_track_open` | Track when a user opens your app via a Dub-powered deep link (iOS and Android) | + + + | Tool | Description | + |------|-------------| + | `dub_create_domain` | Create a custom domain for the workspace | + | `dub_list_domains` | Retrieve a paginated list of domains | + | `dub_update_domain` | Update a domain | + | `dub_delete_domain` | Delete a domain and all its associated links | + + + | Tool | Description | + |------|-------------| + | `dub_create_tag` | Create a tag for the workspace | + | `dub_get_tags` | Retrieve a paginated list of tags | + | `dub_update_tag` | Update a tag | + | `dub_delete_tag` | Delete a tag. Existing links will no longer be associated with this tag | + + + | Tool | Description | + |------|-------------| + | `dub_create_folder` | Create a folder for the workspace | + | `dub_list_folders` | Retrieve a paginated list of folders | + | `dub_update_folder` | Update a folder | + | `dub_delete_folder` | Delete a folder. Existing links will no longer be associated with this folder | + + diff --git a/docs/sdks/mcp/dub-partners.mdx b/docs/sdks/mcp/dub-partners.mdx new file mode 100644 index 00000000..d1792b26 --- /dev/null +++ b/docs/sdks/mcp/dub-partners.mdx @@ -0,0 +1,210 @@ +--- +title: "Dub Partners MCP Server" +description: "Use the Dub Partners MCP server to manage your partner program — partners, commissions, payouts, and more — with any MCP-compatible AI client." +"og:title": "Dub Partners MCP Server" +--- + +The Dub Partners [MCP server](https://mcp.dub.sh/mcp/dub-partners) gives your AI agent native access to the full Dub Partners platform through a single integration. You can manage your partner program, review applications, update commissions, and track attribution using natural language. + +## What can the Dub Partners MCP server do? + +- **Partners** — Create or update partners, list all partners, deactivate, or ban partners from your program +- **Partner links** — Create and upsert links for enrolled partners +- **Applications** — List, approve, and reject pending partner applications +- **Analytics** — Retrieve analytics and list events for any link, domain, or workspace +- **Customers** — List, retrieve, update, and delete customers +- **Tracking** — Track lead, sale, and deep link open events +- **Bounties** — List, approve, and reject bounty submissions +- **Commissions** — List and update commissions (e.g. for refunds or fraud) +- **Payouts** — List payouts for your partner program + +## Prerequisites + +You'll need a Dub API key to authenticate with the MCP server. You can create one in your [Dub workspace settings](https://app.dub.co/settings/tokens). + +## Setup + +Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actual Dub API key. + + + + Open **Cursor Settings** → **MCP** → **Add new global MCP server** and paste the following: + + ```json + { + "mcpServers": { + "dub-partners": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + Open **Claude Desktop** settings → **Developer** tab → **Edit Config** and add the following: + + ```json + { + "mcpServers": { + "dub-partners": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + ```bash + claude mcp add dub-partners \ + --env MCP_DUB_TOKEN=dub_xxxxxx \ + -- npx -y mcp-remote@0.1.25 https://mcp.dub.sh/mcp/dub-partners \ + --header "Mcp-Dub-Token:\${MCP_DUB_TOKEN}" + ``` + + + Add the following to your `settings.json`: + + ```json + { + "mcp": { + "servers": { + "dub-partners": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + } + ``` + + + ```json + { + "mcpServers": { + "dub-partners": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + For any MCP client not listed above, use the raw configuration below: + + ```json + { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + ``` + + + +## Available tools + + + + | Tool | Description | + |------|-------------| + | `dub_create_partner` | Create or update a partner (upsert). If a partner with the same email already exists, their program enrollment is updated | + | `dub_list_partners` | List all partners enrolled in a program | + | `dub_deactivate_partner` | Deactivate a partner and disable all their active links. Commissions and payouts remain intact | + | `dub_ban_partner` | Ban a partner from your program. All links are disabled and commissions are canceled | + | `dub_create_partner_link` | Create a link for a partner enrolled in your program | + | `dub_upsert_partner_link` | Upsert a link for a partner — returns the existing link or creates a new one | + + + | Tool | Description | + |------|-------------| + | `dub_list_partner_applications` | Retrieve a paginated list of pending applications for your partner program | + | `dub_approve_partner_application` | Approve a pending partner application. The partner is enrolled in the specified group and notified | + | `dub_reject_partner_application` | Reject a pending partner application. The partner is notified via email | + + + | Tool | Description | + |------|-------------| + | `dub_retrieve_analytics` | Retrieve analytics for a link, domain, or workspace. The response type depends on the `event` and `type` query parameters | + | `dub_list_events` | Retrieve a paginated list of events for the authenticated workspace | + + + | Tool | Description | + |------|-------------| + | `dub_get_customers` | Retrieve a paginated list of customers | + | `dub_get_customer` | Retrieve a customer by ID. Prefix the ID with `ext_` to look up by external ID | + | `dub_update_customer` | Update a customer | + | `dub_delete_customer` | Delete a customer from the workspace | + + + | Tool | Description | + |------|-------------| + | `dub_track_lead` | Track a lead event for a short link | + | `dub_track_sale` | Track a sale event for a short link | + | `dub_track_open` | Track when a user opens your app via a Dub-powered deep link (iOS and Android) | + + + | Tool | Description | + |------|-------------| + | `dub_list_bounty_submissions` | List all submissions for a specific bounty in your partner program | + | `dub_approve_bounty_submission` | Approve a bounty submission. Optionally specify a custom reward amount | + | `dub_reject_bounty_submission` | Reject a bounty submission with a specified reason and optional note | + + + | Tool | Description | + |------|-------------| + | `dub_list_commissions` | Retrieve a paginated list of commissions for your partner program | + | `dub_update_commission` | Update an existing commission amount. Useful for handling refunds or fraudulent sales | + + + | Tool | Description | + |------|-------------| + | `dub_list_payouts` | Retrieve a paginated list of payouts for your partner program | + + From f3a65ee00c332ffe72fd6f170aa89ce3efe03338 Mon Sep 17 00:00:00 2001 From: Steven Tey Date: Wed, 20 May 2026 20:27:08 -0700 Subject: [PATCH 2/8] Dub MCP Server --- docs.json | 10 +- docs/mcp-server.mdx | 153 ++++++++++++++++++++++++ docs/sdks/mcp/dub-partners.mdx | 210 --------------------------------- 3 files changed, 155 insertions(+), 218 deletions(-) create mode 100644 docs/mcp-server.mdx delete mode 100644 docs/sdks/mcp/dub-partners.mdx diff --git a/docs.json b/docs.json index fd91577d..df6a8652 100644 --- a/docs.json +++ b/docs.json @@ -116,13 +116,6 @@ "group": "INTEGRATIONS", "pages": ["docs/integrations", "docs/integrations/quickstart"] }, - { - "group": "MCP SERVERS", - "pages": [ - "docs/sdks/mcp/dub-links", - "docs/sdks/mcp/dub-partners" - ] - }, { "group": "OPEN SOURCE", "pages": ["docs/local-development", "docs/self-hosting"] @@ -387,7 +380,8 @@ "pages": [ "docs/api-reference/introduction", "docs/api-reference/authentication", - "docs/api-reference/rate-limits" + "docs/api-reference/rate-limits", + "docs/mcp-server" ] }, { diff --git a/docs/mcp-server.mdx b/docs/mcp-server.mdx new file mode 100644 index 00000000..7ad78611 --- /dev/null +++ b/docs/mcp-server.mdx @@ -0,0 +1,153 @@ +--- +title: "Dub MCP Server" +description: "Use the Dub MCP server to manage your partner program with the AI agent of your choice." +sidebarTitle: "MCP Server" +--- + +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. + +## What can the Dub MCP server do? + +- **Partners** — Create or update partners, list all partners, deactivate, or ban partners from your program +- **Partner links** — Create and upsert links for enrolled partners +- **Applications** — List, approve, and reject pending partner applications +- **Analytics** — Retrieve analytics and list events for any partner, [partner groups](/help/article/partner-groups), or their specific links +- **Customers** — List, retrieve, update, and delete customers +- **Tracking** — Track lead, sale, and deep link open events +- **Bounties** — List, approve, and reject bounty submissions +- **Commissions** — List and update commissions (e.g. for refunds or fraud) +- **Payouts** — List payouts for your partner program + +## Prerequisites + +You'll need a Dub API key to authenticate with the MCP server. You can create one in your [Dub workspace settings](https://app.dub.co/settings/tokens). + +## Setup + +Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actual Dub API key. + + + + ```bash + claude mcp add dub-partners \ + --env MCP_DUB_TOKEN=dub_xxxxxx \ + -- npx -y mcp-remote@0.1.25 https://mcp.dub.sh/mcp/dub-partners \ + --header "Mcp-Dub-Token:\${MCP_DUB_TOKEN}" + ``` + + + Add the following to your `settings.json`: + + ```json + { + "mcp": { + "servers": { + "dub-partners": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + } + ``` + + + + Open **Claude Desktop** settings → **Developer** tab → **Edit Config** and add the following: + + ```json + { + "mcpServers": { + "dub-partners": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + + Open **Cursor Settings** → **MCP** → **Add new global MCP server** and paste the following: + + ```json + { + "mcpServers": { + "dub-partners": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + + ```json + { + "mcpServers": { + "dub-partners": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + For any MCP client not listed above, use the raw configuration below: + + ```json + { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + ``` + + + diff --git a/docs/sdks/mcp/dub-partners.mdx b/docs/sdks/mcp/dub-partners.mdx deleted file mode 100644 index d1792b26..00000000 --- a/docs/sdks/mcp/dub-partners.mdx +++ /dev/null @@ -1,210 +0,0 @@ ---- -title: "Dub Partners MCP Server" -description: "Use the Dub Partners MCP server to manage your partner program — partners, commissions, payouts, and more — with any MCP-compatible AI client." -"og:title": "Dub Partners MCP Server" ---- - -The Dub Partners [MCP server](https://mcp.dub.sh/mcp/dub-partners) gives your AI agent native access to the full Dub Partners platform through a single integration. You can manage your partner program, review applications, update commissions, and track attribution using natural language. - -## What can the Dub Partners MCP server do? - -- **Partners** — Create or update partners, list all partners, deactivate, or ban partners from your program -- **Partner links** — Create and upsert links for enrolled partners -- **Applications** — List, approve, and reject pending partner applications -- **Analytics** — Retrieve analytics and list events for any link, domain, or workspace -- **Customers** — List, retrieve, update, and delete customers -- **Tracking** — Track lead, sale, and deep link open events -- **Bounties** — List, approve, and reject bounty submissions -- **Commissions** — List and update commissions (e.g. for refunds or fraud) -- **Payouts** — List payouts for your partner program - -## Prerequisites - -You'll need a Dub API key to authenticate with the MCP server. You can create one in your [Dub workspace settings](https://app.dub.co/settings/tokens). - -## Setup - -Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actual Dub API key. - - - - Open **Cursor Settings** → **MCP** → **Add new global MCP server** and paste the following: - - ```json - { - "mcpServers": { - "dub-partners": { - "command": "npx", - "args": [ - "-y", - "mcp-remote@0.1.25", - "https://mcp.dub.sh/mcp/dub-partners", - "--header", - "Mcp-Dub-Token:${MCP_DUB_TOKEN}" - ], - "env": { - "MCP_DUB_TOKEN": "dub_xxxxxx" - } - } - } - } - ``` - - - Open **Claude Desktop** settings → **Developer** tab → **Edit Config** and add the following: - - ```json - { - "mcpServers": { - "dub-partners": { - "command": "npx", - "args": [ - "-y", - "mcp-remote@0.1.25", - "https://mcp.dub.sh/mcp/dub-partners", - "--header", - "Mcp-Dub-Token:${MCP_DUB_TOKEN}" - ], - "env": { - "MCP_DUB_TOKEN": "dub_xxxxxx" - } - } - } - } - ``` - - - ```bash - claude mcp add dub-partners \ - --env MCP_DUB_TOKEN=dub_xxxxxx \ - -- npx -y mcp-remote@0.1.25 https://mcp.dub.sh/mcp/dub-partners \ - --header "Mcp-Dub-Token:\${MCP_DUB_TOKEN}" - ``` - - - Add the following to your `settings.json`: - - ```json - { - "mcp": { - "servers": { - "dub-partners": { - "command": "npx", - "args": [ - "-y", - "mcp-remote@0.1.25", - "https://mcp.dub.sh/mcp/dub-partners", - "--header", - "Mcp-Dub-Token:${MCP_DUB_TOKEN}" - ], - "env": { - "MCP_DUB_TOKEN": "dub_xxxxxx" - } - } - } - } - } - ``` - - - ```json - { - "mcpServers": { - "dub-partners": { - "command": "npx", - "args": [ - "-y", - "mcp-remote@0.1.25", - "https://mcp.dub.sh/mcp/dub-partners", - "--header", - "Mcp-Dub-Token:${MCP_DUB_TOKEN}" - ], - "env": { - "MCP_DUB_TOKEN": "dub_xxxxxx" - } - } - } - } - ``` - - - For any MCP client not listed above, use the raw configuration below: - - ```json - { - "command": "npx", - "args": [ - "-y", - "mcp-remote@0.1.25", - "https://mcp.dub.sh/mcp/dub-partners", - "--header", - "Mcp-Dub-Token:${MCP_DUB_TOKEN}" - ], - "env": { - "MCP_DUB_TOKEN": "dub_xxxxxx" - } - } - ``` - - - -## Available tools - - - - | Tool | Description | - |------|-------------| - | `dub_create_partner` | Create or update a partner (upsert). If a partner with the same email already exists, their program enrollment is updated | - | `dub_list_partners` | List all partners enrolled in a program | - | `dub_deactivate_partner` | Deactivate a partner and disable all their active links. Commissions and payouts remain intact | - | `dub_ban_partner` | Ban a partner from your program. All links are disabled and commissions are canceled | - | `dub_create_partner_link` | Create a link for a partner enrolled in your program | - | `dub_upsert_partner_link` | Upsert a link for a partner — returns the existing link or creates a new one | - - - | Tool | Description | - |------|-------------| - | `dub_list_partner_applications` | Retrieve a paginated list of pending applications for your partner program | - | `dub_approve_partner_application` | Approve a pending partner application. The partner is enrolled in the specified group and notified | - | `dub_reject_partner_application` | Reject a pending partner application. The partner is notified via email | - - - | Tool | Description | - |------|-------------| - | `dub_retrieve_analytics` | Retrieve analytics for a link, domain, or workspace. The response type depends on the `event` and `type` query parameters | - | `dub_list_events` | Retrieve a paginated list of events for the authenticated workspace | - - - | Tool | Description | - |------|-------------| - | `dub_get_customers` | Retrieve a paginated list of customers | - | `dub_get_customer` | Retrieve a customer by ID. Prefix the ID with `ext_` to look up by external ID | - | `dub_update_customer` | Update a customer | - | `dub_delete_customer` | Delete a customer from the workspace | - - - | Tool | Description | - |------|-------------| - | `dub_track_lead` | Track a lead event for a short link | - | `dub_track_sale` | Track a sale event for a short link | - | `dub_track_open` | Track when a user opens your app via a Dub-powered deep link (iOS and Android) | - - - | Tool | Description | - |------|-------------| - | `dub_list_bounty_submissions` | List all submissions for a specific bounty in your partner program | - | `dub_approve_bounty_submission` | Approve a bounty submission. Optionally specify a custom reward amount | - | `dub_reject_bounty_submission` | Reject a bounty submission with a specified reason and optional note | - - - | Tool | Description | - |------|-------------| - | `dub_list_commissions` | Retrieve a paginated list of commissions for your partner program | - | `dub_update_commission` | Update an existing commission amount. Useful for handling refunds or fraudulent sales | - - - | Tool | Description | - |------|-------------| - | `dub_list_payouts` | Retrieve a paginated list of payouts for your partner program | - - From b98c387c21b1dcef07c244e06492cbfcef7e9282 Mon Sep 17 00:00:00 2001 From: Steven Tey Date: Wed, 20 May 2026 20:40:39 -0700 Subject: [PATCH 3/8] Dub MCP Server --- docs/mcp-server.mdx | 157 +++++++++++++++++++++++--- docs/sdks/mcp/dub-links.mdx | 217 ------------------------------------ 2 files changed, 142 insertions(+), 232 deletions(-) delete mode 100644 docs/sdks/mcp/dub-links.mdx diff --git a/docs/mcp-server.mdx b/docs/mcp-server.mdx index 7ad78611..ae4c9590 100644 --- a/docs/mcp-server.mdx +++ b/docs/mcp-server.mdx @@ -4,10 +4,14 @@ description: "Use the Dub MCP server to manage your partner program with the AI sidebarTitle: "MCP Server" --- -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. +## What is an MCP Server? + +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. ## What can the Dub MCP server do? +The Dub [MCP server](https://mcp.dub.sh/mcp/dub-partners) gives your AI agent native access to the full Dub Partners platform through a single integration. You can manage your partner program, review applications, update commissions, and track attribution using natural language. + - **Partners** — Create or update partners, list all partners, deactivate, or ban partners from your program - **Partner links** — Create and upsert links for enrolled partners - **Applications** — List, approve, and reject pending partner applications @@ -18,14 +22,27 @@ The Dub [MCP server](https://mcp.dub.sh/mcp/dub-partners) gives your AI agent na - **Commissions** — List and update commissions (e.g. for refunds or fraud) - **Payouts** — List payouts for your partner program +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 + [Dub Links MCP server docs](https://mcp.dub.sh/mcp/dub-links). + + ## Prerequisites -You'll need a Dub API key to authenticate with the MCP server. You can create one in your [Dub workspace settings](https://app.dub.co/settings/tokens). +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: -## Setup +- [Create a Dub API key](https://app.dub.co/settings/tokens) with access to your partner program + +## How to use the MCP Server + +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. Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actual Dub API key. +### MCP client integrations + ```bash @@ -35,8 +52,65 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu --header "Mcp-Dub-Token:\${MCP_DUB_TOKEN}" ``` - - Add the following to your `settings.json`: + + + ```bash codex mcp add dub-partners \ --env MCP_DUB_TOKEN=dub_xxxxxx \ -- npx + -y mcp-remote@0.1.25 https://mcp.dub.sh/mcp/dub-partners \ --header + "Mcp-Dub-Token:\${MCP_DUB_TOKEN}" ``` + + + + Open the command palette and choose **Cursor Settings** → **MCP** → **Add new global MCP server**. + + ```json + { + "mcpServers": { + "dub-partners": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + + + Open **Claude Desktop** settings → **Developer** tab → **Edit Config** and add the following: + + ```json + { + "mcpServers": { + "dub-partners": { + "command": "npx", + "args": [ + "-y", + "mcp-remote@0.1.25", + "https://mcp.dub.sh/mcp/dub-partners", + "--header", + "Mcp-Dub-Token:${MCP_DUB_TOKEN}" + ], + "env": { + "MCP_DUB_TOKEN": "dub_xxxxxx" + } + } + } + } + ``` + + + + + To use GitHub Copilot in VS Code, add the following to your `settings.json`: ```json { @@ -61,9 +135,8 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu ``` - - Open **Claude Desktop** settings → **Developer** tab → **Edit Config** and add the following: + ```json { "mcpServers": { @@ -83,24 +156,27 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu } } ``` - - - Open **Cursor Settings** → **MCP** → **Add new global MCP server** and paste the following: + + + Add to your `opencode.json` config: ```json { - "mcpServers": { + "$schema": "https://opencode.ai/config.json", + "mcp": { "dub-partners": { - "command": "npx", - "args": [ + "type": "local", + "command": [ + "npx", "-y", "mcp-remote@0.1.25", "https://mcp.dub.sh/mcp/dub-partners", "--header", "Mcp-Dub-Token:${MCP_DUB_TOKEN}" ], - "env": { + "enabled": true, + "environment": { "MCP_DUB_TOKEN": "dub_xxxxxx" } } @@ -109,7 +185,8 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu ``` - + + ```json { "mcpServers": { @@ -130,6 +207,7 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu } ``` + For any MCP client not listed above, use the raw configuration below: @@ -151,3 +229,52 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu + +### Native HTTP + +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. + + + + ```bash + claude mcp add dub-partners \ + --transport http https://mcp.dub.sh/mcp/dub-partners \ + --header "Mcp-Dub-Token: dub_xxxxxx" + ``` + + + + Open the command palette and choose **Cursor Settings** → **MCP** → **Add new global MCP server**. + + ```json + { + "mcpServers": { + "dub-partners": { + "url": "https://mcp.dub.sh/mcp/dub-partners", + "headers": { + "Mcp-Dub-Token": "dub_xxxxxx" + } + } + } + } + ``` + + + + + Use your client's remote MCP configuration with: + + - **URL:** `https://mcp.dub.sh/mcp/dub-partners` + - **Header:** `Mcp-Dub-Token: dub_xxxxxx` + + + + +### Environment variables + +- `MCP_DUB_TOKEN`: Your Dub API key (used by `mcp-remote` and referenced in client configs as `${MCP_DUB_TOKEN}`) + + + Store your API key in the `env` block or an environment variable rather than + hardcoding it in shared config files when possible. + diff --git a/docs/sdks/mcp/dub-links.mdx b/docs/sdks/mcp/dub-links.mdx deleted file mode 100644 index bc1a8f28..00000000 --- a/docs/sdks/mcp/dub-links.mdx +++ /dev/null @@ -1,217 +0,0 @@ ---- -title: "Dub Links MCP Server" -description: "Use the Dub Links MCP server to manage links, analytics, domains, and more with any MCP-compatible AI client." -"og:title": "Dub Links MCP Server" ---- - -The Dub Links [MCP server](https://mcp.dub.sh/mcp/dub-links) gives your AI agent native access to the full Dub Links platform through a single integration. You can manage links, track conversions, and retrieve analytics using natural language. - -## What can the Dub Links MCP server do? - -- **Links** — Create, upsert, bulk-create, retrieve, list, update, bulk-update, delete, bulk-delete, and count links -- **Analytics** — Retrieve analytics and list events for any link, domain, or workspace -- **QR codes** — Retrieve a QR code for any link -- **Customers** — List, retrieve, update, and delete customers -- **Tracking** — Track lead, sale, and deep link open events -- **Domains** — Create, list, update, and delete custom domains -- **Tags** — Create, list, update, and delete tags -- **Folders** — Create, list, update, and delete folders - -## Prerequisites - -You'll need a Dub API key to authenticate with the MCP server. You can create one in your [Dub workspace settings](https://app.dub.co/settings/tokens). - -## Setup - -Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actual Dub API key. - - - - Open **Cursor Settings** → **MCP** → **Add new global MCP server** and paste the following: - - ```json - { - "mcpServers": { - "dub-links": { - "command": "npx", - "args": [ - "-y", - "mcp-remote@0.1.25", - "https://mcp.dub.sh/mcp/dub-links", - "--header", - "Mcp-Dub-Token:${MCP_DUB_TOKEN}" - ], - "env": { - "MCP_DUB_TOKEN": "dub_xxxxxx" - } - } - } - } - ``` - - - Open **Claude Desktop** settings → **Developer** tab → **Edit Config** and add the following: - - ```json - { - "mcpServers": { - "dub-links": { - "command": "npx", - "args": [ - "-y", - "mcp-remote@0.1.25", - "https://mcp.dub.sh/mcp/dub-links", - "--header", - "Mcp-Dub-Token:${MCP_DUB_TOKEN}" - ], - "env": { - "MCP_DUB_TOKEN": "dub_xxxxxx" - } - } - } - } - ``` - - - ```bash - claude mcp add dub-links \ - --env MCP_DUB_TOKEN=dub_xxxxxx \ - -- npx -y mcp-remote@0.1.25 https://mcp.dub.sh/mcp/dub-links \ - --header "Mcp-Dub-Token:\${MCP_DUB_TOKEN}" - ``` - - - Add the following to your `settings.json`: - - ```json - { - "mcp": { - "servers": { - "dub-links": { - "command": "npx", - "args": [ - "-y", - "mcp-remote@0.1.25", - "https://mcp.dub.sh/mcp/dub-links", - "--header", - "Mcp-Dub-Token:${MCP_DUB_TOKEN}" - ], - "env": { - "MCP_DUB_TOKEN": "dub_xxxxxx" - } - } - } - } - } - ``` - - - ```json - { - "mcpServers": { - "dub-links": { - "command": "npx", - "args": [ - "-y", - "mcp-remote@0.1.25", - "https://mcp.dub.sh/mcp/dub-links", - "--header", - "Mcp-Dub-Token:${MCP_DUB_TOKEN}" - ], - "env": { - "MCP_DUB_TOKEN": "dub_xxxxxx" - } - } - } - } - ``` - - - For any MCP client not listed above, use the raw configuration below: - - ```json - { - "command": "npx", - "args": [ - "-y", - "mcp-remote@0.1.25", - "https://mcp.dub.sh/mcp/dub-links", - "--header", - "Mcp-Dub-Token:${MCP_DUB_TOKEN}" - ], - "env": { - "MCP_DUB_TOKEN": "dub_xxxxxx" - } - } - ``` - - - -## Available tools - - - - | Tool | Description | - |------|-------------| - | `dub_create_link` | Create a link for the authenticated workspace | - | `dub_upsert_link` | Upsert a link by URL — returns the existing link or creates a new one | - | `dub_bulk_create_links` | Bulk create up to 100 links | - | `dub_get_link_info` | Retrieve the info for a link | - | `dub_get_links` | Retrieve a paginated list of links | - | `dub_get_links_count` | Retrieve the total number of links | - | `dub_update_link` | Update a link | - | `dub_bulk_update_links` | Bulk update up to 100 links with the same data | - | `dub_delete_link` | Delete a link | - | `dub_bulk_delete_links` | Bulk delete up to 100 links | - - - | Tool | Description | - |------|-------------| - | `dub_retrieve_analytics` | Retrieve analytics for a link, domain, or workspace. The response type depends on the `event` and `type` query parameters | - | `dub_list_events` | Retrieve a paginated list of events for the authenticated workspace | - - - | Tool | Description | - |------|-------------| - | `dub_get_qr_code` | Retrieve a QR code for a link | - - - | Tool | Description | - |------|-------------| - | `dub_get_customers` | Retrieve a paginated list of customers | - | `dub_get_customer` | Retrieve a customer by ID. Prefix the ID with `ext_` to look up by external ID | - | `dub_update_customer` | Update a customer | - | `dub_delete_customer` | Delete a customer from the workspace | - - - | Tool | Description | - |------|-------------| - | `dub_track_lead` | Track a lead event for a short link | - | `dub_track_sale` | Track a sale event for a short link | - | `dub_track_open` | Track when a user opens your app via a Dub-powered deep link (iOS and Android) | - - - | Tool | Description | - |------|-------------| - | `dub_create_domain` | Create a custom domain for the workspace | - | `dub_list_domains` | Retrieve a paginated list of domains | - | `dub_update_domain` | Update a domain | - | `dub_delete_domain` | Delete a domain and all its associated links | - - - | Tool | Description | - |------|-------------| - | `dub_create_tag` | Create a tag for the workspace | - | `dub_get_tags` | Retrieve a paginated list of tags | - | `dub_update_tag` | Update a tag | - | `dub_delete_tag` | Delete a tag. Existing links will no longer be associated with this tag | - - - | Tool | Description | - |------|-------------| - | `dub_create_folder` | Create a folder for the workspace | - | `dub_list_folders` | Retrieve a paginated list of folders | - | `dub_update_folder` | Update a folder | - | `dub_delete_folder` | Delete a folder. Existing links will no longer be associated with this folder | - - From e7112d2266d656a3b111ca215291263a6eee80ca Mon Sep 17 00:00:00 2001 From: Steven Tey Date: Wed, 20 May 2026 20:46:14 -0700 Subject: [PATCH 4/8] rearrange --- docs.json | 4 ++-- docs/sdks/overview.mdx | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs.json b/docs.json index df6a8652..6aa53d3b 100644 --- a/docs.json +++ b/docs.json @@ -380,14 +380,14 @@ "pages": [ "docs/api-reference/introduction", "docs/api-reference/authentication", - "docs/api-reference/rate-limits", - "docs/mcp-server" + "docs/api-reference/rate-limits" ] }, { "group": "SDKs", "pages": [ "docs/sdks/overview", + "docs/mcp-server", { "group": "Server-side SDKs", "pages": [ diff --git a/docs/sdks/overview.mdx b/docs/sdks/overview.mdx index 40248188..ef65c434 100644 --- a/docs/sdks/overview.mdx +++ b/docs/sdks/overview.mdx @@ -3,6 +3,13 @@ title: "Overview" description: "Open-source client libraries for the Dub API" --- +## MCP Server + + + Use the Dub MCP server to manage your partner program with the AI agent of + your choice. + + ## Server-side SDKs Dub offers server-side SDKs for many popular programming languages: From 7c93cae4063ab2f178fda441342d1a770be50cf3 Mon Sep 17 00:00:00 2001 From: Steven Tey Date: Wed, 20 May 2026 20:50:30 -0700 Subject: [PATCH 5/8] Update mcp-server.mdx --- docs/mcp-server.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mcp-server.mdx b/docs/mcp-server.mdx index ae4c9590..f482d46b 100644 --- a/docs/mcp-server.mdx +++ b/docs/mcp-server.mdx @@ -10,7 +10,7 @@ MCP (Model Context Protocol) is an open standard for connecting AI applications ## What can the Dub MCP server do? -The Dub [MCP server](https://mcp.dub.sh/mcp/dub-partners) gives your AI agent native access to the full Dub Partners platform through a single integration. You can manage your partner program, review applications, update commissions, and track attribution using natural language. +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. - **Partners** — Create or update partners, list all partners, deactivate, or ban partners from your program - **Partner links** — Create and upsert links for enrolled partners From 898715aae238d631d39bead2e5aafd1c1396996f Mon Sep 17 00:00:00 2001 From: Steven Tey Date: Wed, 20 May 2026 20:53:05 -0700 Subject: [PATCH 6/8] simply to docs/mcp --- docs.json | 2 +- docs/{mcp-server.mdx => mcp.mdx} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename docs/{mcp-server.mdx => mcp.mdx} (100%) diff --git a/docs.json b/docs.json index 6aa53d3b..db24ef1b 100644 --- a/docs.json +++ b/docs.json @@ -387,7 +387,7 @@ "group": "SDKs", "pages": [ "docs/sdks/overview", - "docs/mcp-server", + "docs/mcp", { "group": "Server-side SDKs", "pages": [ diff --git a/docs/mcp-server.mdx b/docs/mcp.mdx similarity index 100% rename from docs/mcp-server.mdx rename to docs/mcp.mdx From 7d2302f9bcb92c30d72c3049c4c24b0beb1c753a Mon Sep 17 00:00:00 2001 From: Steven Tey Date: Wed, 20 May 2026 20:54:33 -0700 Subject: [PATCH 7/8] Update mcp.mdx --- docs/mcp.mdx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/mcp.mdx b/docs/mcp.mdx index f482d46b..049534de 100644 --- a/docs/mcp.mdx +++ b/docs/mcp.mdx @@ -53,11 +53,14 @@ Choose your MCP client below to get started. Replace `dub_xxxxxx` with your actu ``` - - ```bash codex mcp add dub-partners \ --env MCP_DUB_TOKEN=dub_xxxxxx \ -- npx - -y mcp-remote@0.1.25 https://mcp.dub.sh/mcp/dub-partners \ --header - "Mcp-Dub-Token:\${MCP_DUB_TOKEN}" ``` - + + ```bash + codex mcp add dub-partners \ + --env MCP_DUB_TOKEN=dub_xxxxxx \ + -- npx -y mcp-remote@0.1.25 https://mcp.dub.sh/mcp/dub-partners \ + --header "Mcp-Dub-Token:\${MCP_DUB_TOKEN}" + ``` + Open the command palette and choose **Cursor Settings** → **MCP** → **Add new global MCP server**. From 043216c3fdf1611467278c53689b631e7909e5e3 Mon Sep 17 00:00:00 2001 From: Steven Tey Date: Wed, 20 May 2026 20:58:27 -0700 Subject: [PATCH 8/8] Update overview.mdx --- docs/sdks/overview.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sdks/overview.mdx b/docs/sdks/overview.mdx index ef65c434..32019847 100644 --- a/docs/sdks/overview.mdx +++ b/docs/sdks/overview.mdx @@ -5,7 +5,7 @@ description: "Open-source client libraries for the Dub API" ## MCP Server - + Use the Dub MCP server to manage your partner program with the AI agent of your choice.