x402 Payment Gateway MCP Server
Provides tools for creating x402 payment requests and verifying USDC payments on the Solana blockchain, enabling micropayments between AI agents.
Click on "Install 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 Payment Gateway MCP ServerCreate a payment request for the premium data analysis tool costing 0.5 USDC."
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.
x402 Payment Gateway MCP Server 💰
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.
Related MCP server: x402 MCP Payment
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-serverConfiguration
Set your merchant wallet in .env:
MERCHANT_WALLET=YourSolanaWalletAddress
SOLANA_RPC_URL=https://api.mainnet-beta.solana.comUsage with Claude Code
{
"mcpServers": {
"x402": {
"command": "uvx",
"args": ["x402-mcp-server"],
"env": {
"MERCHANT_WALLET": "YourSolanaWalletAddress"
}
}
}
}Tools
Tool | Description |
| Create a 402 payment request for a tool |
| Verify on-chain USDC payment |
| Check payment status |
| Set price for a tool |
| View all tool prices |
| Payment history |
| 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 | |
🌍 Data | Weather · Germany · Agriculture · Space · Aviation · EU Companies |
🔒 Security | |
🤖 Agent Infra | Memory · Directory · Hub · Reputation |
🔬 Research |
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables AI assistants to interact with the x402 payment protocol on Solana, allowing discovery and consumption of x402-enabled services, USDC payment management, and access to Solana development resources.Last updated10MIT
- Flicense-qualityCmaintenanceEnables AI agents to access paid content by integrating cryptocurrency payments through the x402 protocol, allowing LLMs to verify payments and retrieve paid resources automatically.Last updated1
- Alicense-qualityDmaintenanceEnables AI agents to discover and pay for x402-enabled services using natural language, with multi-chain support for Solana and EVM payments.Last updated231MIT
- Alicense-qualityDmaintenanceEnables AI agents to pay for protected HTTP resources using Stellar USDC via the x402 protocol, facilitating automated payments and access to paid APIs.Last updatedMIT
Related MCP Connectors
Pay for HTTP APIs and charge for your own: x402 micropayments in USDC on Base.
Pay-per-use weather, environment, finance, and on-chain intelligence tools for AI agents via x402.
Batch send SOL or any SPL token to 1000+ wallets via x402. AI agent payments on Solana.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AiAgentKarl/x402-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server