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
2.4K downloads
15 stars

The Dodo Payments MCP Server provides a Model Context Protocol implementation for the Dodo Payments API, enabling AI models to interact with payment processing functions through structured tools.

Installation Options

Quick Start with npx

Run the MCP Server directly using npx by setting your API credentials and executing:

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

Using with an MCP Client

If you're using an existing MCP client (available at modelcontextprotocol.io), you'll typically configure it with JSON 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_ENVIRONMENT": "live_mode"
      }
    }
  }
}

Configuring Tool Exposure

Filtering Endpoints

You can control which API endpoints are exposed as tools by using filters:

  • Tool-based filtering: Include specific tools by name
  • Resource-based filtering: Include all tools under a specific resource
  • Operation-based filtering: Include only read or write operations

Examples:

# Filter for read operations on cards
--resource=cards --operation=read

# Exclude specific tools while including others
--resource=cards --no-tool=create_cards

# Complex filtering with multiple criteria
--resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards

Dynamic Tool Discovery

With the --tools=dynamic option, the server exposes three special tools instead of individual endpoint tools:

  1. list_api_endpoints - Discovers available endpoints with optional filtering
  2. get_api_endpoint_schema - Gets detailed schema for a specific endpoint
  3. invoke_api_endpoint - Executes any endpoint with appropriate parameters

This approach allows access to all API endpoints without loading all schemas into context at once.

Client Compatibility

Specify your MCP client type to optimize compatibility:

--client=claude

Supported client types:

  • openai-agents
  • claude
  • claude-code
  • cursor

For fine-grained control, you can specify individual capabilities:

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

Available capabilities include:

  • top-level-unions
  • valid-json
  • refs
  • unions
  • formats
  • tool-name-length=N

Programmatic Usage

For advanced integration, you can import tools and server components:

// Import the server, generated endpoints, or the init function
import { server, endpoints, init } from "dodopayments-mcp/server";

// Import a specific tool
import createPayments from "dodopayments-mcp/tools/payments/create-payments";

// Initialize the server and all endpoints
init({ server, endpoints });

// Or initialize with specific tools
const myServer = new McpServer(...);
init({ server: myServer, endpoints: [createPayments, myCustomEndpoint] });

Available Tools

The MCP server provides tools for various payment processing functions grouped by resource:

Payments

  • create_payments
  • retrieve_payments
  • list_payments
  • retrieve_line_items_payments

Subscriptions

  • create_subscriptions
  • retrieve_subscriptions
  • update_subscriptions
  • list_subscriptions
  • change_plan_subscriptions
  • charge_subscriptions

Customers

  • create_customers
  • retrieve_customers
  • update_customers
  • list_customers
  • create_customers_customer_portal

Products

  • create_products
  • retrieve_products
  • update_products
  • list_products
  • delete_products
  • unarchive_products
  • update_files_products
  • update_products_images

Discounts

  • create_discounts
  • retrieve_discounts
  • update_discounts
  • list_discounts
  • delete_discounts

The server includes many additional tools for managing refunds, disputes, licenses, payouts, and more.

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