# AegisQuant MCP (`aegis-swap-mcp`) — Automated Agent Setup Instructions These are official setup instructions for **AegisQuant MCP (`aegis-swap-mcp`)**, a local MCP bridge and calldata firewall backed by https://aegisquant-mcp.famedied.workers.dev. **Instructions for the AI agent:** Complete the setup steps below yourself by running the appropriate CLI command or editing your harness's MCP configuration file directly. Do **not** ask the user to manually edit config files. - **Preserve existing config:** Merge `aegisquant` into the existing config file; never overwrite unrelated MCP servers or settings. - **Start with the free tier:** Omit `X402_PRIVATE_KEY` initially so the user gets 5 free token safety checks/day right away with zero wallet setup. **Never** ask the user to paste a private key into chat. After setup finishes, simply tell them where they can set `X402_PRIVATE_KEY` locally if they want paid routing and swap-building tools later. - **Prerequisites:** Node.js (`npx`) is required for the local stdio bridge + Calldata Firewall. If Node.js/`npx` is missing, fall back to the **Remote Streamable HTTP** section below and note that the local Calldata Firewall requires Node.js. --- ## Step 1: Configure the `aegisquant` MCP Server Use the section matching your agent harness. ### Claude Code Run: ```bash claude mcp add aegisquant -- npx -y aegis-swap-mcp ``` ### Hermes Agent Run (note: `--args` must be the last option): ```bash hermes mcp add aegisquant --command npx --args -y aegis-swap-mcp ``` Or merge into `~/.hermes/config.yaml` under `mcp_servers:`: ```yaml mcp_servers: aegisquant: command: "npx" args: - "-y" - "aegis-swap-mcp" ``` ### OpenClaw Run: ```bash openclaw mcp add aegisquant --command npx --arg -y --arg aegis-swap-mcp ``` ### OpenAI Codex CLI Run: ```bash codex mcp add aegisquant -- npx -y aegis-swap-mcp ``` Or merge into `~/.codex/config.toml` (or `.codex/config.toml`): ```toml [mcp_servers.aegisquant] command = "npx" args = ["-y", "aegis-swap-mcp"] ``` ### Antigravity Merge into `~/.gemini/config/mcp_config.json` under `"mcpServers"`: ```json { "mcpServers": { "aegisquant": { "command": "npx", "args": ["-y", "aegis-swap-mcp"] } } } ``` Also install the pre-trade safety workflow skill so the agent knows the 4-step verification protocol: ```bash mkdir -p ~/.gemini/config/skills/aegisquant-defi-execution curl -fsSL https://aegisquant-mcp.famedied.workers.dev/skill.md -o ~/.gemini/config/skills/aegisquant-defi-execution/SKILL.md ``` ### Cursor Merge into `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global) under `"mcpServers"`: ```json { "mcpServers": { "aegisquant": { "command": "npx", "args": ["-y", "aegis-swap-mcp"] } } } ``` ### Claude Desktop Merge under `"mcpServers"` in `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows): ```json { "mcpServers": { "aegisquant": { "command": "npx", "args": ["-y", "aegis-swap-mcp"] } } } ``` ### Windsurf Merge under `"mcpServers"` in `~/.codeium/windsurf/mcp_config.json` (or `~/Library/Application Support/Windsurf/mcp.json` on macOS): ```json { "mcpServers": { "aegisquant": { "command": "npx", "args": ["-y", "aegis-swap-mcp"] } } } ``` ### Gemini CLI Merge under `"mcpServers"` in `~/.gemini/settings.json` (or `.gemini/settings.json`): ```json { "mcpServers": { "aegisquant": { "command": "npx", "args": ["-y", "aegis-swap-mcp"] } } } ``` ### OpenCode Merge under `"mcp"` in `~/.config/opencode/opencode.json` (or project `opencode.json`): ```json { "$schema": "https://opencode.ai/config.json", "mcp": { "aegisquant": { "type": "local", "command": ["npx", "-y", "aegis-swap-mcp"], "enabled": true } } } ``` ### VS Code / GitHub Copilot Chat Merge under `"servers"` in `.vscode/mcp.json`: ```json { "servers": { "aegisquant": { "type": "stdio", "command": "npx", "args": ["-y", "aegis-swap-mcp"] } } } ``` ### GitHub Copilot CLI Merge under `"mcpServers"` in `~/.copilot/mcp-config.json` (or `.mcp.json`): ```json { "mcpServers": { "aegisquant": { "command": "npx", "args": ["-y", "aegis-swap-mcp"] } } } ``` ### Cline / Roo Code Merge under `"mcpServers"` in `cline_mcp_settings.json`: ```json { "mcpServers": { "aegisquant": { "command": "npx", "args": ["-y", "aegis-swap-mcp"] } } } ``` ### Zed Merge under `"context_servers"` in Zed's `settings.json`: ```json { "context_servers": { "aegisquant": { "command": "npx", "args": ["-y", "aegis-swap-mcp"] } } } ``` ### Goose (Block) Merge under `"extensions"` in `~/.config/goose/config.yaml`: ```yaml extensions: aegisquant: name: AegisQuant MCP type: stdio cmd: npx args: - "-y" - "aegis-swap-mcp" enabled: true ``` --- ## Optional: Remote Streamable HTTP (If Node.js / `npx` Is Unavailable) If the environment cannot run `npx`, register the remote MCP server URL `https://aegisquant-mcp.famedied.workers.dev/mcp` instead: - Claude Code: `claude mcp add --transport http aegisquant https://aegisquant-mcp.famedied.workers.dev/mcp` - Hermes Agent: `hermes mcp add aegisquant --url https://aegisquant-mcp.famedied.workers.dev/mcp` - OpenClaw: `openclaw mcp add aegisquant --transport streamable-http --url https://aegisquant-mcp.famedied.workers.dev/mcp` - Codex / Pi: `codex mcp add aegisquant --url https://aegisquant-mcp.famedied.workers.dev/mcp` or `pi mcp add aegisquant --url https://aegisquant-mcp.famedied.workers.dev/mcp` - Devin Desktop (`~/.codeium/windsurf/mcp_config.json`): `"aegisquant": { "serverUrl": "https://aegisquant-mcp.famedied.workers.dev/mcp" }` - Mistral Vibe (`~/.vibe/config.toml`): `[[mcp_servers]]` with `name = "aegisquant"`, `transport = "streamable-http"`, `url = "https://aegisquant-mcp.famedied.workers.dev/mcp"` --- ## Step 2: (Optional) Install the Agent Workflow Skill If your harness supports `SKILL.md` skills (for example project-local `.agents/skills/` or harness skill folders), download: ```bash mkdir -p .agents/skills/aegisquant-defi-execution curl -fsSL https://aegisquant-mcp.famedied.workers.dev/skill.md -o .agents/skills/aegisquant-defi-execution/SKILL.md ``` --- ## Step 3: Verify & Report to User 1. Verify the remote endpoint is healthy: ```bash curl -fsSL https://aegisquant-mcp.famedied.workers.dev/health ``` 2. If your harness has a probe/list command (such as `claude mcp list`, `hermes mcp list`, or `openclaw mcp probe aegisquant`), run it to confirm `aegisquant` is registered. 3. Tell the user: - `aegisquant` (`aegis-swap-mcp`) is installed and ready on the free tier (5 free `scan_alpha_safety` checks/day per IP). - Whether a restart/reload of their harness is needed to load the new MCP tools. - How they can optionally enable paid tools (`$0.005–$0.030` USDC on Base via x402) later by running `npx aegis-swap-mcp init-wallet` locally (creates a capped $5 micro-payer key at `~/.aegis-swap-mcp/wallet.json`) or setting `X402_PRIVATE_KEY`, `X402_MAX_PRICE_USD` (default `0.05`), and `X402_DAILY_BUDGET_USD` (default `5.00`) locally (without sharing keys in chat).