x402 Payment Gateway for AI Agents — micropayments using USDC on Solana
x402-mcp-server is an early-stage Python project in the AI payments / x402 ecosystem, focused on ai, ai-agent, mcp, mcp-server. It currently has 0 GitHub stars and 0 forks, and sits alongside related tools like p402-protocol, lightning-wallet-mcp, APIMesh, conway, mcp-client, x402-sdk.
MCP Server that enables micropayments between AI agents using USDC on Solana. Based on the x402 protocol (HTTP 402 Payment Required).
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.
pip install x402-mcp-server
Set your merchant wallet in .env:
MERCHANT_WALLET=YourSolanaWalletAddress
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
{
"mcpServers": {
"x402": {
"command": "uvx",
"args": ["x402-mcp-server"],
"env": {
"MERCHANT_WALLET": "YourSolanaWalletAddress"
}
}
}
}
| 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 |
Agent A x402 Gateway Agent B (Service)
| | |
|-- "Use premium tool" ---->| |
| |-- 402 Payment Required ---->|
|<-- Payment instructions --| |
| | |
|-- USDC payment on-chain ->| |
| |-- verify_payment ---------->|
| |<-- verified ----------------|
|<-- Access granted --------| |
| 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 |
MIT
P402 Payment Protocol
MCP Server for Lightning Faucet - Give your AI agent a Bitcoin wallet
APIMesh — 23 pay-per-call web analysis APIs + 16-tool MCP server with autonomous API generation. Security audits, SEO, tech stack detection. x402 + Stripe MPP payments.
APIMesh — 23 pay-per-call web analysis APIs + 16-tool MCP server with autonomous API generation. Security audits, SEO, tech stack detection. x402 + Stripe MPP payments.
Discover and pay AI agents on nullpath's marketplace via MCP. x402 micropayments with USDC.
x402 SDK for AI agent payments - Base & Solana USDC micropayments
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
DePIN for Vintage Hardware — Proof-of-Antiquity blockchain where old machines outmine new ones. AI-powered hardware fingerprinting, 15+ CPU architectures, Solana bridge (wRTC). $0 VC.
🚀 Curated list of x402 resources: HTTP 402 Payment Required protocol for blockchain payments, crypto micropayments, AI agents, API monetization. Includes SDKs (TypeScript, Python, Rust), examples, facilitators (Coinbase, Cloudflare), MCP integration, tutorials. Accept USDC payments with one line of code. Perfect for AI agent economy.
Client SDK for the Vybe x402 API. Pay-per-call USDC over HTTP and prepaid-credit WebSocket streaming for Vybe's Solana analytics API. Built for AI agents.
The financial operating system for AI agents. A single HTTP client that intercepts '402 Payment Required', routes across x402, L402, and MPP, persists credentials as recoverable assets, enforces per-envelope budgets, and emits a structured trace.