> ## 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 two MCP servers and seventeen skills for building Dodo Payments integrations.

Install the Dodo Agent Plugin to give your coding agent two MCP servers and seventeen skills 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, Kiro, and OpenCode. Gemini CLI gets the two MCP servers only.

## Install the Plugin

Choose your coding agent below. Every install adds both MCP servers. All agents except Gemini CLI also add the seventeen skills. OpenCode needs one extra setting to load them, described in its section.

<AccordionGroup>
  <Accordion title="Claude Code" defaultOpen>
    Install from the marketplace:

    ```bash theme={null}
    claude plugins marketplace add dodopayments/dodo-agent-plugin
    claude plugins install dodopayments@dodopayments
    ```

    The API MCP server uses browser OAuth by default — no keys required at install time. The first time your agent calls a Dodo tool, you'll be prompted to sign in.

    <Card title="Dodo Agent Plugin on GitHub" icon="github" href="https://github.com/dodopayments/dodo-agent-plugin">
      Source code, configuration options, and local development instructions
    </Card>
  </Accordion>

  <Accordion title="Codex CLI">
    Register the marketplace, then install from the Codex TUI.

    <Steps>
      <Step title="Register the marketplace">
        ```bash theme={null}
        codex plugin marketplace add dodopayments/dodo-agent-plugin
        ```
      </Step>

      <Step title="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**.
      </Step>
    </Steps>

    Both MCP servers and all seventeen skills 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).
    </Note>
  </Accordion>

  <Accordion title="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>

  <Accordion title="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. Both MCP servers register 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 all seventeen. A skills path that doesn't exist is ignored silently, so verify rather than assume.
  </Accordion>

  <Accordion title="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>

  <Accordion title="Kiro">
    Kiro reads the Agent Plugins manifest natively.

    <Steps>
      <Step title="Clone the repository">
        ```bash theme={null}
        git clone https://github.com/dodopayments/dodo-agent-plugin.git
        ```
      </Step>

      <Step title="Open the Powers panel">
        In Kiro, open the Powers panel (the Ghosty icon with the lightning bolt).
      </Step>

      <Step title="Import the folder">
        Choose **Add Custom Power → Import power from a folder**, select the cloned directory (the one containing `plugin.json`), and click **Install**.
      </Step>
    </Steps>

    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>

  <Accordion title="Gemini CLI (MCP only)">
    Gemini CLI has no agent-skill primitive, so only the two MCP servers are available. `dodo-knowledge` covers a good share of what the skills provide and stays current automatically.

    ```bash theme={null}
    git clone https://github.com/dodopayments/dodo-agent-plugin.git \
      ~/.gemini/extensions/dodopayments
    ```

    Restart Gemini CLI. `gemini-extension.json` at the repo root is the manifest.
  </Accordion>
</AccordionGroup>

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

## What You Get

Once installed, your agent has access to two MCP servers and seventeen skills.

### MCP Servers

| Server | Purpose | Auth |
| - | - | - |
| `dodopayments-api` | Live API access — payments, subscriptions, customers, products, refunds, licenses, usage | OAuth (browser) |
| `dodo-knowledge` | Semantic search across all Dodo Payments documentation | None |

Both servers speak Streamable HTTP. The canonical `mcp.json` declares them natively, which spec-native clients like Codex CLI and Kiro use. The generated compatibility manifest `.mcp.json` wires them through `mcp-remote` for clients that can't dial Streamable HTTP directly.

### Agent Skills

