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.
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
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"
}
}
}
}
You can set your environment variables in Cursor's mcp.json file, found in Cursor Settings > Tools & MCP > New MCP Server.
Configure environment variables in VS Code's mcp.json, which can be found via Command Palette > MCP: Open User Configuration.
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.
There are three main approaches for exposing API endpoints as tools:
Expose each endpoint as a separate tool with specific filtering:
--resource=cards --operation=read
Use --tools=dynamic to expose three utility tools:
list_api_endpoints - Discovers available endpointsget_api_endpoint_schema - Gets detailed schema for specific endpointsinvoke_api_endpoint - Executes endpoints with parametersUse --tools=code to expose:
search_docs - Searches API documentationexecute - Runs code against the TypeScript clientConfigure 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.
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>"
}
}
}
}
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
The MCP server provides tools for managing:
Each tool is categorized by resource and operation type (read/write) with detailed descriptions for complex operations.
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.json2. 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