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.
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
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"
}
}
}
}
You can control which API endpoints are exposed as tools by using filters:
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
With the --tools=dynamic
option, the server exposes three special tools instead of individual endpoint tools:
list_api_endpoints
- Discovers available endpoints with optional filteringget_api_endpoint_schema
- Gets detailed schema for a specific endpointinvoke_api_endpoint
- Executes any endpoint with appropriate parametersThis approach allows access to all API endpoints without loading all schemas into context at once.
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
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] });
The MCP server provides tools for various payment processing functions grouped by resource:
create_payments
retrieve_payments
list_payments
retrieve_line_items_payments
create_subscriptions
retrieve_subscriptions
update_subscriptions
list_subscriptions
change_plan_subscriptions
charge_subscriptions
create_customers
retrieve_customers
update_customers
list_customers
create_customers_customer_portal
create_products
retrieve_products
update_products
list_products
delete_products
unarchive_products
update_files_products
update_products_images
create_discounts
retrieve_discounts
update_discounts
list_discounts
delete_discounts
The server includes many additional tools for managing refunds, disputes, licenses, payouts, and more.
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.
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.
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"
}
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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