Build
Build an AI agent with Apogee
Walkthrough: create an app, connect MCP, discover tools, call one, pass JSON to a model, handle errors, add safety, log calls.
- Your application
- Your agent / backend
- MCP client or REST /api/v1
- Apogee MCP
- Robinhood Chain 4663 + market providers
1. Create the application
Any server-side runtime. Keep MCP calls off the public browser.
2. Install MCP dependencies
Optional: an MCP client library. Required: HTTPS JSON POST. Apogee does not require @modelcontextprotocol/sdk on the server — this Next.js app implements the protocol directly.
3. Connect
URL https://apogeemcp.digital/api/mcp. initialize then tools/list.
4–5. Discover and call
Prefer listed names. For aliases, search_catalog then run_tool. First call: scan_token with query NVDA or a 0x.
6. Pass results to the model
Send structuredContent as a tool result. Instruct the model not to invent prices if a tool fails. Orbit on this site follows that rule.
7. Errors
Honor 429. Treat isError / { ok: false } as data, not as a successful quote.
8. Safety controls
- Allow-list tools. Do not let a prompt freely call prepare_pons_launch.
- Require a human to sign any unsigned tx in a wallet UI.
- Validate 0x addresses server-side.
- Rate-limit your own users in addition to Apogee’s IP limit.
- Log tool name, truncated query, timestamp — not secrets.
9. Logging
Apogee may write tool name + query to apogee_usage (Supabase, RLS, no public policies). Your app should keep its own audit log.