MCP server
One tool list, two ways to reach it. Both call the REST API with your key, so the key's scopes and policy apply to every call.
| Hosted | Stdio | |
|---|---|---|
| Runs | POST https://usetomahawk.xyz/api/v2/mcp (alias /mcp) | packages/mcp in this repository, built locally |
| Transport | JSON-RPC over POST, answers application/json | stdio |
| Auth | Authorization: Bearer renko_sk_... | RENKO_API_KEY env |
| Use when | The client takes a URL and headers | The client only launches commands, or you want read-only mode |
Hosted endpoint
Protocol versions 2025-03-26, 2025-06-18 and 2025-11-25; methods initialize, ping, tools/list, tools/call. No sessions, no streaming, no batches. Without a key every call answers 401. A key only sees the tools its scopes allow. Client configs are on Connect a client.
curl -s https://usetomahawk.xyz/api/v2/mcp \
-H "Authorization: Bearer $RENKO_API_KEY" -H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Run a tool:
curl -s https://usetomahawk.xyz/mcp \
-H "Authorization: Bearer $RENKO_API_KEY" -H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_market","arguments":{"symbol":"BTC"}}}'Stdio server
The stdio server is not published to npm. Build it from a checkout of this repository (it needs the workspace dependencies installed) and run the built file. Environment: RENKO_API_KEY (without it only public market data works), RENKO_BASE_URL (default https://usetomahawk.xyz), RENKO_READONLY=1 (hide and refuse every tool that moves money). It prints one line to stderr when it is ready.
pnpm -C <repo>/packages/mcp build
export RENKO_API_KEY=renko_sk_test_...
node <repo>/packages/mcp/dist/stdio.jsRefusals
A refused call returns a normal result with isError: true and a JSON body such as {"error":{"code":"policy_denied","message":"..."}}. Do not retry policy_denied, forbidden or live_off.
Tools
29 tools. Rows marked yes place, cancel or trade and need an execute scope. The funding tools need swap:quote and answer live_off while live trading is off. The full descriptions and JSON schemas are at /api/v2/agent/tools (public).
| Tool | Scope | Moves money |
|---|---|---|
| whoami | any key | no |
| get_markets | market:read | no |
| get_market | market:read | no |
| get_orderbook | market:read | no |
| get_candles | market:read | no |
| get_route_quote | market:read | no |
| get_account | account:read | no |
| get_open_orders | account:read | no |
| get_fills | account:read | no |
| preview_order | orders:execute | no |
| place_order | orders:execute | yes |
| cancel_order | orders:execute | yes |
| cancel_all | orders:execute | yes |
| close_position | orders:execute | yes |
| set_leverage | orders:execute | yes |
| sol_pulse | market:read | no |
| sol_search | market:read | no |
| sol_token | market:read | no |
| sol_candles | market:read | no |
| sol_token_trades | market:read | no |
| sol_holders | market:read | no |
| sol_top_traders | market:read | no |
| sol_quote | sol:trade | no |
| sol_trade | sol:trade | yes |
| sol_portfolio | account:read | no |
| sol_create_order | sol:trade | yes |
| sol_cancel_order | sol:trade | yes |
| funding_options | swap:quote | no |
| funding_quote | swap:quote | no |