X402engine MCP logo

X402engine MCP

Discover and call pay-per-request APIs with local USDC payments over Base or Solana.

Install X402engine MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "x402engine-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "x402engine-mcp"
      ],
      "env": {
        "X402_EVM_PRIVATE_KEY": "YOUR_VALUE_HERE",
        "X402_SOLANA_PRIVATE_KEY": "YOUR_VALUE_HERE",
        "X402_PAYMENT_NETWORK": "YOUR_VALUE_HERE",
        "X402_MAX_PAYMENT_USD": "YOUR_VALUE_HERE",
        "X402_BASE_URL": "YOUR_VALUE_HERE",
        "X402_PAYMENT_HEADER": "YOUR_VALUE_HERE",
        "X402_DEV_BYPASS": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env X402_EVM_PRIVATE_KEY=YOUR_VALUE_HERE --env X402_SOLANA_PRIVATE_KEY=YOUR_VALUE_HERE --env X402_PAYMENT_NETWORK=YOUR_VALUE_HERE --env X402_MAX_PAYMENT_USD=YOUR_VALUE_HERE --env X402_BASE_URL=YOUR_VALUE_HERE --env X402_PAYMENT_HEADER=YOUR_VALUE_HERE --env X402_DEV_BYPASS=YOUR_VALUE_HERE --transport stdio x402engine-mcp -- npx -y x402engine-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

Automated check passed— started and listed 22 tools correctly ().

Overview

The x402engine-mcp MCP server connects agents to x402engine’s pay-per-request API gateway, covering services such as code execution, media generation, crypto data, travel, and IPFS. It exposes fixed MCP tools alongside live service discovery, then handles HTTP 402 payment requirements using a locally configured payer wallet. Automatic payments support USDC on Base or Solana, with a per-request USD cap and checks for supported networks, assets, and amounts. Use it when an agent needs access to metered APIs without embedding payment handling in each tool call.

Use cases

  • Discover available metered APIs before making a request
  • Generate images or execute code through paid gateway services
  • Query crypto, wallet, and token data for an agent workflow
  • Search flights, hotels, and travel locations
  • Pin data to or retrieve data from IPFS

Key features

  • HTTP 402 payment handling for pay-per-request APIs
  • Local USDC signing on Base or Solana
  • Per-request USD spending limit
  • Live service discovery and health checks
  • Crypto, travel, media, code, and IPFS tools

Tools22

What X402engine MCP lets your agent do. Expand a tool for its parameters.

Verified live~2.8k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

19/22 checks healthy over the last 117d

What it can do

From the 22 tools this server returned when we ran it.

Runs commands · 1Handles credentials · 4Makes network requests · 19Read-only tools · 21
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age296 days
Maintainers1

Observed 2026-12-02 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 17d ago via OSV.dev · x402engine-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads581Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed22Callable tools this server registers over MCP.

How X402engine MCP works

What x402engine-mcp does

The x402engine-mcp MCP server gives MCP-compatible agents access to selected services in the x402engine gateway. Its tools cover service discovery and health checks, image generation, code execution, audio transcription, cryptocurrency data, wallet and token information, IPFS operations, and travel searches. The gateway also advertises a broader catalog that can change independently of the npm package.

The server is useful when an agent needs to call APIs that charge per request rather than use a single subscription or static credential. Prices are available in tool descriptions and live discovery responses. Free discovery functions can be used without configuring a wallet, while paid calls expose their payment requirements until a payer is available.

How it works

The x402engine-mcp MCP server communicates with the x402engine gateway using the HTTP 402 payment flow. When a paid endpoint requires payment, the server evaluates the request against its configured payment settings and, when supported, signs the USDC authorization locally. The private key is not sent to x402engine.

Automatic payment supports canonical USDC on Base and Solana. Base is preferred when the payment network is set to auto and both wallet types are configured. Requests are rejected before signing if they use an unknown asset, an unsupported network, or an amount above the configured limit. Clients that provide their own compatible payment header can also use MegaETH, but it is not part of the automatic wallet flow described here.

Setup and configuration

Run the server through npx, using the package name and a pinned version if desired. A Base setup requires X402_EVM_PRIVATE_KEY, a Base payment network setting, and a wallet funded with USDC on Base. A Solana setup uses X402_SOLANA_PRIVATE_KEY, selects Solana, and requires USDC plus enough SOL for transaction fees. The README recommends a dedicated wallet with a low balance.

X402_MAX_PAYMENT_USD sets the hard per-request spending limit and defaults to 1.00. X402_BASE_URL can replace the production gateway URL. X402_PAYMENT_HEADER provides a legacy pre-signed x402 header, while X402_DEV_BYPASS is available for development bypasses. With no wallet configured, the process can still start and serve free discovery tools.

Tools and capabilities

The exposed tool groups include:

  • Discovery: discover_services and service_health
  • Image and code: generate_image and execute_code
  • Audio: transcribe_audio
  • Crypto: price, market, history, trending, search, and category tools
  • Wallet and token: balances, transactions, PnL, prices, and metadata
  • IPFS: pin_to_ipfs and get_from_ipfs
  • Travel: flight, location, hotel, and cheapest-date searches

The x402engine-mcp MCP server also publishes gateway discovery documents and a services API, allowing agents or clients to inspect the current catalog rather than relying only on the bundled tool list.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about X402engine MCP

x402engine-mcp is an MCP server that connects agents to the x402engine pay-per-request API gateway. Its main tools support service discovery, health checks, image generation, code execution, crypto and wallet data, travel searches, audio transcription, and IPFS operations, with automatic USDC payments on Base or Solana.

Install it by configuring an MCP client to run `npx -y x402engine-mcp@1.1.0`. Claude users can add it with `claude mcp add x402engine -- npx -y x402engine-mcp@1.1.0`; wallet and payment environment variables can then be added to the client configuration.

Yes, it starts without a wallet and keeps free tools such as `discover_services` and `service_health` available. Paid tools return their x402 payment requirements until a supported payer wallet is configured.

Automatic payments support Base and Solana using canonical USDC contracts. Set `X402_PAYMENT_NETWORK` to `base`, `solana`, or `auto`; Base is preferred in auto mode when both wallet keys are present. MegaETH is available only when a client supplies its own compatible payment header.

Set `X402_MAX_PAYMENT_USD` to the maximum amount allowed for each request. It defaults to `1.00`, and requests above the configured cap are rejected before the server signs an automatic payment.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewX402engine MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/x402engine-mcp?style=directory)](https://allmcps.com/mcp/x402engine-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/x402engine-mcp"><img src="https://allmcps.com/api/badge/x402engine-mcp?style=directory" alt="X402engine MCP on AllMCPs" /></a>