x402 Wallet MCP Server
by nirholasio.github.nirholas/x402-mcpv0.2.2
Self-custodial x402 wallet for AI agents: pay any service in USDC or $THREE from your own key.
context tax
queued
security
queued
cold start
queued
freshness
Active2d ago
Install x402 Wallet MCP server
Install in Claude Code
claude mcp add x402-nirholas -e SOLANA_SECRET_KEY='<solana-secret-key>' -- npx -y @three-ws/x402-mcpInstall in Cursor
{
"mcpServers": {
"x402-nirholas": {
"command": "npx",
"args": [
"-y",
"@three-ws/x402-mcp"
],
"env": {
"SOLANA_SECRET_KEY": "<solana-secret-key>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"x402-nirholas": {
"command": "npx",
"args": [
"-y",
"@three-ws/x402-mcp"
],
"env": {
"SOLANA_SECRET_KEY": "<solana-secret-key>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"x402-nirholas": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@three-ws/x402-mcp"
],
"env": {
"SOLANA_SECRET_KEY": "<solana-secret-key>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"x402-nirholas": {
"command": "npx",
"args": [
"-y",
"@three-ws/x402-mcp"
],
"env": {
"SOLANA_SECRET_KEY": "<solana-secret-key>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| SOLANA_SECRET_KEY | — | yes | Base58 (or JSON byte-array) Solana secret key that signs payments and holds the USDC. Not needed for the read tools (find_services, inspect_endpoint, or x402_wallet with an explicit address). Treat like cash. |
| SOLANA_RPC_URL | — | — | Solana mainnet RPC endpoint. Defaults to the public cluster — bring your own (Helius / Quicknode / Triton) for production traffic. |
| MAX_PAY_USD | — | — | Max USD a single pay_and_call may spend. Bounds a runaway or injected payment. |
| REQUIRE_CONFIRM | — | — | When on (default), pay_and_call refuses until re-issued with confirm:true. Set 0/false to disable the gate. |
| THREE_WS_BASE | — | — | Base URL of the three.ws API that serves /api/bazaar/search for find_services. Override only when self-hosting. |
Freshness
Active — last maintenance signal 2d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-08 · 2d ago · GitHub
Latest release
2026-09-30 · 10d ago · GitHub · v1.5.2
Package published
no data · npm/PyPI
Registry entry updated
2026-08-19 · 51d ago · official registry · v0.2.2
FAQ
›How do I install the x402 Wallet MCP server in Claude Code?
Run: claude mcp add x402-nirholas -e SOLANA_SECRET_KEY='<solana-secret-key>' -- npx -y @three-ws/x402-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does x402 Wallet require an API key?
Yes. It expects SOLANA_SECRET_KEY, of which 1 is a secret.
›Can I use x402 Wallet as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is x402 Wallet in the official MCP registry?
Yes, as io.github.nirholas/x402-mcp.
Alternatives to x402 Wallet
Other finance & fintech MCP servers.