x402engine-mcp
v1.0.6
Published
agent-friendly MCP wrapper for x402engine, exposing curated pay-per-call tools over x402 micropayments with no api keys or accounts
Maintainers
Readme
x402engine-mcp
curated MCP server for x402engine, built for agents that want to discover and call paid tools over HTTP 402.
the core story is simple: software pays software, per call, with stablecoins. no api keys. no accounts. no subscription setup in the request path.
why agents use this
- curated MCP surface over the live x402engine gateway
- machine readable discovery via
discover_services - payment rails on Base, MegaETH, and Solana
- useful for agents that want to buy compute, crypto data, wallet analytics, IPFS, and travel search only when needed
important scope note:
- the live gateway exposes a larger catalog than this MCP package
- this package is intentionally a curated subset
- for full gateway discovery, use
discover_servicesor readhttps://x402-gateway-production.up.railway.app/.well-known/x402.json
quick start
claude desktop
{
"mcpServers": {
"x402engine": {
"command": "npx",
"args": ["-y", "x402engine-mcp"],
"env": {
"X402_DEV_BYPASS": "your-dev-bypass-secret"
}
}
}
}claude code
claude mcp add x402engine -- npx -y x402engine-mcpmachine readable discovery surfaces
- gateway discovery:
https://x402-gateway-production.up.railway.app/.well-known/x402.json - agent card:
https://x402-gateway-production.up.railway.app/.well-known/agent.json - endpoint manifest:
https://x402-gateway-production.up.railway.app/.well-known/agent-manifest.v1.json - manifest integrity:
https://x402-gateway-production.up.railway.app/.well-known/agent-manifest-integrity.v1.json - services api:
https://x402-gateway-production.up.railway.app/api/services - this package metadata:
server.json
implemented MCP tools
discovery and health
| tool | price | description |
|------|-------|-------------|
| discover_services | free | fetch live x402 discovery metadata from /.well-known/x402.json |
| service_health | free | fetch live per-service health metrics from /api/health/services |
image generation
| tool | price | description |
|------|-------|-------------|
| generate_image | $0.015 to $0.12 | image generation across fast, quality, and text tiers |
code execution
| tool | price | description |
|------|-------|-------------|
| execute_code | $0.005 | sandboxed code execution |
audio
| tool | price | description |
|------|-------|-------------|
| transcribe_audio | $0.10 | audio transcription via Deepgram |
crypto and market data
| tool | price | description |
|------|-------|-------------|
| get_crypto_price | $0.001 | current crypto prices |
| get_crypto_markets | $0.002 | market rankings and market data |
| get_crypto_history | $0.003 | historical price data |
| get_trending_crypto | $0.001 | trending coins |
| search_crypto | $0.001 | search by name or symbol |
| get_crypto_categories | $0.001 | CoinGecko category ids for sector discovery |
wallet and token data
| tool | price | description |
|------|-------|-------------|
| get_wallet_balances | $0.005 | multichain wallet balances |
| get_wallet_transactions | $0.005 | wallet transaction history |
| get_wallet_pnl | $0.01 | wallet profit and loss analysis |
| get_token_prices | $0.005 | dex derived token prices |
| get_token_metadata | $0.002 | token metadata |
IPFS
| tool | price | description |
|------|-------|-------------|
| pin_to_ipfs | $0.01 | pin json to IPFS |
| get_from_ipfs | $0.001 | retrieve content from IPFS by cid |
travel
| tool | price | description |
|------|-------|-------------|
| search_flights | $0.02 | flight search via /api/travel/flights |
| search_locations | currently unavailable on the live gateway | MCP tool exists but targets /api/travel/locations, which is not in the current gateway routes |
| search_hotels | $0.02 | hotel search via /api/travel/hotels |
| search_cheapest_dates | currently unavailable on the live gateway | MCP tool exists but targets /api/travel/cheapest-dates, which is not in the current gateway routes |
what this package does not expose yet
notable live gateway capabilities that are outside this curated MCP surface:
- 38 LLM routes under
/api/llm/* - embeddings via
/api/embeddings - video generation via
/api/video/* - web routes via
/api/web/* - search routes via
/api/search/* - tts routes via
/api/tts/* - ens routes via
/api/ens/* - tx simulation via
/api/tx/simulate
environment variables
| variable | required | description |
|----------|----------|-------------|
| X402_BASE_URL | no | gateway url. defaults to https://x402-gateway-production.up.railway.app |
| X402_DEV_BYPASS | no | dev bypass secret for local testing |
| X402_PAYMENT_HEADER | no | pre signed x402 payment header for automatic payment |
payment rails
- base: USDC, 6 decimals
- solana: USDC, 6 decimals
- megaeth: USDm, 18 decimals
request flow
- the agent calls an MCP tool
- this server makes the matching HTTP request to the gateway
- if payment is required, the gateway returns
402 Payment Requiredplus payment metadata - the caller pays with an x402 compatible payment flow
- the gateway verifies payment and returns the result
for automatic payment handling in custom agent code, use @x402/fetch.
trust and distribution links
- website: x402engine.app
- gateway base url: x402-gateway-production.up.railway.app
- npm: x402engine-mcp
- github: agentc22/x402engine-mcp
- protocol: x402.org
