acepilot-mcp

用于 Base 上 AcePilot 付费 x402 数据路由的 MCP 服务器。工具根据实时目录生成,每个付费路由对应一个工具。提供免费目录和健康检查工具;由调用方自己的密钥签署付款,并设有支出上限。提供数据,不提供建议。

文档

acepilot-mcp

Links

This repository mirrors the published acepilot-mcp@0.1.0 npm package (MIT) only. It is data, not advice; nothing here is financial, investment, or legal advice.

Minimal MCP server for AcePilot paid x402 data routes on Base.

Tools are generated at startup from the live /catalogue.json and /openapi.json. Each paid route is one tool. Payment uses the caller's key (ACEPILOT_PRIVATE_KEY); this package never ships or hardcodes a key. Without a key, a paid tool returns the x402 402 payment requirements (including accepts[].amount) so the agent can see the price.

Free tools are catalogue and health metadata only. They do not return answer content. All answers require a paid tool.

Data, not advice. Every tool description states the price and that disclaimer.

Every HTTP request this client sends includes X-AcePilot-Client: acepilot-mcp/<version> so AcePilot can count settled payments by client in aggregate (no payer addresses).

Install

Requires Node.js 20 or later.

npx -y acepilot-mcp

Or install globally:

npm install -g acepilot-mcp
acepilot-mcp

From a clone of this repository:

cd mcp
npm install
npm run build
npm test
node dist/index.js

npm test starts the server against the live catalogue with no buyer key and checks that paid tools surface 402 amounts.

Environment

VariableRequiredDefaultMeaning
ACEPILOT_PRIVATE_KEYnounsetCaller's 0x-prefixed 32-byte key used only to sign x402 payments. If unset, tools return the 402 requirements and do not pay. ACEPILOT_BUYER_PRIVATE_KEY is accepted as an alias.
ACEPILOT_MAX_SPEND_USDCno0.15Per-session spend cap in USDC. A payment that would exceed the cap is not sent. The default covers top5 (0.12). Raise this to call higher-priced tools.
ACEPILOT_BASE_URLnohttps://aeroacepilot.xyzAcePilot host.

Never put a real key in a committed file. Prefer the host's secret store or a local, untracked env.

Claude Desktop

Add to claude_desktop_config.json (or the equivalent MCP settings file):

{
  "mcpServers": {
    "acepilot": {
      "command": "npx",
      "args": ["-y", "acepilot-mcp"],
      "env": {
        "ACEPILOT_PRIVATE_KEY": "<ACEPILOT_PRIVATE_KEY>",
        "ACEPILOT_MAX_SPEND_USDC": "0.15"
      }
    }
  }
}

Cursor

.cursor/mcp.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "acepilot": {
      "command": "npx",
      "args": ["-y", "acepilot-mcp"],
      "env": {
        "ACEPILOT_PRIVATE_KEY": "<ACEPILOT_PRIVATE_KEY>",
        "ACEPILOT_MAX_SPEND_USDC": "0.15"
      }
    }
  }
}

Local build:

{
  "mcpServers": {
    "acepilot": {
      "command": "node",
      "args": ["/absolute/path/to/acepilot/mcp/dist/index.js"],
      "env": {
        "ACEPILOT_PRIVATE_KEY": "<ACEPILOT_PRIVATE_KEY>",
        "ACEPILOT_MAX_SPEND_USDC": "0.15"
      }
    }
  }
}

ElizaOS

Stdio MCP plugin / character settings (shape used by @elizaos/plugin-mcp and similar wrappers):

{
  "mcp": {
    "servers": {
      "acepilot": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "acepilot-mcp"],
        "env": {
          "ACEPILOT_PRIVATE_KEY": "<ACEPILOT_PRIVATE_KEY>",
          "ACEPILOT_MAX_SPEND_USDC": "0.15"
        }
      }
    }
  }
}

The server speaks standard MCP over stdio, so any ElizaOS or Virtuals-style plugin that can spawn an MCP server can wrap these paid routes.

Tools

Paid tools (and their query arguments) come from the live catalogue and OpenAPI document. The set always includes at least:

check, q1, top5, open, position_yield, migrate, oor_watch, wallet_positions, real_yield, fee_or_aero

plus every other currently listed paid data route, and the free catalogue and health metadata tools.

License

MIT, for this mcp/ client package only. The rest of the AcePilot repository remains proprietary. See LICENSE.