Skip to main content
Mithril runs a hosted MCP server so an AI agent (Claude, Codex, your own) can use Mithril as tools: search markets, place and cancel orders, read positions/fills/portfolio, and manage risk limits — with every order still risk-checked server-side. It’s just another consumer of the public API: it forwards each tool call to the gateway with your bearer key and holds no logic or exchange keys of its own.

Connect your agent

Point your MCP client at the hosted endpoint and pass your Mithril API key as a bearer token — no install, no local binary. Use mk_test_... for the sandbox.
The key is the same mk_live_ / mk_test_ key from the dashboard you’d use with the REST API or SDK. Each request builds a per-request client from your key — an unauthenticated call never reaches Mithril.

Tool catalog

Sixteen tools, each with a typed schema the agent reads: place_order attaches an idempotency key automatically. cancel_all_orders is a one-call kill switch. Because the same guardrails apply, an agent physically can’t place an order outside the limits you set — set_risk_limits and a low max_order_notional are your seatbelt for autonomous trading.
Give an agent an mk_test_ key first and watch it trade the sandbox before handing it a live key with tight limits.

Local (stdio) mode

Prefer to run it yourself? The server also speaks stdio, taking a single key from MITHRIL_API_KEY:

Set your guardrails first

The limits an agent trades within.