The Dodo Payments MCP Server provides an interface to connect with the Dodo Payments API using the Model Context Protocol. It allows AI agents and applications to interact with payment processing features through structured tools and endpoints.
You can run the MCP Server directly via npx with your API credentials:
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
If you're using an existing MCP client, you can add the Dodo Payments MCP server to your configuration. Here's a sample configuration:
{
"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"
}
}
}
}
There are two primary ways to expose API endpoints as tools:
You can filter which endpoints are exposed using various command-line options:
# Include only card-related read operations
--resource=cards --operation=read
# Include all card and account resources except create_cards
--resource=cards,accounts --no-tool=create_cards
When you specify --tools=dynamic, the server exposes three special tools:
list_api_endpoints - Discovers available endpoints with optional filteringget_api_endpoint_schema - Gets detailed schema for a specific endpointinvoke_api_endpoint - Executes endpoints with appropriate parametersThis approach gives you access to the full API while only loading schemas when needed.
Different AI clients have varying capabilities for handling tools and schemas. Specify your client type for optimized compatibility:
--client=claude
Available clients include openai-agents, claude, claude-code, and cursor.
You can also set specific capabilities:
--capability=top-level-unions --capability=tool-name-length=40
For remote access, use the HTTP transport option:
npx -y dodopayments-mcp@latest --transport=http --port=3000
You can then configure your MCP client to connect to this server:
{
"mcpServers": {
"dodopayments_api": {
"url": "http://localhost:3000",
"headers": {
"Authorization": "Bearer <auth value>"
}
}
}
}
Filter parameters can be added as query parameters:
http://localhost:3000?resource=cards&no_tool=create_cards
You can also import and use the MCP server in your code:
// Import the server components
import { server, endpoints, init } from "dodopayments-mcp/server";
// Import specific tools
import createCheckoutSessions from "dodopayments-mcp/tools/checkout-sessions/create-checkout-sessions";
// Initialize the server
init({ server, endpoints });
// Start the server
const transport = new StdioServerTransport();
await server.connect(transport);
The MCP server provides access to numerous payment processing tools organized by resource categories:
Each tool provides a specific function for interacting with the Dodo Payments API, with appropriate input schemas and handlers to process requests and return responses.
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