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
Provider
Dodo Payments
Release date
Apr 07, 2025
Language
TypeScript
Package
Stats
1.1K downloads
16 stars

The Dodo Payments MCP Server provides a Model Context Protocol server for the Dodo Payments API, allowing AI assistants to interact with payment processing functionality through standardized tools.

Installation Options

Quick Start with npx

Run the MCP Server directly using npx with your authentication credentials:

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

Integration with MCP Clients

If you're using an existing MCP client, you can configure it to use the Dodo Payments MCP server. Your client configuration might look 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"
      }
    }
  }
}

Tool Configuration

Tool Exposure Methods

The server offers two approaches to expose API endpoints as tools:

  1. Individual Tools: Each endpoint is exposed as a separate tool
  2. Dynamic Discovery: Three special tools are provided to discover and invoke endpoints as needed

Filtering Endpoints and Tools

You can control which tools are exposed using various filtering options:

# Include only read operations for card resources
--resource=cards --operation=read

# Include card resources but exclude the create_cards tool
--resource=cards --no-tool=create_cards

# Include multiple resources with read operations
--resource=cards,accounts --operation=read

Dynamic Tools Mode

When using --tools=dynamic, the server exposes these specialized tools:

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

This approach prevents context overload while still providing access to the full API.

Client Compatibility

Specify your MCP client for better compatibility:

# Configure for Claude
--client=claude

# Configure for Cursor with custom tool name length
--client=cursor --capability=tool-name-length=40

Available client types:

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

Individual capabilities can be enabled:

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

Programmatic Usage

You can import and use the MCP server and tools in your code:

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

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

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

// Or start manually
const transport = new StdioServerTransport();
await server.connect(transport);

// Create a custom server with specific tools
const myServer = new McpServer(...);

// Initialize with custom configuration
init({ server: myServer, endpoints: [createPayments, myCustomEndpoint] });

Available Tools

The MCP server provides tools for various payment resources including:

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_products_images

And many more resources including licenses, discounts, refunds, disputes, and payouts.

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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