Skip to content
VS Code

p402 for VS Code

io.github.z333q/p402

Multi-provider AI router with x402 micropayment settlement on Base L2. 1% flat fee.

client:VS Code transport:stdio runtime:npm

Install p402 in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "p402-api-key",
      "description": "P402_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "p402-router-url",
      "description": "P402_ROUTER_URL",
      "password": true
    }
  ],
  "servers": {
    "p402": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@p402/mcp-server"
      ],
      "env": {
        "P402_API_KEY": "${input:p402-api-key}",
        "P402_ROUTER_URL": "${input:p402-router-url}"
      }
    }
  }
}

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

p402 in other clients