Skip to content
VS Code

x402 Micro Tollgate for VS Code

io.github.kevin2003050666-coder/x402-micro-tollgate

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

client:VS Code transport:stdio runtime:npm

Install x402 Micro Tollgate in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "cdp-api-key-id",
      "description": "CDP_API_KEY_ID",
      "password": true
    },
    {
      "type": "promptString",
      "id": "cdp-api-key-secret",
      "description": "CDP_API_KEY_SECRET",
      "password": true
    },
    {
      "type": "promptString",
      "id": "x402-pay-to",
      "description": "X402_PAY_TO",
      "password": true
    },
    {
      "type": "promptString",
      "id": "upstream-url",
      "description": "UPSTREAM_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "price",
      "description": "PRICE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "network",
      "description": "NETWORK",
      "password": true
    },
    {
      "type": "promptString",
      "id": "x402-environment",
      "description": "X402_ENVIRONMENT",
      "password": true
    }
  ],
  "servers": {
    "x402-micro-tollgate": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "x402-micro-tollgate"
      ],
      "env": {
        "CDP_API_KEY_ID": "${input:cdp-api-key-id}",
        "CDP_API_KEY_SECRET": "${input:cdp-api-key-secret}",
        "X402_PAY_TO": "${input:x402-pay-to}",
        "UPSTREAM_URL": "${input:upstream-url}",
        "PRICE": "${input:price}",
        "NETWORK": "${input:network}",
        "X402_ENVIRONMENT": "${input:x402-environment}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

x402 Micro Tollgate in other clients