This MCP Coinbase Commerce Server connects to the Coinbase Commerce API, allowing AI assistants like Claude to generate cryptocurrency payment links and handle transactions. It's designed to be easy to integrate with MCP-compatible AI assistants to create payment workflows.
Clone the repository:
git clone https://github.com/zhangzhongnan928/mcp-coinbase-commerce.git
cd mcp-coinbase-commerce
Install dependencies:
npm install
Set up your environment variables:
cp .env.example .env
Edit the .env
file to add your Coinbase Commerce API key
Build the project:
npm run build
Start the server:
npm start
To use this server with Claude for Desktop:
Open Claude for Desktop
Navigate to Claude menu → Settings → Developer
Click "Edit Config" to open claude_desktop_config.json
Add the MCP server configuration:
{
"mcpServers": {
"coinbase-commerce": {
"command": "node",
"args": ["/path/to/mcp-coinbase-commerce/dist/index.js"],
"env": {
"COINBASE_COMMERCE_API_KEY": "your_api_key_here"
}
}
}
}
Save the file and restart Claude for Desktop
The hammer icon in the chat interface indicates that the tools are available
You can ask Claude to perform payment-related tasks using natural language. Here are some example prompts:
The create-charge
tool generates a new payment link with these parameters:
name
: Name of the payment/productdescription
: Description of what the payment is foramount
: Payment amount (e.g., "10.00")currency
: Currency code (e.g., "USD", "EUR", "BTC")redirectUrl
(optional): URL to redirect after payment completesThe get-charge
tool retrieves information about an existing payment using:
chargeId
: ID of the charge to retrieveYou can test the server's functionality using the MCP Inspector tool:
npx @modelcontextprotocol/inspector node dist/index.js
This will allow you to verify that the server is working correctly before connecting it to Claude.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "coinbase-commerce" '{"command":"node","args":["/path/to/mcp-coinbase-commerce/dist/index.js"],"env":{"COINBASE_COMMERCE_API_KEY":"your_api_key_here"}}'
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": {
"coinbase-commerce": {
"command": "node",
"args": [
"/path/to/mcp-coinbase-commerce/dist/index.js"
],
"env": {
"COINBASE_COMMERCE_API_KEY": "your_api_key_here"
}
}
}
}
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": {
"coinbase-commerce": {
"command": "node",
"args": [
"/path/to/mcp-coinbase-commerce/dist/index.js"
],
"env": {
"COINBASE_COMMERCE_API_KEY": "your_api_key_here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect