home / mcp / coinbase commerce mcp server

Coinbase Commerce MCP Server

MCP server for generating Coinbase Commerce payment links

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "zhangzhongnan928-mcp-coinbase-commerce": {
      "command": "node",
      "args": [
        "/path/to/mcp-coinbase-commerce/dist/index.js"
      ],
      "env": {
        "COINBASE_COMMERCE_API_KEY": "your_api_key_here"
      }
    }
  }
}

You run a dedicated MCP server that connects to Coinbase Commerce to generate cryptocurrency payment links. It lets you create customizable payment charges and look up existing charges, all managed through secure API access and MCP-compatible clients.

How to use

You connect this MCP server to your MCP-enabled assistant or client to generate Coinbase Commerce payment links. Provide the desired amount, currency, and a description, and the server returns a payment link you can share with customers. You can also query the status or details of existing charges using the available tools.

How to install

Prerequisites you need on your machine before starting:

  • Node.js 16.0+
  • A Coinbase Commerce account
  • Coinbase Commerce API key

How to install

Step 1: Set up the project locally

# Step 1: Clone the project
# Copy and adjust the repository URL if needed
# git clone https://github.com/zhangzhongnan928/mcp-coinbase-commerce.git
# cd mcp-coinbase-commerce

# Step 2: Install dependencies
# npm install

How to install

Step 2: Configure environment and build

# Copy the example environment file and set your API key
# cp .env.example .env
# Edit .env and insert your Coinbase Commerce API key

# Step 3: Build the project
# npm run build

How to install

Step 3: Run the server

# Start the MCP server
# npm start

Configuration for MCP clients

To connect a client (for example, Claude or another MCP-compatible helper) to this server, run the server locally and expose it to your MCP client as shown below. The client should invoke the MCP server using the provided command and environment configuration.

{
  "mcpServers": {
    "coinbase-commerce": {
      "command": "node",
      "args": ["/path/to/mcp-coinbase-commerce/dist/index.js"],
      "env": {
        "COINBASE_COMMERCE_API_KEY": "your_api_key_here"
      }
    }
  }
}

Security and keys

Keep your Coinbase Commerce API key secure. Do not expose it in client-side code or share it in logs. Use a secure environment and rotate keys if you suspect exposure.

API Tools

The server provides two core tools to manage Coinbase Commerce charges.

Creating a charge

Tool: create-charge. Use this to generate a new payment link with a name, description, amount, currency, and optional redirect URL after payment.

Getting charge information

Tool: get-charge. Retrieve details about an existing charge using its chargeId.

Development

For development, run the server in development mode to enable hot-reload and faster testing.

# Development mode
npm run dev

Testing and inspection

You can test the server interactively using the MCP Inspector tool to verify responses and behavior.

npx @modelcontextprotocol/inspector node dist/index.js

Notes

This server is designed to integrate with MCP-compatible assistants to streamline the creation and management of Coinbase Commerce payment links.

Available tools

create-charge

Generates a new payment link with a name, description, amount, currency, and optional redirect URL after payment.

get-charge

Retrieves details about an existing charge using its chargeId.