Connect · MCP

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.

HostedStdio
RunsPOST https://usetomahawk.xyz/api/v2/mcp (alias /mcp)packages/mcp in this repository, built locally
TransportJSON-RPC over POST, answers application/jsonstdio
AuthAuthorization: Bearer renko_sk_...RENKO_API_KEY env
Use whenThe client takes a URL and headersThe 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.

bash
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:

bash
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.

bash
pnpm -C <repo>/packages/mcp build
export RENKO_API_KEY=renko_sk_test_...
node <repo>/packages/mcp/dist/stdio.js

Refusals

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).

ToolScopeMoves money
whoamiany keyno
get_marketsmarket:readno
get_marketmarket:readno
get_orderbookmarket:readno
get_candlesmarket:readno
get_route_quotemarket:readno
get_accountaccount:readno
get_open_ordersaccount:readno
get_fillsaccount:readno
preview_orderorders:executeno
place_orderorders:executeyes
cancel_orderorders:executeyes
cancel_allorders:executeyes
close_positionorders:executeyes
set_leverageorders:executeyes
sol_pulsemarket:readno
sol_searchmarket:readno
sol_tokenmarket:readno
sol_candlesmarket:readno
sol_token_tradesmarket:readno
sol_holdersmarket:readno
sol_top_tradersmarket:readno
sol_quotesol:tradeno
sol_tradesol:tradeyes
sol_portfolioaccount:readno
sol_create_ordersol:tradeyes
sol_cancel_ordersol:tradeyes
funding_optionsswap:quoteno
funding_quoteswap:quoteno
Note
Use a test key: it trades on the simulator only.