paidmcp-client is a local stdio MCP proxy for paid MCP servers that use x402.
It sits between your MCP client (Cursor or Claude Desktop) and a remote paid MCP endpoint, then handles payment negotiation and settlement automatically on each paid tool call.
- Node.js 20+
- npm
Use one of these options:
# run without installing globally
npx paidmcp-client --help
# or install globally
npm install -g paidmcp-clientAfter global install, use the paidmcp command directly:
paidmcp --help- Create a local payer wallet:
npx paidmcp-client initThis creates ~/.paidmcp/config.json with:
- your seed phrase
- RPC URLs for Base and Plasma
- token addresses for USDC (Base) and USDT0 (Plasma)
- Check wallet address and balances:
npx paidmcp-client wallet-
Fund the wallet with USDC on Base or USDT0 on Plasma.
-
Connect to your paid MCP endpoint:
npx paidmcp-client connect https://your-mcp-host.dev- Add the printed snippet to your MCP client config (Cursor or Claude Desktop).
npx paidmcp-client init
npx paidmcp-client wallet
npx paidmcp-client connect <endpoint>
npx paidmcp-client run <endpoint>Examples:
npx paidmcp-client connect http://localhost:4021
npx paidmcp-client run https://your-mcp-host.devGenerate a config snippet for a paid MCP endpoint:
npx paidmcp-client connect https://your-mcp-host.devThe command prints JSON like:
{
"mcpServers": {
"your-mcp-host-dev": {
"command": "node",
"args": ["/path/to/paidmcp-client/dist/cli.js", "run", "https://your-mcp-host.dev"]
}
}
}Paste this into your MCP config file and restart your MCP client if needed.
Inside client/:
npm install
npm run buildRun commands from source:
npm run init
npm run wallet
npm run connect -- http://localhost:4021
npm run run -- http://localhost:4021With MCP Inspector:
npx @modelcontextprotocol/inspector node dist/cli.js run http://localhost:4021Use one of:
npx paidmcp-client <command>npm install -g paidmcp-clientthenpaidmcp <command>- from source:
npm run <script>
If you see an error like Run "paidmcp init" first, create the local config:
npx paidmcp-client init- verify your wallet has funded USDC (Base) or USDT0 (Plasma)
- verify endpoint URL and network availability
- run
npx paidmcp-client walletto confirm balances are readable
~/.paidmcp/config.jsoncontains your seed phrase in plaintext.- Never commit or share this file.
- Back up your seed phrase securely. Losing it means losing access to funds.
MIT. See LICENSE.