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

# Build with AI Coding Agents

> Install the Dodo Agent Plugin to give your coding agent one MCP server and one skill for building Dodo Payments integrations.

Install the Dodo Agent Plugin to give your coding agent one MCP server and one skill for building Dodo Payments integrations. After you install it, describe what you want to build, and your agent plans and writes the integration. The plugin works with Claude Code, Codex CLI, Cursor, VS Code / GitHub Copilot, Gemini CLI, Grok Build, Meta Muse Code, Google Antigravity, JetBrains Junie, Kiro, and OpenCode.

## Install the Plugin

Choose your coding agent below. Every install adds the MCP server and the `dodo-payments` skill. OpenCode needs one extra setting to load the skills, described in its section.

> [accordion] Claude Code
>
> Install from the marketplace:
>
> ```bash theme={null}
> claude plugins marketplace add dodopayments/dodo-agent-plugin
> claude plugins install dodopayments@dodopayments
> ```
>
> The MCP server needs no keys at install time. When you add it, your client opens your browser so you can sign in with your Dodo Payments account.
>
> > [card] [Dodo Agent Plugin on GitHub](https://github.com/dodopayments/dodo-agent-plugin)
> >
> > Source code, configuration options, and local development instructions

> [accordion] Codex CLI
>
> Register the marketplace, then install from the Codex TUI.
>
> **1. Register the marketplace**
>
> ```bash theme={null}
> codex plugin marketplace add dodopayments/dodo-agent-plugin
> ```
>
> **2. Install from the Codex TUI**
>
> Open Codex and run `/plugins`:
>
> ```bash theme={null}
> codex
> ```
>
> Type `/plugins`, switch to the **Dodo Payments** marketplace, select the **dodopayments** plugin, and choose **Install plugin**.
>
> The MCP server and the skill register automatically.
>
> If the plugin doesn't appear under `/plugins`, refresh it:
>
> ```bash theme={null}
> codex plugin marketplace upgrade dodopayments
> ```
>
> > [!NOTE]
> >
> > To install from your shell instead of the TUI, run `codex plugin add dodopayments@dodopayments` after you register the marketplace. Codex CLI has no `codex plugin install` subcommand. See the [official Codex plugins docs](https://developers.openai.com/codex/plugins).

> [accordion] Cursor
>
> Clone the repo into Cursor's local plugins directory:
>
> ```bash theme={null}
> git clone https://github.com/dodopayments/dodo-agent-plugin.git ~/.cursor/plugins/local/dodo-agent-plugin
> ```
>
> Restart Cursor. The plugin loads skills from `skills/` and MCP servers from `.mcp.json`.
>
> Recent Cursor builds recognize Agent Plugins 1.0.0 directly and accept `.claude-plugin/marketplace.json` as a marketplace source. The generated `.cursor-plugin/plugin.json` is kept for older builds.
>
> If you installed a version before 0.5.0, delete the directory and re-clone — skills now ship as real files, not symlinks.

> [accordion] OpenCode
>
> Install the plugin package in your project, then add it and its skills path to your `opencode.json`:
>
> ```bash theme={null}
> npm install --save-dev @dodopayments/opencode-plugin
> ```
>
> ```json theme={null}
> {
>   "$schema": "https://opencode.ai/config.json",
>   "plugin": ["@dodopayments/opencode-plugin"],
>   "skills": {
>     "paths": ["node_modules/@dodopayments/opencode-plugin/skills"]
>   }
> }
> ```
>
> Restart OpenCode. The MCP server registers automatically. Skills need the extra `skills.paths` entry because OpenCode doesn't scan installed packages for skills.
>
> Relative paths resolve against the project directory, so the package must exist in that project's `node_modules`. An absolute path works too and avoids the local-install requirement.
>
> Verify skills loaded:
>
> ```bash theme={null}
> opencode run "List every skill available to you by name."
> ```
>
> You should see `dodo-payments`. A skills path that doesn't exist is ignored silently, so verify rather than assume.

> [accordion] VS Code / GitHub Copilot
>
> Clone the repo and register it:
>
> ```bash theme={null}
> git clone https://github.com/dodopayments/dodo-agent-plugin.git ~/dodo-agent-plugin
> ```
>
> Open the Chat view, go to **Plugins**, and add the cloned folder. Or register it in `settings.json`:
>
> ```json theme={null}
> {
>   "chat.pluginLocations": { "~/dodo-agent-plugin": true }
> }
> ```
>
> The key is a path, the value enables it. Absolute paths and `~/` both work; relative paths resolve against each workspace folder. The setting is read live, so a running window picks it up without a restart.
>
> `chat.pluginLocations` is marked experimental and is a restricted setting, so the workspace must be trusted. Agent-plugin support is a preview feature governed by `chat.plugins.enabled`, which is on by default.

> [accordion] Kiro
>
> Kiro reads the Agent Plugins manifest natively.
>
> **1. Clone the repository**
>
> ```bash theme={null}
> git clone https://github.com/dodopayments/dodo-agent-plugin.git
> ```
>
> **2. Open the Powers panel**
>
> In Kiro, open the Powers panel (the Ghosty icon with the lightning bolt).
>
> **3. Import the folder**
>
> Choose **Add Custom Power → Import power from a folder**, select the cloned directory (the one containing `plugin.json`), and click **Install**.
>
> Skills load from `skills/`, MCP servers from `mcp.json`. Kiro manages MCP servers internally — they're not written to `~/.kiro/settings/mcp.json`. Kiro can also install a Power directly from a GitHub URL; see [Kiro's install docs](https://kiro.dev/docs/powers/installation/).

> [accordion] Gemini CLI
>
> Install the plugin as a Gemini CLI extension:
>
> ```bash theme={null}
> gemini extensions install https://github.com/dodopayments/dodo-agent-plugin
> ```
>
> `gemini-extension.json` at the repo root is the manifest, and Gemini CLI loads the skills from `skills/` next to it. Verify:
>
> ```bash theme={null}
> gemini skills list
> gemini mcp list
> ```
>
> To update, run `gemini extensions update dodopayments`.

> [accordion] GitHub Copilot CLI
>
> Register the marketplace, then install the plugin:
>
> ```bash theme={null}
> copilot plugin marketplace add dodopayments/dodo-agent-plugin
> copilot plugin install dodopayments@dodopayments
> ```
>
> Verify with `copilot plugin list` and `copilot mcp list`. Use the marketplace install: Copilot CLI marks direct repository installs as deprecated.

> [accordion] Grok Build
>
> Grok Build reads the repository as-is, including `.claude-plugin/marketplace.json`:
>
> ```bash theme={null}
> grok plugin marketplace add dodopayments/dodo-agent-plugin
> grok plugin install dodopayments --trust
> ```
>
> Plugins stay disabled until you trust them, either with `--trust` or from `/plugins`. The MCP server signs in through your browser when it connects.
>
> See the [Grok guide](https://github.com/dodopayments/dodo-agent-plugin/blob/main/docs/clients/grok.md) for MCP-only setup on grok.com and the xAI API.

> [accordion] Meta Muse Code
>
> Muse Code plugins are experimental, so turn them on first:
>
> ```bash theme={null}
> export MUSE_EXPERIMENTAL_PLUGINS=1
> muse plugins marketplace add dodopayments https://github.com/dodopayments/dodo-agent-plugin.git
> muse plugins install dodopayments@dodopayments
> muse plugins approve dodopayments
> ```
>
> A plugin's MCP servers stay inactive until you approve it. Sign in to the server with `muse mcp login dodopayments`.

> [accordion] Google Antigravity
>
> Antigravity uses its own manifest format, so install the generated bundle in `providers/antigravity/`:
>
> ```bash theme={null}
> git clone https://github.com/dodopayments/dodo-agent-plugin.git
> agy plugin install ./dodo-agent-plugin/providers/antigravity
> ```
>
> To update, run `git pull` and then the install command again.

> [accordion] JetBrains Junie
>
> In Junie, run `/extensions`, choose **Add marketplace**, enter `https://github.com/dodopayments/dodo-agent-plugin`, and install **dodopayments**.
>
> See the [Junie guide](https://github.com/dodopayments/dodo-agent-plugin/blob/main/docs/clients/antigravity-and-junie.md#junie) for the standalone bundle in `providers/junie/`.

Using a different agent? The [MCP Server](https://docs.dodopayments.com/developer-resources/mcp-server.md) and [Agent Skills](https://docs.dodopayments.com/developer-resources/agent-skills.md) guides cover Claude Desktop, Windsurf, Cline, Zed, and any MCP-compatible client.

## What You Get

Once installed, your agent has access to one MCP server and the `dodo-payments` skill.

### MCP Servers

| Server | Purpose | Auth |
| - | - | - |
| `dodopayments` | Docs search, page reading, SDK and API method search, and `execute` for running SDK code against your account | OAuth (browser), when the server is added |

The server speaks Streamable HTTP over HTTPS, and every client connects to it directly, with no local bridge process or Node.js dependency. See the [MCP Server](https://docs.dodopayments.com/developer-resources/mcp-server.md) guide for the tools.

To sign in after you install the plugin, use `/mcp` in Claude Code, `codex mcp login dodopayments` in Codex, or `opencode mcp auth dodopayments` in OpenCode. In Cursor and VS Code, connect `dodopayments` from the MCP UI.

### Agent Skills

| Skill | Description |
| - | - |
| `dodo-payments` | One skill with an index and reference topics for checkout, subscriptions, webhooks, billing models, catalog, customers, refunds, framework adapters, testing and go-live, and MCP use |

Skills load automatically — your agent picks the right one when it detects a relevant task. See [Agent Skills](https://docs.dodopayments.com/developer-resources/agent-skills.md) for the full list and individual installation.

### Try This Prompt First

Once the plugin is active, try:

```
Set up Dodo Payments webhook handlers in my Next.js app for payment.succeeded and subscription.active events.
```

Your agent will load the `dodo-payments` skill and open its `webhooks` reference topic, use the `dodopayments` MCP server to pull the latest payload shapes, and write a handler with signature verification following the Standard Webhooks spec.

## Client Support

The plugin follows the [Agent Plugins 1.0.0](https://agent-plugins.org/specification) specification. Clients with native support load it directly; others use generated compatibility manifests.

### Agents with Plugin Install

One install wires the MCP server and the skill.

| Agent | Install | Skills | MCP Servers |
| - | - | -: | -: |
| **Claude Code** | marketplace command | 1 | 1 |
| **Codex CLI** | marketplace command | 1 | 1 |
| **Cursor** | git clone | 1 | 1 |
| **VS Code / GitHub Copilot** | git clone | 1 | 1 |
| **GitHub Copilot CLI** | marketplace command | 1 | 1 |
| **Gemini CLI** | extension install | 1 | 1 |
| **Grok Build** | marketplace command | 1 | 1 |
| **Meta Muse Code** | marketplace command | 1 | 1 |
| **Google Antigravity** | git clone | 1 | 1 |
| **JetBrains Junie** | marketplace | 1 | 1 |
| **Kiro** | git clone | 1 | 1 |
| **OpenCode** | npm | 1 | 1 |

OpenCode needs one extra `skills.paths` entry before its skill loads.

### Other MCP-Compatible Clients

These have no Agent Plugin install. Configure the MCP server by hand, and add skills through the Skills CLI where supported.

| Agent | MCP Servers | Skills |
| - | - | - |
| Claude Desktop | [MCP Server guide](https://docs.dodopayments.com/developer-resources/mcp-server.md) | not supported |
| Windsurf | [MCP Server guide](https://docs.dodopayments.com/developer-resources/mcp-server.md) | [Skills CLI](https://docs.dodopayments.com/developer-resources/agent-skills.md) |
| Cline / Zed / others | [MCP Server guide](https://docs.dodopayments.com/developer-resources/mcp-server.md) | [Skills CLI](https://docs.dodopayments.com/developer-resources/agent-skills.md) |

## Docs Built for Agents

Every Dodo Payments documentation page is available in a format optimized for AI consumption:

* **Full docs index**: [`docs.dodopayments.com/llms.txt`](https://docs.dodopayments.com/llms.txt) — complete documentation index for context ingestion
* **Plain markdown**: Append `.md` to any documentation URL to get the raw markdown version (e.g., `/api-reference/introduction.md`)
* **Source repository**: [`github.com/dodopayments/dodo-docs`](https://github.com/dodopayments/dodo-docs) — clone for offline indexing

## What Your Agent Can Do

With the plugin installed, your coding agent can:

* **Create checkout sessions and payment links** — [One-time payments](https://docs.dodopayments.com/features/one-time-payment-products.md) and [subscriptions](https://docs.dodopayments.com/features/subscription.md)
* **Stand up subscription and usage-based billing end-to-end** — [Subscriptions](https://docs.dodopayments.com/features/subscription.md), [Usage-based billing](https://docs.dodopayments.com/features/usage-based-billing/introduction.md), [Credit-based billing](https://docs.dodopayments.com/features/credit-based-billing.md)
* **Generate Standard Webhooks-compliant handlers** with signature verification — [Webhooks](https://docs.dodopayments.com/developer-resources/webhooks.md)
* **Mount route handlers in your framework** using the official adapters — [Framework adaptors](https://docs.dodopayments.com/developer-resources/framework-adaptors.md)
* **Wire BillingSDK React components** for pricing tables and subscription management — [BillingSDK](https://docs.dodopayments.com/developer-resources/billingsdk.md)
* **Author license-key flows** for digital products — [License keys](https://docs.dodopayments.com/features/license-keys.md)
* **Implement credit-based billing** with entitlements, balances, rollover, and overage — [Credits](https://docs.dodopayments.com/features/credit-based-billing.md)
* **Build and manage your product catalog** with add-ons and collections — [Products](https://docs.dodopayments.com/features/products.md), [Add-ons](https://docs.dodopayments.com/features/addons.md), [Product collections](https://docs.dodopayments.com/features/product-collections.md)
* **Add discounts and localized pricing** — [Discount codes](https://docs.dodopayments.com/features/discount-codes.md), [Localized pricing](https://docs.dodopayments.com/features/localized-pricing.md), [Adaptive currency](https://docs.dodopayments.com/features/adaptive-currency.md)
* **Ship mobile in-app checkout** for React Native, Flutter, iOS, and Android — [Mobile integration](https://docs.dodopayments.com/developer-resources/mobile-integration.md)
* **Handle refunds, disputes, and customer self-service** — [Refunds](https://docs.dodopayments.com/features/transactions/refunds.md), [Disputes](https://docs.dodopayments.com/features/transactions/disputes.md), [Customer portal](https://docs.dodopayments.com/features/customer-portal.md)
* **Test the integration and go live safely** — [Test mode vs live mode](https://docs.dodopayments.com/miscellaneous/test-mode-vs-live-mode.md)

## Security and Best Practices

> [!WARNING]
>
> Never commit live API keys. Use [test mode](https://docs.dodopayments.com/miscellaneous/test-mode-vs-live-mode.md) during development.

* **Use test mode first.** Build and test your integration with a test mode API key before you go live. See [Test Mode vs Live Mode](https://docs.dodopayments.com/miscellaneous/test-mode-vs-live-mode.md).
* **OAuth is the default.** The Agent Plugin authenticates via browser OAuth (no local secrets). Only use API-key mode if you need it.
* **Review agent-generated code.** Always verify webhook handlers include signature verification following the [Standard Webhooks spec](https://standardwebhooks.com/).

## Common Configuration Gotchas

### Subscription Period Is Not the Billing Cycle

> [!WARNING]
>
> The subscription period (`subscription_period_count` and `subscription_period_interval`) defines when the subscription expires, not how often it charges. The payment frequency (`payment_frequency_count` and `payment_frequency_interval`) sets how often it charges. Setting both the subscription period and the payment frequency to 1 month creates a subscription that charges once and then expires — not a monthly recurring subscription. For ongoing subscriptions, set the subscription period to 20 years (the recommended value and the maximum) with your desired payment frequency (for example, 1 month). See the [Subscription Integration Guide](https://docs.dodopayments.com/developer-resources/subscription-integration-guide.md) for full details.

### Use Checkout Sessions, Not Direct Payment Endpoints

> [!TIP]
>
> `POST /payments` and `POST /subscriptions` are deprecated. For all new integrations, create payments and subscriptions through [Checkout Sessions](https://docs.dodopayments.com/developer-resources/checkout-session.md) (`POST /checkouts`). Checkout Sessions support both one-time payments and subscriptions, and provide a more complete API surface.

### Always Verify Webhook Signatures

> [!TIP]
>
> Never process webhook events without verifying the signature. Use the Standard Webhooks specification to validate every incoming event with your webhook signing secret. See [Webhook Integration](https://docs.dodopayments.com/developer-resources/webhooks.md) for implementation details.

## Configure with an API Key

By default, the Agent Plugin uses the remote MCP server with browser OAuth. To use a local API key instead, for example in CI or on a headless server, switch to stdio mode.

> [accordion] Local API key mode — Claude Code
>
> Add the local stdio server with your key in the environment, so the key never goes into a file in your repository:
>
> ```bash theme={null}
> claude mcp add dodopayments --scope user \
>   --env DODO_PAYMENTS_API_KEY="$DODO_PAYMENTS_API_KEY" \
>   --env DODO_PAYMENTS_ENVIRONMENT=test_mode \
>   -- npx -y dodopayments-mcp@latest
> ```
>
> Use a test mode key while you build. See [MCP Server](https://docs.dodopayments.com/developer-resources/mcp-server.md#advanced-local-server-with-an-api-key) for the local server's requirements.

> [accordion] Local API key mode — OpenCode
>
> Declare `dodopayments` yourself in `opencode.json` — your entry wins over the plugin's default remote server:
>
> ```json theme={null}
> {
>   "$schema": "https://opencode.ai/config.json",
>   "plugin": ["@dodopayments/opencode-plugin"],
>   "mcp": {
>     "dodopayments": {
>       "type": "local",
>       "command": ["npx", "-y", "dodopayments-mcp@latest"],
>       "environment": {
>         "DODO_PAYMENTS_API_KEY": "dodo_test_...",
>         "DODO_PAYMENTS_WEBHOOK_KEY": "whsec_...",
>         "DODO_PAYMENTS_ENVIRONMENT": "test_mode"
>       },
>       "enabled": true
>     }
>   }
> }
> ```
>
> Restart OpenCode to apply.

## Next Steps

> [card] [MCP Server](https://docs.dodopayments.com/developer-resources/mcp-server.md)
>
> Full reference for the MCP server — all supported clients, configuration, and available tools

> [card] [Agent Skills](https://docs.dodopayments.com/developer-resources/agent-skills.md)
>
> Individual skill installation, skill reference, and per-agent setup instructions

> [card] [API Reference](https://docs.dodopayments.com/api-reference/introduction.md)
>
> Complete OpenAPI reference for all Dodo Payments endpoints


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