home / mcp / x402engine mcp server
Provides 402-micropayment gated access to 16 APIs via multiple payment networks for AI agents.
Configuration
View docs{
"mcpServers": {
"agentc22-x402engine-mcp": {
"command": "npx",
"args": [
"-y",
"x402engine-mcp"
],
"env": {
"X402_BASE_URL": "https://x402engine.app",
"X402_DEV_BYPASS": "your-dev-bypass-secret",
"X402_PAYMENT_HEADER": "PAYLOAD_TOKEN"
}
}
}
}You can run the x402engine MCP server to give AI agents access to 16 pay-per-call APIs through a micropayment gateway using 402 payments. This enables controlled, per-call access to powerful tools with automated, on-chain verification of payments across multiple networks.
To use this MCP server, connect your agent or application to the x402engine MCP endpoint. Your agent will request a tool, the MCP gateway will respond with a 402 Payment Required that includes the price, and your agent will perform the payment through the configured networks. After payment is verified on-chain, the gateway returns the requested data. You can automate payment handling in your agent using supported fetch utilities.
Prerequisites: ensure you have Node.js and npm installed on your system.
Install and run the MCP server using the provided npx command. You can integrate this into your Claude setup as shown below.
# Claude Desktop: add MCP configuration to claude_desktop_config.json
{
"mcpServers": {
"x402engine": {
"command": "npx",
"args": ["-y", "x402engine-mcp"],
"env": {
"X402_DEV_BYPASS": "your-dev-bypass-secret"
}
}
}
}# Claude Code: add MCP for x402engine
claude mcp add x402engine -- npx -y x402engine-mcpEnvironment variables you may configure include:
- X402_BASE_URL: Gateway URL (default: https://x402engine.app).
- X402_DEV_BYPASS: Development bypass secret to skip payments (optional).
- X402_PAYMENT_HEADER: Pre-signed payment header (optional).
Payments are processed across multiple networks: Base (USDC on an EVM chain), Solana (USDC), and MegaETH (USDm). Each API call has a price between $0.001 and $0.12 depending on the tool and its tier. The MCP server coordinates with the gateway to present pricing and verify payments before returning results.
Keep your dev bypass secret secure and restrict access to your MCP client. Rely on on-chain payment verification to ensure data is only returned after successful payments. Use the provided environment variables to manage gateway behavior and payment flow.
If you encounter payment failures, verify network connectivity to the gateway, confirm the correct price is presented by the gateway, and ensure the client’s payment submission follows the x402 protocol. Check your X402_DEV_BYPASS value if payments are being bypassed unintentionally.
AI image generation with configurable speed/quality/text tiers priced per call.
Sandboxed execution of code in Python, JavaScript, Bash, or R for quick experiments.
Audio-to-text transcription using Deepgram Nova-3.
Fetch current prices for selected cryptocurrencies.
Provide top coins by market capitalization.
Return historical price charts for assets.
List trending cryptocurrencies.
Search for coins by name or symbol.
Get token balances for a specified wallet.
Retrieve transaction history for a wallet.
Compute profit and loss analyses for a wallet.
Provide DEX-derived token prices.
Retrieve metadata for tokens.
Pin JSON content to IPFS for storage.
Retrieve content from IPFS by hash.
List all available services and their pricing.