x402-mcp
You can buy and recover pay-per-use VPN/SOCKS5 proxy credentials using x402 USDC payments from a local MCP server.
Check configured wallet addresses and preferred network with
wallet_status, without exposing private keys.Fetch live VPN plans, prices, included services, and supported country codes with
list_vpn_catalog.Buy a VPN plan in one call with
buy_vpn: quote, sign/pay on-chain, fulfill, and save credentials.Recover credentials after a paid-but-unfulfilled purchase with
fulfill_payment, avoiding duplicate charges.Use
sign_and_payfor debugging to broadcast payment without fetching credentials.Pay via Solana SPL USDC or EVM EIP-3009 USDC, depending on configured keys and network preference.
Receive HTTP proxy credentials and, when included, SOCKS5 proxy credentials saved under
~/.privado/.Perform dry runs with balance checks for
buy_vpn/sign_and_paywithout broadcasting transactions.
Enables signing and broadcasting x402 USDC payments on the Solana network (SPL USDC transfer) to purchase PrivadoVPN access.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@x402-mcp buy a 1-month VPN plan with USDC and save the credentials"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@privadovpn/x402-mcp
Pay-per-use VPN and SOCKS5 proxy access for AI agents, powered by x402 USDC payments. Local stdio MCP server that signs and broadcasts payments (Solana, EVM); every plan includes both an HTTP proxy and a SOCKS5 proxy.
Pricing
No subscription required — pay only for the access you use, starting at $0.05. Plans and prices are never hardcoded in this client: list_vpn_catalog always fetches the live, authoritative list from the backend's .well-known/x402-payment manifest. As of 2026-10-21, the approved pricing lineup is:
Plan ID | Display Name | Duration | Price |
| Premium M15 | 15 minutes | $0.05 |
| Premium X1 | 1 hour | $0.15 |
| Premium X3 | 3 hours | $0.39 |
| Premium D1 | 24 hours | $0.99 |
| Premium D7 | 7 days | $2.99 |
| Premium D30 | 30 days | $5.99 |
Every plan currently includes both an HTTP proxy and a SOCKS5 proxy (the backend's catalog lists this per plan as services: ["http_proxy", "socks5_proxy"]) — there is no separate SOCKS5-only plan to choose. Always call list_vpn_catalog before purchasing — it returns the current, authoritative set of plans, prices, and included services.
Related MCP server: x402-mcp
Security model
This server signs payments locally and never transmits your private key anywhere.
SOLANA_PRIVATE_KEYandEVM_PRIVATE_KEYare read from local process environment variables. They are used only to sign transactions in-process and are never sent over the network or written to disk by this server.The only data that leaves the machine is a signed payment authorization (EVM EIP-3009) or a broadcast transaction signature (Solana), sent to
X402_BASE_URLto fulfill a purchase.Use a dedicated, low-balance wallet for this server — never point it at a primary or high-balance wallet.
wallet_statusreturns configured addresses and network selection only. It never returns private keys or any secret material.Credentials returned after a successful purchase (including proxy and SOCKS5 passwords) are written only to
~/.privado/on your local machine and are never logged to stdout/stderr by this server.
Quick start
npx -y @privadovpn/x402-mcpClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"privadovpn-x402-mcp": {
"command": "npx",
"args": ["-y", "@privadovpn/x402-mcp"],
"env": {
"SOLANA_PRIVATE_KEY": "<your-base58-key>"
}
}
}
}Claude Code:
claude mcp add privadovpn-x402-mcp -e SOLANA_PRIVATE_KEY=<your-base58-key> -- npx -y @privadovpn/x402-mcpCursor (.cursor/mcp.json):
{
"mcpServers": {
"privadovpn-x402-mcp": {
"command": "npx",
"args": ["-y", "@privadovpn/x402-mcp"],
"env": {
"SOLANA_PRIVATE_KEY": "<your-base58-key>"
}
}
}
}Configuration
Variable | Required | Default | Description |
| At least one of | — | Base58-encoded Solana secret key (32 or 64 bytes) used to sign and pay in SPL USDC. |
| At least one of | — | Hex-encoded EVM private key used to sign EIP-3009 USDC authorizations. |
| No |
| Which network to prefer when a quote offers both. Accepts |
| No |
| Base URL of the x402 payment backend used for catalog, quote, and fulfillment requests. |
| No |
| Solana RPC endpoint used to check balances and broadcast transactions. |
| Required for EVM payments | — | EVM RPC endpoint used to check balances and broadcast transactions. |
Tools
Tool | Purpose |
| Show configured wallet addresses and network selection. Never returns private keys. |
| List purchasable VPN plans (including which services — HTTP proxy, SOCKS5 — each plan includes) and supported server country codes. |
| Preferred purchase flow: quote, sign and pay on-chain, fulfill, and save credentials in one call. |
| Recovery only: exchange an already-broadcast payment for VPN credentials. |
| Debug only: sign and broadcast payment without fulfilling. Prefer |
Purchase flow and recovery
Each GET /pay request creates a new invoice on the server. Because of this, buy_vpn must be called exactly once per purchase attempt — calling it again after funds have already been sent creates a second invoice and results in a duplicate charge.
If buy_vpn reports that the on-chain payment succeeded but fulfillment failed (for example, due to a network error when exchanging the payment for credentials), do not call buy_vpn again. Instead call fulfill_payment with the plan, invoice_no, payment_signature, and settlement_tx values from the error. This exchanges the already-completed payment for credentials without creating a new invoice or sending additional funds.
buy_vpn and sign_and_pay both accept a dry_run flag that performs balance checks without broadcasting a transaction. Note that a dry run still creates a real invoice on the server; it does not need to be followed by a real purchase, but it should not be repeated for the same purchase attempt.
Credentials
A single purchase covers every service the plan includes — there is no separate checkout for SOCKS5. The vpn object returned by buy_vpn/fulfill_payment (and saved to ~/.privado/) contains:
Field | Present when | Description |
| Always | HTTP proxy. |
| Plan's | SOCKS5 proxy, same username/password as the HTTP proxy. |
This client does not parse or special-case these fields — whatever the backend returns is passed straight through to the agent and to the saved credentials file, so field names always match what list_vpn_catalog/buy_vpn actually return at the time of purchase.
Example of using a purchased SOCKS5 proxy with curl, once you have vpn.socks5_connection_string:
curl -x "$SOCKS5_CONNECTION_STRING" https://ifconfig.meThis server never configures system-wide or OS-level proxy settings — it only returns credentials. Routing any traffic through them is a separate, explicit step you take.
How it works
sequenceDiagram
participant Agent
participant MCP as Local MCP (this server)
participant Backend as x402.privadovpn.com
Agent->>MCP: buy_vpn(plan, country)
MCP->>Backend: GET /pay?plan=...
Backend-->>MCP: 402 Payment Required + quote (accepts[])
MCP->>MCP: sign payment locally (private key never leaves process)
MCP->>Backend: broadcast transaction on-chain
Backend-->>MCP: transaction confirmed
MCP->>Backend: GET /pay (PAYMENT-SIGNATURE, X-Settlement-Transaction)
Backend-->>MCP: VPN credentials
MCP-->>Agent: credentials + settlement_tx + credentials_pathSupported networks: Solana (SPL USDC transfer) and EVM (EIP-3009 transferWithAuthorization USDC).
Server-side discovery
Catalog and payment discovery:
https://x402.privadovpn.com/.well-known/x402-paymentAgent-readable service description:
https://x402.privadovpn.com/llms.txtRemote MCP (catalog/docs only, no wallet access):
https://x402.privadovpn.com/mcp
Development
git clone git@github.com:privadovpn/x402-mcp.git
cd x402-mcp
npm install
npm run build
npm testRun with the MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.jsLicense
MIT. See LICENSE.
mcp-name: io.github.privadovpn/x402-mcp
Available Tools
5 toolsbuy_vpnA
PREFERRED. Buy VPN in one call: quote → pay on-chain → fulfill → save credentials. Call ONCE per purchase. Do not use curl/shell against /pay. Do not call dry_run then buy again (each quote creates a new invoice). If this errors after payment, call fulfill_payment with the recovery fields from the error — never retry buy_vpn. One purchase covers every service the plan includes: the result's vpn object has port/connection_string for the HTTP proxy, and socks5_port/socks5_connection_string (same username/password) when the plan includes SOCKS5 — check list_vpn_catalog's services field beforehand.
Inputs: plan (required), country, dry_run, network.
fulfill_paymentA
Recovery only: exchange an already-broadcast payment for VPN credentials. Requires plan, invoice_no, payment_signature, settlement_tx from a prior buy_vpn/sign_and_pay. Does not create a new invoice or send money. Use when fulfill failed after payment — never call buy_vpn again. Returns the same vpn credential shape as buy_vpn, including socks5_port/socks5_connection_string when the plan includes SOCKS5.
Inputs: plan (required), invoice_no (required), settlement_tx (required), payment_signature (required), +1 more.
list_vpn_catalogA
List purchasable VPN plans (id, USD price, duration) and supported server country codes from X402_BASE_URL discovery. Each plan's services array indicates which protocols it includes (e.g. http_proxy, socks5_proxy); port is the HTTP proxy port and socks5_port is the SOCKS5 port (both only meaningful for services the plan actually includes) — check these before telling a user which plan to buy for SOCKS5 access.
Inputs: no named parameters.
sign_and_payA
DEBUG ONLY. Broadcasts on-chain payment and returns payment_signature + settlement_tx but does NOT fetch VPN credentials. Prefer buy_vpn. If you use this, you MUST next call fulfill_payment with the same invoice_no — never curl /pay and never call buy_vpn again (double charge).
Inputs: accepts (required), dry_run, network.
wallet_statusA
Show which wallets are configured (addresses only, never private keys).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The tools mostly target distinct steps: wallet status, catalog discovery, purchase, recovery, and debug payment. The only real overlap is between buy_vpn, sign_and_pay, and fulfill_payment, but the descriptions explicitly mark buy_vpn as preferred, sign_and_pay as debug-only, and fulfill_payment as recovery-only.
All names use snake_case, but the patterns are mixed: wallet_status is a noun phrase, list_vpn_catalog is verb_noun_noun, buy_vpn and fulfill_payment are verb_noun, and sign_and_pay joins verbs with 'and'. The set remains readable, but it does not follow a single predictable convention.
Five tools is well-scoped for a VPN purchase/payment workflow. Each tool has a clear role: status, discovery, purchase, recovery, and debug payment.
The surface covers the main lifecycle: checking wallets, discovering plans, buying VPN access, recovering a paid-but-unfulfilled purchase, and a debug payment path. A minor gap is that there is no direct way to retrieve or inspect previously purchased credentials without the recovery fields.
Maintenance
Related MCP Connectors
x402 V2 payment-to-access on Solana USDC with receipts, entitlements, atomic metering and webhooks.
AgentPayStore bridge plus x402 endpoints priced in USDC on Base.
Payment rails for AI agents. Pay merchants in USDC on Base. Dual-protocol: x402 + OKX APP.
Machine-payable API infrastructure for autonomous agents. Per-call x402 settlement in USDC.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to make micropayments using USDC on Solana via the x402 protocol, supporting payment requests, on-chain verification, and revenue tracking.MIT
- AlicenseAqualityCmaintenanceEnables AI agents to discover, inspect, and pay for paid HTTP and MCP services using USDC on Solana with a self-custodial wallet.49Apache 2.0

@hpp-io/x402-mcp-bridgeofficial
AlicenseNot gradedqualityBmaintenanceEnables AI agents to autonomously pay for and discover services using HPP USDC.e over the x402 protocol, without API keys or manual signing.224 npmApache 2.0- AlicenseNot gradedqualityCmaintenanceEnables AI agents to make pay-per-call USDC payments on Base via x402 for headless page rendering, temporary file hosting, scheduled callbacks, and pump.fun launch and trend feeds.MIT