X402engine Mcp

io.github.agentc22由 GitHub 账号 agentc22 发布v1.0.3更新于 Nov 3, 2026

50+ pay-per-call APIs for AI agents — images, LLM, code, crypto, travel & more via x402

概览

AI 生成的概览

本地 MCP 服务器,让助手发现并调用 50 多个按次付费的 API,通过 x402 在 Base 或 Solana 上用 USDC 自动付款。

可以做什么
  • 免费发现网关服务目录并检查服务健康状态
  • 生成图片并执行代码
  • 转写音频
  • 查询加密货币价格、行情、历史、热门币种、分类与搜索
  • 读取钱包余额、交易与盈亏,以及代币价格和元数据
  • 在 IPFS 上固定与读取文件,并搜索航班、地点、酒店和最便宜出行日期
适用场景
适合需要从同一网关获得多种互不相关能力(图像、LLM、代码、加密、旅行、IPFS)并愿意按次以 USDC 付费的场景。免费的发现与健康检查工具无需钱包即可使用,也可先用来浏览目录。
运行要求
通过 npx 在本地运行(需 Node.js)。付费工具需要已充值的付款钱包:Base USDC 用 X402_EVM_PRIVATE_KEY,Solana USDC 用 X402_SOLANA_PRIVATE_KEY,Solana 还需 SOL 支付手续费。可选配置包括 X402_PAYMENT_NETWORK、X402_MAX_PAYMENT_USD、X402_BASE_URL、X402_PAYMENT_HEADER 和 X402_DEV_BYPASS。需要能访问网关的网络。
安装前请注意
付费工具会从配置的钱包中真实花费 USDC;X402_MAX_PAYMENT_USD 的上限按单次请求计算而非按任务,应为每个任务单独设定预算。请使用专用的低余额钱包,切勿在对话中放入私钥。X402_DEV_BYPASS 会跳过付款,X402_PAYMENT_HEADER 携带预签名的付款头。请求会发送到第三方网关,其目录可能独立于本包而变化。

安装

在 SourceWeft 中

  1. 打开 控制台中的 X402engine Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

x402engine-mcp

Agent-friendly MCP server for x402engine. It lets agents discover and call pay-per-request APIs through HTTP 402, with automatic USDC payment on Base or Solana.

The live gateway covers LLMs, image and video generation, web search and scraping, code execution, crypto and wallet data, transaction simulation, audio, travel, and IPFS. This MCP exposes a curated tool set and live discovery for the full catalog.

Quick Start

Use a dedicated, low-balance payer wallet. The MCP signs x402 payments locally and never sends the private key to x402engine.

Base

json
{  "mcpServers": {    "x402engine": {      "command": "npx",      "args": ["-y", "[email protected]"],      "env": {        "X402_EVM_PRIVATE_KEY": "0xYOUR_DEDICATED_PAYER_KEY",        "X402_PAYMENT_NETWORK": "base",        "X402_MAX_PAYMENT_USD": "1.00"      }    }  }}

Fund the wallet with USDC on Base. The x402 facilitator pays transaction gas; the wallet signs an EIP-3009 USDC authorization.

Solana

json
{  "mcpServers": {    "x402engine": {      "command": "npx",      "args": ["-y", "[email protected]"],      "env": {        "X402_SOLANA_PRIVATE_KEY": "YOUR_BASE58_OR_JSON_PRIVATE_KEY",        "X402_PAYMENT_NETWORK": "solana",        "X402_MAX_PAYMENT_USD": "1.00"      }    }  }}

Fund the wallet with USDC on Solana and enough SOL for transaction fees.

Discovery Without a Wallet

The server starts without a wallet, and free tools such as discover_services and service_health still work. Paid tools return their x402 payment requirements until a wallet is configured.

bash
claude mcp add x402engine -- npx -y [email protected]

Hermes Agent

Install the x402engine skill and merge this server into the active Hermes profile's config.yaml:

yaml
mcp_servers:  x402engine:    command: npx    args: ["-y", "[email protected]"]    env:      X402_BASE_URL: "https://x402engine.app"      X402_PAYMENT_NETWORK: "auto"      X402_MAX_PAYMENT_USD: "0.10"

Start a new session and call discover_services or service_health; both are free. Keep the network on auto until a wallet is configured. For Base payments, store X402_EVM_PRIVATE_KEY in the profile's local .env, add X402_EVM_PRIVATE_KEY: "${X402_EVM_PRIVATE_KEY}" to the server's env, and change the network to base. Never put wallet keys in chat. The cap applies per request; authorize a separate total budget for each task.

Full Hermes setup guide · Installable skill

Payment Controls

VariableDefaultDescription
X402_EVM_PRIVATE_KEYunsetDedicated payer key for Base USDC
X402_SOLANA_PRIVATE_KEYunsetBase58 or JSON payer key for Solana USDC
X402_PAYMENT_NETWORKautoauto, base, or solana
X402_MAX_PAYMENT_USD1.00Hard per-request spending limit
X402_BASE_URLproduction gatewayOverride the gateway URL
X402_PAYMENT_HEADERunsetLegacy pre-signed x402 header
X402_DEV_BYPASSunsetDevelopment bypass secret

In auto mode, Base is preferred when both keys are configured. Automatic payment only accepts the canonical USDC contracts on Base and Solana. It rejects unknown assets, unsupported networks, and amounts above the configured cap before signing.

MegaETH remains available to clients that supply their own compatible payment header.

MCP Tools

CategoryTools
Discoverydiscover_services, service_health
Image and codegenerate_image, execute_code
Audiotranscribe_audio
Cryptoget_crypto_price, get_crypto_markets, get_crypto_history, get_trending_crypto, search_crypto, get_crypto_categories
Wallet and tokenget_wallet_balances, get_wallet_transactions, get_wallet_pnl, get_token_prices, get_token_metadata
IPFSpin_to_ipfs, get_from_ipfs
Travelsearch_flights, search_locations, search_hotels, search_cheapest_dates

Prices are included in each tool description and in live discovery. The gateway catalog can change independently of this package.

Discovery

Development

bash
npm installnpm testnpm run build

Links

来源:README.md,提交 dd1c274

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.3最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。