# x402-market

> x402-market is an open-source MCP server. Let AI agents pay-per-call for any HTTP API via x402 on Base mainnet. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Website:** https://x402-market-api.lien-studio-akiyama.workers.dev
- **Repository:** https://github.com/asaishota/x402-market/tree/HEAD/packages/mcp-server
- **MCP Registry name:** io.github.AsaiShota/mcp-server
- **Listing updated:** 2026-11-13

## About

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

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

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

---
Source: https://ai-powered.com/mcp/x402-market
