Coinbase Commerce MCP server

Enables cryptocurrency payment processing through Coinbase Commerce API with tools for generating payment links and retrieving transaction details
Back to servers
Setup instructions
Provider
zhangzhongnan928
Release date
Mar 05, 2025
Language
TypeScript

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.

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/zhangzhongnan928/mcp-coinbase-commerce.git
    cd mcp-coinbase-commerce
    
  2. Install dependencies:

    npm install
    
  3. Set up your environment variables:

    cp .env.example .env
    
  4. Edit the .env file to add your Coinbase Commerce API key

  5. Build the project:

    npm run build
    
  6. Start the server:

    npm start
    

Connecting to Claude for Desktop

To use this server with Claude for Desktop:

  1. Open Claude for Desktop

  2. Navigate to Claude menu → Settings → Developer

  3. Click "Edit Config" to open claude_desktop_config.json

  4. 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"
          }
        }
      }
    }
    
  5. Save the file and restart Claude for Desktop

  6. The hammer icon in the chat interface indicates that the tools are available

Using with Claude

You can ask Claude to perform payment-related tasks using natural language. Here are some example prompts:

  • "Can you create a payment link for $10 USD donations to my project?"
  • "Generate a Coinbase Commerce payment link for my coffee shop with a price of $5.50"
  • "Look up the payment status for charge ID 93e23c3e-8220-4e6c-9bc3-ea3548339621"

Available API Tools

Create a New Charge

The create-charge tool generates a new payment link with these parameters:

  • name: Name of the payment/product
  • description: Description of what the payment is for
  • amount: Payment amount (e.g., "10.00")
  • currency: Currency code (e.g., "USD", "EUR", "BTC")
  • redirectUrl (optional): URL to redirect after payment completes

Get Charge Information

The get-charge tool retrieves information about an existing payment using:

  • chargeId: ID of the charge to retrieve

Testing the Server

You 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.

How to install this MCP server

For Claude Code

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.

For Cursor

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.

Adding an MCP server to Cursor globally

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"
            }
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.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

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later