Skip to main content
The Xenarch MCP server runs with npx @xenarch/agent-mcp and registers 103 tools, including xenarch_check_gate, xenarch_pay, xenarch_pay_link and xenarch_get_history. There is nothing to clone or build.

Prerequisites

  • Node.js 18 or later
  • A wallet with USDC on Base mainnet. No ETH is needed. A third-party x402 facilitator pays the gas for each payment.
  • An agent key (xa_live_...). The server refuses to pay without one.

1. Prepare the wallet and the agent key

Run these once with the xenarch CLI:
Fund the wallet address with USDC on Base. The last command prints the xa_live_ key once. You can also manage caps and keys in the dashboard at dash.xenarch.dev. The MCP server reads the CLI’s wallet and session from ~/.xenarch/config.json, so the CLI and the server sign with the same wallet.

2. Add the server to your client

Claude Code

Claude Desktop, Cursor and Cline

Add the same block to the client’s MCP configuration file:
  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
  • Cursor: ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project)
  • Cline: the MCP Servers panel, then Configure MCP Servers (cline_mcp_settings.json)
Restart the client after you save the file.

Other MCP clients

Any client that starts a server over stdio can run npx -y @xenarch/agent-mcp. To serve it over streamable HTTP instead, start it with TRANSPORT=http (or the --http flag). It listens on PORT (default 3000) at /mcp.

Wallet resolution

The server looks for a signing key in this order, and the first match wins:
  1. XENARCH_PRIVATE_KEY, if set
  2. A local wallet the CLI stored in ~/.xenarch/config.json
  3. ~/.xenarch/wallet.json
If none exists, the server generates a wallet the first time a tool runs, saves it to ~/.xenarch/wallet.json with owner-only permissions, and tells the agent the new address. Fund it with USDC before paying. The xenarch_wallet_status tool shows the address and its USDC balance at any time.
The wallet that signs payments is separate from the wallet you sign in to the dashboard with. Keep only what you are willing to let the agent spend in the payment wallet.

Environment variables

Troubleshooting