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.
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
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.
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
).
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);
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]
});
The server provides access to multiple payment-related resources for your applications:
Each tool is categorized by resource and operation type (read/write) to help you find the functionality you need.
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 > 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"
]
}
}
}
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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.