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
572 downloads
10 stars

Dodo Payments Node MCP Server provides a Model Context Protocol server for the Dodo Payments API. It allows you to integrate payment processing functionality into your applications by accessing various payment-related tools through a standardized protocol interface.

Installation Options

Quick Start with npx

You can run the MCP Server directly using npx by setting your API key as an environment variable:

export DODO_PAYMENTS_API_KEY="My Bearer Token"
npx -y dodopayments-mcp

Using with an MCP Client

Many MCP clients support configuration via JSON. A typical configuration might look like:

{
  "mcpServers": {
    "dodopayments_api": {
      "command": "npx",
      "args": ["-y", "dodopayments-mcp"],
      "env": {
        "DODO_PAYMENTS_API_KEY": "My Bearer Token"
      }
    }
  }
}

For client-specific setup instructions, refer to the documentation of your MCP client of choice. You can find a list of available clients at modelcontextprotocol.io.

Filtering Tools

For large APIs, you might want to filter the available tools to reduce the context window size. The server supports various filtering options:

# Include a specific tool
npx -y dodopayments-mcp --tool create_payments

# Include all tools for a specific resource
npx -y dodopayments-mcp --resource payments

# Include only read or write operations
npx -y dodopayments-mcp --operation read

# See all available tools
npx -y dodopayments-mcp --list

# Get help with all command options
npx -y dodopayments-mcp --help

You can combine multiple filters and also use exclusion versions (e.g., --no-tool).

Advanced Usage

Importing Tools and Server in JavaScript

For more control, you can import the server and tools directly in your code:

// Import the server, endpoints, or initialization 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 with all endpoints
init({ server, endpoints });

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

Creating Custom Endpoints

You can create your own custom endpoints and initialize the server with them:

// Create a custom server
const myServer = new McpServer();

// Define a custom endpoint
const myCustomEndpoint = {
  tool: {
    name: 'my_custom_tool',
    description: 'My custom tool',
    inputSchema: zodToJsonSchema(z.object({ a_property: z.string() })),
  },
  handler: async (client, args) => {
    return { myResponse: 'Hello world!' };
  }
};

// Initialize with custom endpoints alongside built-in ones
init({ 
  server: myServer, 
  endpoints: [createPayments, myCustomEndpoint] 
});

Available Tools

The server provides access to multiple payment-related resources for your applications:

Payment Management

  • Create, retrieve, and list payments
  • Manage subscriptions (create, retrieve, update, list, change plans, charge)
  • Handle invoices and refunds

Customer Management

  • Create, retrieve, update, and list customers
  • Create customer portal sessions

Product Management

  • Full CRUD operations for products
  • Update product images

License Management

  • Activate, deactivate, and validate licenses
  • Manage license keys and instances

Additional Tools

  • Handle disputes and payouts
  • Access webhook events
  • Manage discounts
  • List supported countries

Each tool is categorized by resource and operation type (read/write) to help you find the functionality you need.

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