x402-Gated MCP Server
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-Gated MCP ServerGenerate 10 synthetic user profiles"
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-Gated MCP Server š°
A Model Context Protocol (MCP) server that charges AI agents per-call via the x402 micropayment protocol (USDC on Base).
Agents pay $0.05 USDC per tool call ā no API keys, no subscriptions, just pay-per-use crypto.
How It Works
Agent ā POST /mcp/tools/call (no payment)
ā 402 + pricing payload (how much, where to pay)
Agent ā signs USDC tx on Base
ā POST /mcp/tools/call + X-Payment-Signature: 0x...
ā 200 + tool results ā
Related MCP server: @hpp-io/x402-mcp-bridge
Quick Start
# Install dependencies
pip install -r requirements.txt
# Configure (copy and edit .env)
cp .env.example .env
# Set PAYMENT_WALLET_ADDRESS=0xYourWallet
# Run server
python server.py
# Test the payment flow (in another terminal)
python client.pyAvailable Tools
Tool | Description | Price |
| Generates user profiles, transactions, or IoT sensor data | 0.05 USDC |
| Deep DEX liquidity, 24h volume, and sentiment score on Base network | 0.05 USDC |
| Clean markdown summaries, key takeaways, and structured JSON from URLs | 0.05 USDC |
Endpoints
Method | Path | Auth | Description |
GET |
| None | Health check + payment config |
GET |
| x402 | MCP SSE connection |
POST |
| x402 | MCP JSON-RPC messages |
POST |
| x402 | REST tool invocation |
Deploy to Railway
# Or via CLI:
railway login
railway init
railway up
# Set env vars in Railway dashboard:
# PAYMENT_WALLET_ADDRESS=0x...
# VERIFY_MODE=onchainEnvironment Variables
Variable | Required | Default | Description |
| Yes | - | Your Base wallet for receiving USDC |
| No |
| Price per call in USDC |
| No |
|
|
| No |
| Base RPC endpoint |
| No |
| Server port |
Architecture
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā FastAPI App ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā x402 Payment Middleware (ASGI) ā ā
ā ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā ā
ā ā ā MCP SSE Transport ā ā ā
ā ā ā āā /mcp/sse ā ā ā
ā ā ā āā /mcp/messages/ ā ā ā
ā ā ā REST Endpoint ā ā ā
ā ā ā āā /mcp/tools/call ā ā ā
ā ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā Health Check (public) ā
ā āā / ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāTech Stack
FastAPI + uvicorn ā ASGI web server
MCP SDK v2 ā Model Context Protocol
web3.py ā On-chain USDC verification on Base
httpx ā Async HTTP client
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 Connectors
Pay-per-use tool API for AI agents. Free tier, x402 USDC micropayments, or API key.
Pay-per-call tools for autonomous agents, settled in USDC on Base via x402.
x402 toolkit for AI agents: paid web, AI, and Base chain tools per call in USDC. Free tools too.
Pay-per-use weather, environment, finance, and on-chain intelligence tools for AI agents via x402.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables AI agents to access paid tools like crypto prices, weather, translation, and web intelligence via per-request USDC payments on Base, with no API keys or subscriptions.1527MIT

@hpp-io/x402-mcp-bridgeofficial
AlicenseNot gradedqualityBmaintenanceEnables AI agents to autonomously pay for and discover services using HPP USDC.e over the x402 protocol, without API keys or manual signing.88Apache 2.0- AlicenseAqualityCmaintenanceProvides AI agents with 10 pay-per-call utility tools (QR generation, DNS lookup, OCR, etc.) using USDC on Base via the x402 protocol, with agent's private key never leaving the agent.1167MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to use pay-per-use web scraping, Base blockchain analytics, and PDF text extraction tools, monetized via x402 USDC micropayments.-