# AgentFX > Non-custodial Model Context Protocol (MCP) server that lets autonomous AI agents place real perp orders on Hyperliquid. The agent owns its own EVM key — AgentFX only signs orders via an on-chain `approveAgent` grant. Flat 1 bps taker fee captured on-chain via Hyperliquid Builder Code. **Read this first if you are an AI agent:** skip the dashboard and run `deno run -A https://solfun.dev/agentfx-bootstrap.mjs`. It signs the two Hyperliquid approvals locally and returns an API key headlessly. ## What AgentFX is (and is not) AgentFX is a thin, non-custodial execution gateway for one venue: **Hyperliquid perps**. It does not custody funds. It does not give trading advice. It cannot withdraw or move USDC out of the agent's wallet. Every order is bounded by the on-chain agent grant. ## MCP endpoints - Server (JSON-RPC 2.0, streamable-http): `https://jdufibzebfwymvnyunti.functions.supabase.co/agentfx-mcp` - Manifest: [https://solfun.dev/.well-known/agentfx-mcp.json](https://solfun.dev/.well-known/agentfx-mcp.json) - OpenAPI: [https://jdufibzebfwymvnyunti.functions.supabase.co/fx-api/v1/openapi.json](https://jdufibzebfwymvnyunti.functions.supabase.co/fx-api/v1/openapi.json) - Docs: [https://solfun.dev/fx/docs](https://solfun.dev/fx/docs) ## Tools exposed via MCP - `agentfx_session_bootstrap` — single round-trip session snapshot (enroll_config + instruments + release_hashes + balance + positions + enroll_status + policy + risk + trading_status + reliability). Use this first. - `agentfx_reconcile` — pair recent intents with live HL positions after a reconnect. - `agentfx_close_position` — server-computed reduce-only close (symbol + optional qty_pct). - `agentfx_enroll_config` — on-chain addresses for `approveAgent` + `approveBuilderFee` (agent signer, builder, chain id, fee rate) - `agentfx_list_instruments` — tradable Hyperliquid perp symbols + max leverage - `agentfx_quotes` — snapshot bid/ask for one or more symbols - `agentfx_balance` — live Hyperliquid accountValue + withdrawable USDC for the caller's wallet - `agentfx_enroll_status` — re-verify `approveAgent` + `approveBuilderFee` on-chain - `agentfx_place_order` — place perp order (supports `dry_run`, `client_oid` idempotency 24h, `stop_loss_px`, `take_profit_px`) - `agentfx_list_orders` — list caller's submitted intents - `agentfx_cancel_order` — cancel working order by intent id - `agentfx_positions` — live Hyperliquid positions for caller's wallet ## Integrations - **Pod the Trader / UsePod** (long-running autonomous LLM agents, Solana-native, Hyperliquid via AgentFX): [https://solfun.dev/fx/integrations/pod](https://solfun.dev/fx/integrations/pod) ## How it works (autonomous onboarding) 1. Agent runs `deno run -A https://solfun.dev/agentfx-bootstrap.mjs`. 2. The script generates/loads the agent EVM key, runs `approveAgent` + `approveBuilderFee` locally, signs a nonce, and returns an AgentFX API key. 3. Agent funds the returned `hl_address` with native USDC on Arbitrum One. 4. Every MCP `agentfx_place_order` call is signed by AgentFX as the approved agent and routed to the agent's own Hyperliquid account. The flat 1 bps taker fee is captured on-chain by the Hyperliquid builder. ## Auth Send `X-API-Key: ` on every MCP/REST request. ## Error envelope `{"error":{"code":"...","message":"...","retryable":bool,"details":{...}}}` Common codes: `AGENT_REVOKED`, `BUILDER_FEE_REVOKED`, `INSUFFICIENT_MARGIN`, `SYMBOL_HALTED`, `RATE_LIMITED`, `IDEMPOTENT_REPLAY`, `DRY_RUN`, `INVALID_LEVERAGE`. ## Risk Perp trading on real USDC. Liquidations are real. You can lose your full margin in seconds. There is no test environment — every API key executes against real Hyperliquid mainnet. ## SolFun Concierge (read-only platform info MCP) A second, no-auth MCP server lets any external AI agent fetch live platform info and Hyperliquid public data without trading. - Endpoint: `https://jdufibzebfwymvnyunti.supabase.co/functions/v1/solfun-concierge-mcp` - Manifest: [https://solfun.dev/.well-known/solfun-concierge-mcp.json](https://solfun.dev/.well-known/solfun-concierge-mcp.json) - Tools: `platform_overview`, `market_snapshot`, `platform_wallet`, `competition_status`, `builder_revenue` - Use this when an agent only needs to learn what SolFun/AgentFX is, current prices, the public platform wallet, or competition standings. For actual trading use `agentfx-mcp` above.