| Skill | Description |
| - | - |
| `dodo-best-practices` | SDK setup, environments, API keys, and the canonical checkout-to-webhook architecture |
| `framework-adapters` | Official `@dodopayments/*` route handlers for Next.js, Express, Hono, Astro, Remix, SvelteKit, Nuxt, Fastify, TanStack, Bun, and Convex |
| `testing-and-go-live` | Test mode, test payment methods, webhook testing, and the production launch checklist |
| `checkout-integration` | Checkout Sessions, payment links, and overlay or inline checkout |
| `subscription-integration` | Subscription lifecycle, trials, plan changes, proration, and on-demand charges |
| `mobile-checkout` | In-app checkout for React Native, Flutter, iOS, and Android |
| `webhook-integration` | Receiving and verifying webhooks using the Standard Webhooks specification |
| `credit-based-billing` | Credit entitlements, balances, ledger, rollover, overage, and meter-based deduction |
| `usage-based-billing` | Meters, event ingestion, aggregation, and per-unit pricing |
| `license-keys` | License key activation, validation, and instance management |
| `product-catalog-management` | Products, pricing, add-ons, collections, images, and digital product delivery |
| `discounts-and-promotions` | Discount codes, eligibility rules, stacking, and subscription-cycle limits |
| `localized-pricing` | Localized pricing, adaptive currency, and purchasing power parity |
| `customer-management` | Customers, the self-service portal, saved payment methods, and wallets |
| `refunds-and-disputes` | Issuing refunds, handling disputes and chargebacks, and reconciling access |
| `billing-sdk` | BillingSDK React components for pricing tables and billing UI |
| `better-auth-integration` | The `@dodopayments/better-auth` plugin for customer sync, checkout, and portal access |

Skills load automatically — your agent picks the right one when it detects a relevant task. See [Agent Skills](/developer-resources/agent-skills) 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 `webhook-integration` skill, use the `dodo-knowledge` MCP 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 both MCP servers, plus the skills on every client that has a skill primitive.

| Agent | Install | Skills | MCP Servers |
| - | - | -: | -: |
| **Claude Code** | marketplace command | 17 | 2 |
| **Codex CLI** | marketplace command | 17 | 2 |
| **Cursor** | git clone | 17 | 2 |
| **VS Code / GitHub Copilot** | git clone | 17 | 2 |
| **Kiro** | git clone | 17 | 2 |
| **OpenCode** | npm | 17 | 2 |
| **Gemini CLI** | git clone | 0 | 2 |

OpenCode needs one extra `skills.paths` entry before its seventeen skills load. Gemini CLI has no agent-skill primitive, so skills are unavailable by design.

### Other MCP-Compatible Clients

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

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

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

## Security and Best Practices

<Warning>
  Never commit live API keys. Use [test mode](/miscellaneous/test-mode-vs-live-mode) during development.
</Warning>

* **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](/miscellaneous/test-mode-vs-live-mode).
* **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/).

## 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.

<AccordionGroup>
  <Accordion title="Local API key mode — Claude Code">
    Open `/plugins` in Claude Code, select **Dodo Payments**, and choose **Configure options**. Fill in:

    * `dodo_api_key` — your test mode or live mode API key
    * `dodo_webhook_key` — your webhook signing secret
    * `dodo_environment` — `test_mode` or `live_mode`

    Then edit `.mcp.json` to point `dodopayments-api` at the local stdio server:

    ```json theme={null}
    {
      "mcpServers": {
        "dodopayments-api": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "dodopayments-mcp@latest"],
          "env": {
            "DODO_PAYMENTS_API_KEY": "${user_config.dodo_api_key}",
            "DODO_PAYMENTS_WEBHOOK_KEY": "${user_config.dodo_webhook_key}",
            "DODO_PAYMENTS_ENVIRONMENT": "${user_config.dodo_environment}"
          }
        }
      }
    }
    ```

    Run `/reload-plugins` to apply changes.
  </Accordion>

  <Accordion title="Local API key mode — OpenCode">
    Declare `dodopayments-api` 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-api": {
          "type": "local",
          "command": ["npx", "-y", "dodopayments-mcp@latest"],
          "environment": {
            "DODO_PAYMENTS_API_KEY": "YOUR_TEST_MODE_API_KEY",
            "DODO_PAYMENTS_WEBHOOK_KEY": "whsec_...",
            "DODO_PAYMENTS_ENVIRONMENT": "test_mode"
          },
          "enabled": true
        }
      }
    }
    ```

    Restart OpenCode to apply.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="MCP Server" icon="terminal" href="/developer-resources/mcp-server">
    Full reference for both MCP servers — all supported clients, configuration, and available tools
  </Card>

  <Card title="Agent Skills" icon="wand-magic-sparkles" href="/developer-resources/agent-skills">
    Individual skill installation, skill reference, and per-agent setup instructions
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/introduction">
    Complete OpenAPI reference for all Dodo Payments endpoints
  </Card>
</CardGroup>


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