Skip to content
MCP server

x402-market

Let AI agents pay-per-call for any HTTP API via x402 on Base mainnet. One tool…

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
0.2.0-alpha.1
Listing updated
5 days ago

About x402-market

x402-market is an open-source MCP server. It runs locally on your machine and is started by your AI client.

Let AI agents pay-per-call for any HTTP API via x402 on Base mainnet. One tool: pay_and_call.

Install

Run in a terminal

claude mcp add mcp-server --env MCP_BUYER_PRIVATE_KEY='<MCP_BUYER_PRIVATE_KEY>' -- npx -y @x402-market/mcp-server

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-market/mcp-server"
      ],
      "env": {
        "MCP_BUYER_PRIVATE_KEY": "<MCP_BUYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-market/mcp-server"
      ],
      "env": {
        "MCP_BUYER_PRIVATE_KEY": "<MCP_BUYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@x402-market/mcp-server"
      ],
      "env": {
        "MCP_BUYER_PRIVATE_KEY": "<MCP_BUYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-market/mcp-server"
      ],
      "env": {
        "MCP_BUYER_PRIVATE_KEY": "<MCP_BUYER_PRIVATE_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@x402-market/mcp-server"
      ],
      "env": {
        "MCP_BUYER_PRIVATE_KEY": "<MCP_BUYER_PRIVATE_KEY>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • MARKET_API_URLMarketplace API base URL.
  • MCP_BUYER_PRIVATE_KEYFunded buyer wallet private key (0x-prefixed). Required for pay_and_call; read-only tools work without it.
  • BASE_RPC_URLBase RPC endpoint. Defaults to Base mainnet public RPC; Alchemy/QuickNode recommended for higher rate limits.
  • BASE_CHAIN_ID8453 = Base mainnet (default, matches live listings). 84532 = Base Sepolia testnet.
  • MCP_MAX_PRICEHard cap on per-call cost (USDC). Refuses to pay above this.

Pricing

Open source

Prices change. Check x402-market-api.lien-studio-akiyama.workers.dev before you buy.

x402-market FAQ

Is x402-market free?

Yes. x402-market is open source, so you can use and self-host it for free.

How do I add x402-market to Claude Code?

Run this command in your terminal: claude mcp add mcp-server --env MCP_BUYER_PRIVATE_KEY='<MCP_BUYER_PRIVATE_KEY>' -- npx -y @x402-market/mcp-server

Where this comes from

  • Description: from the official MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers