Dodo Payments MCP server

Provides a lightweight, serverless-compatible interface for AI-driven payment operations like billing, subscriptions, and customer management using the Dodo Payments API.
Back to servers
Setup instructions
Provider
Dodo Payments
Release date
Apr 07, 2025
Language
TypeScript
Package
Stats
11.0K downloads
28 stars

Dodo Payments MCP Server is a TypeScript-based Model Context Protocol server that provides tools for payment processing, checkout sessions, subscription management, and more. It's designed to integrate with various MCP clients and offers flexible configuration options for accessing Dodo Payments API functionalities.

Installation Options

Direct Installation with npx

You can quickly run the MCP Server directly using npx:

export DODO_PAYMENTS_API_KEY="My Bearer Token"
export DODO_PAYMENTS_WEBHOOK_KEY="My Webhook Key"
export DODO_PAYMENTS_ENVIRONMENT="live_mode"
npx -y dodopayments-mcp@latest

Using with an MCP Client

For MCP clients that support configuration JSON, you can use a setup similar to:

{
  "mcpServers": {
    "dodopayments_api": {
      "command": "npx",
      "args": ["-y", "dodopayments-mcp", "--client=claude", "--tools=dynamic"],
      "env": {
        "DODO_PAYMENTS_API_KEY": "My Bearer Token",
        "DODO_PAYMENTS_WEBHOOK_KEY": "My Webhook Key",
        "DODO_PAYMENTS_ENVIRONMENT": "live_mode"
      }
    }
  }
}

Editor-Specific Installation

For Cursor

You can set your environment variables in Cursor's mcp.json file, found in Cursor Settings > Tools & MCP > New MCP Server.

For VS Code

Configure environment variables in VS Code's mcp.json, which can be found via Command Palette > MCP: Open User Configuration.

For Claude Code

Run the following command in your terminal:

claude mcp add --transport stdio dodopayments_api --env DODO_PAYMENTS_API_KEY="Your DODO_PAYMENTS_API_KEY here." DODO_PAYMENTS_WEBHOOK_KEY="Your DODO_PAYMENTS_WEBHOOK_KEY here." -- npx -y dodopayments-mcp

Then set environment variables in Claude Code's .claude.json in your home directory.

Configuring Tool Exposure

There are three main approaches for exposing API endpoints as tools:

1. Endpoint-Specific Tools

Expose each endpoint as a separate tool with specific filtering:

--resource=cards --operation=read

2. Dynamic Discovery Tools

Use --tools=dynamic to expose three utility tools:

  • list_api_endpoints - Discovers available endpoints
  • get_api_endpoint_schema - Gets detailed schema for specific endpoints
  • invoke_api_endpoint - Executes endpoints with parameters

3. Code Execution Tools

Use --tools=code to expose:

  • search_docs - Searches API documentation
  • execute - Runs code against the TypeScript client

Client Compatibility Configuration

Configure for specific MCP clients using the --client parameter:

--client=cursor

Supported clients: openai-agents, claude, claude-code, cursor

You can also specify individual capabilities:

--capability=top-level-unions --capability=tool-name-length=40

Available capabilities include top-level-unions, valid-json, refs, unions, formats, and tool-name-length=N.

Running as a Remote Server

Launch with HTTP transport using:

--transport=http --port=3000

Create a configuration JSON for the remote server:

{
  "mcpServers": {
    "dodopayments_api": {
      "url": "http://localhost:3000",
      "headers": {
        "Authorization": "Bearer <auth value>"
      }
    }
  }
}

Advanced Configuration Examples

Filter for read operations on cards:

--resource=cards --operation=read

Exclude specific tools:

--resource=cards --no-tool=create_cards

Complex filtering with multiple criteria:

--resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards

Available Tools

The MCP server provides tools for managing:

  • Checkout sessions
  • Payments and invoices
  • Subscriptions and usage tracking
  • License management
  • Customer profiles and wallets
  • Refunds and disputes
  • Products and addons
  • Discounts and brands
  • Webhooks
  • Usage events and meters

Each tool is categorized by resource and operation type (read/write) with detailed descriptions for complex operations.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "dodopayments_api" '{"command":"npx","args":["-y","dodopayments-mcp","--client=claude","--tools=dynamic"],"env":{"DODO_PAYMENTS_API_KEY":"My Bearer Token","DODO_PAYMENTS_ENVIRONMENT":"live_mode"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "dodopayments_api": {
            "command": "npx",
            "args": [
                "-y",
                "dodopayments-mcp",
                "--client=claude",
                "--tools=dynamic"
            ],
            "env": {
                "DODO_PAYMENTS_API_KEY": "My Bearer Token",
                "DODO_PAYMENTS_ENVIRONMENT": "live_mode"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "dodopayments_api": {
            "command": "npx",
            "args": [
                "-y",
                "dodopayments-mcp",
                "--client=claude",
                "--tools=dynamic"
            ],
            "env": {
                "DODO_PAYMENTS_API_KEY": "My Bearer Token",
                "DODO_PAYMENTS_ENVIRONMENT": "live_mode"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later