# x402 Micro Tollgate

> x402 Micro Tollgate is an open-source MCP server. x402 HTTP 402 + MCP paywall: charge USDC per agent call. Self-host via npx or Docker. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/kevin2003050666-coder/x402-micro-tollgate
- **MCP Registry name:** io.github.kevin2003050666-coder/x402-micro-tollgate
- **Listing updated:** 2026-11-13

## About

x402 HTTP 402 + MCP paywall: charge USDC per agent call. Self-host via npx or Docker.

## Install

### Claude Code (Terminal)

```sh
claude mcp add x402-micro-tollgate --env CDP_API_KEY_ID='<CDP_API_KEY_ID>' --env CDP_API_KEY_SECRET='<CDP_API_KEY_SECRET>' -- npx -y x402-micro-tollgate
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "x402-micro-tollgate": {
      "command": "npx",
      "args": [
        "-y",
        "x402-micro-tollgate"
      ],
      "env": {
        "CDP_API_KEY_ID": "<CDP_API_KEY_ID>",
        "CDP_API_KEY_SECRET": "<CDP_API_KEY_SECRET>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "x402-micro-tollgate": {
      "command": "npx",
      "args": [
        "-y",
        "x402-micro-tollgate"
      ],
      "env": {
        "CDP_API_KEY_ID": "<CDP_API_KEY_ID>",
        "CDP_API_KEY_SECRET": "<CDP_API_KEY_SECRET>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "x402-micro-tollgate": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "x402-micro-tollgate"
      ],
      "env": {
        "CDP_API_KEY_ID": "<CDP_API_KEY_ID>",
        "CDP_API_KEY_SECRET": "<CDP_API_KEY_SECRET>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "x402-micro-tollgate": {
      "command": "npx",
      "args": [
        "-y",
        "x402-micro-tollgate"
      ],
      "env": {
        "CDP_API_KEY_ID": "<CDP_API_KEY_ID>",
        "CDP_API_KEY_SECRET": "<CDP_API_KEY_SECRET>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "x402-micro-tollgate": {
      "command": "npx",
      "args": [
        "-y",
        "x402-micro-tollgate"
      ],
      "env": {
        "CDP_API_KEY_ID": "<CDP_API_KEY_ID>",
        "CDP_API_KEY_SECRET": "<CDP_API_KEY_SECRET>"
      }
    }
  }
}
```

## FAQ

### Is x402 Micro Tollgate free?

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

### How do I add x402 Micro Tollgate to Claude Code?

Run this command in your terminal: claude mcp add x402-micro-tollgate --env CDP_API_KEY_ID='<CDP_API_KEY_ID>' --env CDP_API_KEY_SECRET='<CDP_API_KEY_SECRET>' -- npx -y x402-micro-tollgate

---
Source: https://ai-powered.com/mcp/x402-micro-tollgate
