x402 Universal Payer
Pay any x402 endpoint on the open web: auto-paying bridge with Bazaar discovery and…
- Pricing
- Open source
- Runs
- Locally
- Version
- 1.0.2
- Listing updated
- 6 days ago
About x402 Universal Payer
x402 Universal Payer is an open-source MCP server. It runs locally on your machine and is started by your AI client.
Pay any x402 endpoint on the open web: auto-paying bridge with Bazaar discovery and spend caps.
Install
Run in a terminal
claude mcp add x402-bridge --env MCP_BRIDGE_EVM_PRIVATE_KEY='<MCP_BRIDGE_EVM_PRIVATE_KEY>' --env MCP_BRIDGE_SVM_PRIVATE_KEY='<MCP_BRIDGE_SVM_PRIVATE_KEY>' -- npx -y @three-ws/mcp-bridgeAdd to claude_desktop_config.json
{
"mcpServers": {
"x402-bridge": {
"command": "npx",
"args": [
"-y",
"@three-ws/mcp-bridge"
],
"env": {
"MCP_BRIDGE_EVM_PRIVATE_KEY": "<MCP_BRIDGE_EVM_PRIVATE_KEY>",
"MCP_BRIDGE_SVM_PRIVATE_KEY": "<MCP_BRIDGE_SVM_PRIVATE_KEY>"
}
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"x402-bridge": {
"command": "npx",
"args": [
"-y",
"@three-ws/mcp-bridge"
],
"env": {
"MCP_BRIDGE_EVM_PRIVATE_KEY": "<MCP_BRIDGE_EVM_PRIVATE_KEY>",
"MCP_BRIDGE_SVM_PRIVATE_KEY": "<MCP_BRIDGE_SVM_PRIVATE_KEY>"
}
}
}
}Add to .vscode/mcp.json
{
"servers": {
"x402-bridge": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@three-ws/mcp-bridge"
],
"env": {
"MCP_BRIDGE_EVM_PRIVATE_KEY": "<MCP_BRIDGE_EVM_PRIVATE_KEY>",
"MCP_BRIDGE_SVM_PRIVATE_KEY": "<MCP_BRIDGE_SVM_PRIVATE_KEY>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"x402-bridge": {
"command": "npx",
"args": [
"-y",
"@three-ws/mcp-bridge"
],
"env": {
"MCP_BRIDGE_EVM_PRIVATE_KEY": "<MCP_BRIDGE_EVM_PRIVATE_KEY>",
"MCP_BRIDGE_SVM_PRIVATE_KEY": "<MCP_BRIDGE_SVM_PRIVATE_KEY>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"x402-bridge": {
"command": "npx",
"args": [
"-y",
"@three-ws/mcp-bridge"
],
"env": {
"MCP_BRIDGE_EVM_PRIVATE_KEY": "<MCP_BRIDGE_EVM_PRIVATE_KEY>",
"MCP_BRIDGE_SVM_PRIVATE_KEY": "<MCP_BRIDGE_SVM_PRIVATE_KEY>"
}
}
}
}Using several servers? Build one config file with the MCP config generator.
Configuration
MCP_BRIDGE_EVM_PRIVATE_KEY0x-prefixed 32-byte hex private key that funds USDC payments on EVM chains (Base, Arbitrum, …). At least one of the EVM/SVM keys is required. Treat like cash — use a dedicated low-balance wallet.MCP_BRIDGE_SVM_PRIVATE_KEYSolana secret key that funds USDC payments: base58 64-byte secret key (Phantom / solana-keygen format) or a JSON array of 64 integers. At least one of the EVM/SVM keys is required. Treat like cash.MCP_BRIDGE_MAX_PRICE_PER_CALL_ATOMICPer-call spending cap in atomic units (USDC has 6 decimals). Payments above this abort with a clear reason.MCP_BRIDGE_MAX_TOTAL_ATOMICCumulative session spending ceiling in atomic units. Once total spend would exceed it, further payments abort until restart.MCP_BRIDGE_ALLOWED_PAYTOComma-separated payee allowlist. When set, any payment whose payTo address is not listed is refused.MCP_BRIDGE_ALLOWED_HOSTSComma-separated hostname allowlist for outbound paid requests. When set, any other host is refused before a request is signed.MCP_BRIDGE_ALLOW_HTTPSet to 1 to allow http:// targets (local development only). https is enforced otherwise.MCP_BRIDGE_DISCOVER_LIMITMax number of x402 Bazaar resources to register as dynamic tools at startup. Set 0 to disable discovery.MCP_BRIDGE_BAZAAR_URLx402 Bazaar discovery endpoint. Override to point at a self-hosted or alternative bazaar.MCP_BRIDGE_BATCH_DEPOSIT_MULTIPLIERHow many request-amounts to deposit at once when opening an EVM batch-settlement channel.MCP_BRIDGE_MAX_DEPOSIT_ATOMICHard cap in atomic units on a single batch-settlement channel deposit or top-up.X402_MCP_BRIDGE_CHANNELS_DIRDirectory for persisted batch-settlement channel state (survives client restarts).RPC_URL_8453Per-chain RPC override, one variable per chain id (RPC_URL_<chainId>, e.g. RPC_URL_8453 for Base). Defaults to viem's public RPC for that chain.
Pricing
Open source
Prices change. Check three.ws before you buy.
x402 Universal Payer FAQ
Is x402 Universal Payer free?
Yes. x402 Universal Payer is open source, so you can use and self-host it for free.
How do I add x402 Universal Payer to Claude Code?
Run this command in your terminal: claude mcp add x402-bridge --env MCP_BRIDGE_EVM_PRIVATE_KEY='<MCP_BRIDGE_EVM_PRIVATE_KEY>' --env MCP_BRIDGE_SVM_PRIVATE_KEY='<MCP_BRIDGE_SVM_PRIVATE_KEY>' -- npx -y @three-ws/mcp-bridge
Where this comes from
- Description: from the official MCP Registry entry.
- Install steps: from the official MCP Registry entry.