- Home
- MCP servers
- x402engine
x402engine
- javascript
0
GitHub Stars
javascript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
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.
How to use
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.
How to install
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-mcp
Configuration and environment
Environment 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).
Notes on usage and billing
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.
Security and reliability notes
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.
Troubleshooting tips
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.
Available tools
generate_image
AI image generation with configurable speed/quality/text tiers priced per call.
execute_code
Sandboxed execution of code in Python, JavaScript, Bash, or R for quick experiments.
transcribe_audio
Audio-to-text transcription using Deepgram Nova-3.
get_crypto_price
Fetch current prices for selected cryptocurrencies.
get_crypto_markets
Provide top coins by market capitalization.
get_crypto_history
Return historical price charts for assets.
get_trending_crypto
List trending cryptocurrencies.
search_crypto
Search for coins by name or symbol.
get_wallet_balances
Get token balances for a specified wallet.
get_wallet_transactions
Retrieve transaction history for a wallet.
get_wallet_pnl
Compute profit and loss analyses for a wallet.
get_token_prices
Provide DEX-derived token prices.
get_token_metadata
Retrieve metadata for tokens.
pin_to_ipfs
Pin JSON content to IPFS for storage.
get_from_ipfs
Retrieve content from IPFS by hash.
discover_services
List all available services and their pricing.