No keypair file needed. Run Phantom MCP alongside Akca MCP — your AI agent pays with your Phantom wallet automatically. Claude sees a 402, Phantom signs the USDC transfer, done.
Phantom MCP Setup
Don't want to manage a keypair file? Use Phantom MCP as your wallet. Your AI agent handles the payment flow automatically — no private keys on disk.
🤖
AI Agent
calls akca tool
🔴
HTTP 402
payment required
Phantom MCP
signs USDC tx
✅
Retry
with tx signature
🟢
200 OK
proxy / vpn config
Claude Desktop & Claude Code
Add both servers to your MCP config. Claude auto-discovers both and handles the payment handoff.
# Add both MCP servers$claude mcp add akca -- npx -y @akcanetwork/mcp-server$claude mcp add phantom -- npx -y @phantom/mcp-server# Ask Claude anything — it handles the 402 + Phantom payment"Proxy this URL through Germany""Connect me to the US VPN"
No SOLANA_KEYPAIR_PATH needed.
When no keypair is configured, Akca tools return payment details instead of auto-paying.
Claude uses Phantom's transfer_tokens to complete the payment, then retries with the signature.
Your Phantom wallet stays in your control.
Prerequisites
x402 uses USDC on Solana mainnet for payments. You need:
Requirement
Details
Solana Keypair
A JSON file containing your private key (Solana CLI format)
USDC Balance
Minimum 0.01 USDC on Solana mainnet
SOL Balance
~0.005 SOL for transaction fees (~$0.01)
Node.js
v18+ (for SDK and MCP server)
No accounts, no API keys.
x402 is fully permissionless. Your Solana wallet IS your identity.
The SDK auto-signs USDC transfers when a 402 response is received.
Wallet Setup
Create a Solana keypair and fund it with USDC. The SDK uses this to auto-sign payment transactions.
1. Create Keypair
# Install Solana CLI (if not installed)$sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"# Create a new keypair$solana-keygen new -o ~/akca-wallet.json# View your public address$solana address -k ~/akca-wallet.jsonFgTmb5SQnSyG16jFVwEnPZHDPZjgoTnsdmbCAAGCoCSL
2. Fund with USDC
# Get USDC on Solana mainnet via:Option A: DEX Swap SOL → USDC on Jupiter (jup.ag) or RaydiumOption B: CEX Buy USDC on Coinbase/Binance, withdraw to Solana addressOption C: Bridge Bridge USDC from Ethereum/Polygon via Wormhole or Allbridge# USDC contract on Solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Security: Never commit your keypair file to git.
Use environment variables or a secrets manager in production.
The keypair file contains your private key — anyone with it can spend your USDC.
SDK Installation
The npm SDK handles 402 responses, USDC payments, and session cookies automatically.
Auto-install supports:
Ubuntu/Debian (apt), Fedora/RHEL (dnf), Arch (pacman), macOS (brew).
Prefers AmneziaWG (DPI bypass), falls back to standard WireGuard.
Requires sudo for tunnel management.
MCP Server — AI Agent Setup
Give any MCP-compatible AI agent anonymous proxy and VPN access.
The MCP server loads a local Solana keypair and auto-pays USDC when the agent calls a tool.
Your agent doesn't need to know about wallets or payments.
Phantom MCP
Claude Desktop
Claude Code
ChatGPT
Cursor
Claude Desktop
Add to your claude_desktop_config.json (Settings → Developer → Edit Config).
Run a single command to add the MCP server to your Claude Code session. Claude Code auto-discovers the tools.
Terminal
# Add Akca MCP server to Claude Code$claude mcp add akca -- npx -y @akcanetwork/mcp-server# Set the keypair path$export SOLANA_KEYPAIR_PATH=~/akca-wallet.json# Now just ask Claude:"Proxy this URL through a German exit node""Get me a VPN config for the US server""What exit countries are available?"
ChatGPT (Actions / Plugins)
Use with ChatGPT via a local MCP bridge or direct HTTP calls. Point your action schema at the x402 API.
akca_proxy_fetch Proxy any URL through Akca exit nodes Input: { url, method?, headers?, country? } Cost: 0.001 USDC/request (auto-paid)akca_vpn_connect Start a VPN session, returns WireGuard config Input: { serverId, duration? } Cost: 0.50 USDC/24h (auto-paid)akca_list_servers List available proxy/VPN exit countries Input: {} Cost: Free
Env Variable
Required
Description
SOLANA_KEYPAIR_PATH
Yes
Path to Solana keypair JSON file with USDC
SOLANA_RPC_URL
No
Custom RPC endpoint (default: mainnet-beta)
AKCA_API_URL
No
Custom API URL (default: api.akca.network)
Important: The SOLANA_KEYPAIR_PATH must point to a keypair file with USDC on Solana mainnet.
Without it, the MCP server cannot make payments and all paid tools will fail.
Raw HTTP — Any Language
Don't want to use the SDK? Send raw HTTP requests from any language.
Just handle the 402 response yourself.
x402 Flow (curl)
# Step 1: Send request (will get 402)$curl -s -X POST https://api.akca.network/x402/proxy/fetch \ -H "Content-Type: application/json" \ -H "X-402-Client: true" \ -d '{"url":"https://example.com"}'# Response: 402 Payment Required# { "accepts": [{ "payTo": "ATA...", "maxAmountRequired": "0.001", ... }] }# Step 2: Send USDC transfer on Solana (your code)# Transfer 0.001 USDC to the "payTo" ATA address# Get the transaction signature# Step 3: Retry with payment proof$curl -s -X POST https://api.akca.network/x402/proxy/fetch \ -H "Content-Type: application/json" \ -H "X-402-Client: true" \ -H "X-PAYMENT: 5yNx3...txSignature" \ -d '{"url":"https://example.com"}'# Response: 200 OK + Set-Cookie: x402_session=...
Headers:X-402-Client: true (required to see payment details) +
X-PAYMENT: <solana-tx-signature> (after paying).
The session cookie is returned as Set-Cookie — include it in subsequent requests to avoid re-payment.
API Reference
Base URL: https://api.akca.network
GET/x402/proxy/servers
Free
List proxy exit countries and load
GET/x402/vpn/servers
Free
List VPN servers (id, name, country, load)
GET/x402/vpn/pricing
Free
VPN pricing tiers and durations
POST/x402/proxy/fetch
0.001 USDC
Proxy a single HTTP request. Body: { url, method?, headers?, body?, country? }