PrivadoVPN x402 Payer

io.github.privadovpn由 GitHub 账号 privadovpn 发布v1.1.1更新于 Oct 30, 2026

Local MCP server that signs x402 USDC payments (Solana, EVM) to buy PrivadoVPN access

已验证STDIO仅桌面云端与基础设施金融

概览

AI 生成的概览

本地 MCP 服务器,在 Solana 或 EVM 上签署 x402 USDC 付款,按次购买 PrivadoVPN 的 HTTP 与 SOCKS5 代理访问。

可以做什么
  • 查看已配置的钱包地址与首选网络
  • 列出可购买的 VPN 套餐、价格及所含代理服务
  • 一次调用完成购买:报价、签名并链上支付,然后保存凭据
  • 为已广播的付款补取凭据,无需再次付费
  • 仅签名并广播付款而不履约,可选 dry-run 余额检查
适用场景
适合让助手按需临时获取 VPN 或 SOCKS5 代理访问、以 USDC 按次付费而不订阅的场景。适用于需要几分钟、几小时或几天代理端点的智能体工作流。
运行要求
以 stdio 本地运行,通常通过 npx 和 Node.js 启动。需要 SOLANA_PRIVATE_KEY 或 EVM_PRIVATE_KEY 中至少一个,EVM 付款还需 EVM_RPC_URL;SOLANA_RPC_URL、PREFERRED_NETWORK 和 X402_BASE_URL 可选。钱包需持有 USDC,并能访问支付后端与 RPC 端点。
安装前请注意
需要在环境变量中提供私钥,可动用真实资金,应使用专用的低余额钱包。购买是真实的链上付款,资金已发出后重复调用 buy_vpn 可能导致重复扣款。代理凭据会写入本地目录,服务器只返回凭据,不会配置系统代理。

安装

在 SourceWeft 中

  1. 打开 控制台中的 PrivadoVPN x402 Payer,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@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.

[npm version] [CI] [license] [MCP registry]

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 IDDisplay NameDurationPrice
PREMIUMM15Premium M1515 minutes$0.05
PREMIUMX1Premium X11 hour$0.15
PREMIUMX3Premium X33 hours$0.39
PREMIUMD1Premium D124 hours$0.99
PREMIUMD7Premium D77 days$2.99
PREMIUMD30Premium D3030 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.

Security model

This server signs payments locally and never transmits your private key anywhere.

  • SOLANA_PRIVATE_KEY and EVM_PRIVATE_KEY are 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_URL to fulfill a purchase.
  • Use a dedicated, low-balance wallet for this server — never point it at a primary or high-balance wallet.
  • wallet_status returns 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

bash
npx -y @privadovpn/x402-mcp

Claude Desktop (claude_desktop_config.json):

json
{  "mcpServers": {    "privadovpn-x402-mcp": {      "command": "npx",      "args": ["-y", "@privadovpn/x402-mcp"],      "env": {        "SOLANA_PRIVATE_KEY": "<your-base58-key>"      }    }  }}

Claude Code:

bash
claude mcp add privadovpn-x402-mcp -e SOLANA_PRIVATE_KEY=<your-base58-key> -- npx -y @privadovpn/x402-mcp

Cursor (.cursor/mcp.json):

json
{  "mcpServers": {    "privadovpn-x402-mcp": {      "command": "npx",      "args": ["-y", "@privadovpn/x402-mcp"],      "env": {        "SOLANA_PRIVATE_KEY": "<your-base58-key>"      }    }  }}

Configuration

VariableRequiredDefaultDescription
SOLANA_PRIVATE_KEYAt least one of SOLANA_PRIVATE_KEY / EVM_PRIVATE_KEY—Base58-encoded Solana secret key (32 or 64 bytes) used to sign and pay in SPL USDC.
EVM_PRIVATE_KEYAt least one of SOLANA_PRIVATE_KEY / EVM_PRIVATE_KEY—Hex-encoded EVM private key used to sign EIP-3009 USDC authorizations.
PREFERRED_NETWORKNosolana if SOLANA_PRIVATE_KEY is set, else evmWhich network to prefer when a quote offers both. Accepts solana or evm (eip155 is an accepted alias for evm).
X402_BASE_URLNohttps://x402.privadovpn.comBase URL of the x402 payment backend used for catalog, quote, and fulfillment requests.
SOLANA_RPC_URLNohttps://api.mainnet-beta.solana.comSolana RPC endpoint used to check balances and broadcast transactions.
EVM_RPC_URLRequired for EVM payments—EVM RPC endpoint used to check balances and broadcast transactions.

Tools

ToolPurpose
wallet_statusShow configured wallet addresses and network selection. Never returns private keys.
list_vpn_catalogList purchasable VPN plans (including which services — HTTP proxy, SOCKS5 — each plan includes) and supported server country codes.
buy_vpnPreferred purchase flow: quote, sign and pay on-chain, fulfill, and save credentials in one call.
fulfill_paymentRecovery only: exchange an already-broadcast payment for VPN credentials.
sign_and_payDebug only: sign and broadcast payment without fulfilling. Prefer buy_vpn.

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:

FieldPresent whenDescription
vpn.port, vpn.connection_stringAlwaysHTTP proxy. connection_string is https://user:pass@host:port.
vpn.socks5_port, vpn.socks5_connection_stringPlan's services includes socks5_proxySOCKS5 proxy, same username/password as the HTTP proxy. socks5_connection_string is socks5://user:pass@host:port.

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:

bash
curl -x "$SOCKS5_CONNECTION_STRING" https://ifconfig.me

This 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

mermaid
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_path

Supported 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-payment
  • Agent-readable service description: https://x402.privadovpn.com/llms.txt
  • Remote MCP (catalog/docs only, no wallet access): https://x402.privadovpn.com/mcp

Development

bash
git clone [email protected]:privadovpn/x402-mcp.gitcd x402-mcpnpm installnpm run buildnpm test

Run with the MCP Inspector:

bash
npx @modelcontextprotocol/inspector node dist/index.js

License

MIT. See LICENSE.

mcp-name: io.github.privadovpn/x402-mcp

来源:README.md,提交 727e5ec

工具

0
SourceWeft 曾在隔离沙箱中以无凭据方式启动该软件包一次,以列出其工具,但未能完成:服务器未能启动。

版本历史

3
  1. v1.1.1最新Oct 30, 2026
  2. v1.1.0Oct 29, 2026
  3. v1.0.0Sep 28, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分