X402 Payment Gateway Server
FreeNot checkedEnables AI agents to make micropayments using USDC on Solana via the x402 protocol, supporting payment requests, on-chain verification, and revenue tracking.
About
Enables AI agents to make micropayments using USDC on Solana via the x402 protocol, supporting payment requests, on-chain verification, and revenue tracking.
README
MCP Server that enables micropayments between AI agents using USDC on Solana. Based on the x402 protocol (HTTP 402 Payment Required).
What is x402?
x402 is a protocol that lets AI agents pay for services automatically. When an agent calls a premium tool, it gets a "402 Payment Required" response with payment instructions. The agent pays via blockchain, then gets access.
Features
- Payment Requests — Create x402-compatible payment requests for any tool
- On-Chain Verification — Verify USDC payments directly on Solana
- Tool Pricing — Set per-call prices for individual tools
- Revenue Tracking — Dashboard with total revenue, per-tool breakdown
- Payment History — Full audit trail of all transactions
Installation
pip install x402-mcp-server
Configuration
Set your merchant wallet in .env:
MERCHANT_WALLET=YourSolanaWalletAddress
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
Usage with Claude Code
{
"mcpServers": {
"x402": {
"command": "uvx",
"args": ["x402-mcp-server"],
"env": {
"MERCHANT_WALLET": "YourSolanaWalletAddress"
}
}
}
}
Tools
| Tool | Description |
|---|---|
create_payment_request |
Create a 402 payment request for a tool |
verify_payment |
Verify on-chain USDC payment |
get_payment_status |
Check payment status |
set_tool_price |
Set price for a tool |
get_price_list |
View all tool prices |
list_payments |
Payment history |
get_revenue |
Revenue statistics |
Flow
Agent A x402 Gateway Agent B (Service)
| | |
|-- "Use premium tool" ---->| |
| |-- 402 Payment Required ---->|
|<-- Payment instructions --| |
| | |
|-- USDC payment on-chain ->| |
| |-- verify_payment ---------->|
| |<-- verified ----------------|
|<-- Access granted --------| |
More MCP Servers by AiAgentKarl
| Category | Servers |
|---|---|
| 🔗 Blockchain | Solana |
| 🌍 Data | Weather · Germany · Agriculture · Space · Aviation · EU Companies |
| 🔒 Security | Cybersecurity · Policy Gateway · Audit Trail |
| 🤖 Agent Infra | Memory · Directory · Hub · Reputation |
| 🔬 Research | Academic · LLM Benchmark · Legal |
License
MIT
Install X402 Payment Gateway Server in Claude Desktop, Claude Code & Cursor
unyly install x402-payment-gateway-mcp-serverInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add x402-payment-gateway-mcp-server -- uvx x402-mcp-serverFAQ
Is X402 Payment Gateway Server MCP free?
Yes, X402 Payment Gateway Server MCP is free — one-click install via Unyly at no cost.
Does X402 Payment Gateway Server need an API key?
No, X402 Payment Gateway Server runs without API keys or environment variables.
Is X402 Payment Gateway Server hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install X402 Payment Gateway Server in Claude Desktop, Claude Code or Cursor?
Open X402 Payment Gateway Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Stripe
Payments, customers, subscriptions
by Stripemalamutemayhem/unclick-agent-native-endpoints
110+ tools for AI agents spanning social media, finance, gaming, music, AU-specific services, and utilities. Zero-config local tools plus platform connectors. n
by malamutemayhemwhiteknightonhorse/APIbase
Unified API hub for AI agents with 56+ tools across travel (Amadeus, Sabre), prediction markets (Polymarket), crypto, and weather. Pay-per-call via x402 micropa
by whiteknightonhorsetrackerfitness729-jpg/sitelauncher-mcp-server
Deploy live HTTPS websites in seconds. Instant subdomains ($1 USDC) or custom .xyz domains ($10 USDC) on Base chain. Templates for crypto tokens and AI agent pr
Compare X402 Payment Gateway Server with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All finance MCPs
