MCP for agents
DarkHooks speaks the Model Context Protocol over streamable HTTP at /api/mcp. An agent can list the pairs, ask for quotes and read the tape. Filling stays with the agent's own wallet: the server never holds a key on anyone's behalf.
{
"mcpServers": {
"darkhooks": { "type": "http", "url": "https://darkhooks.app/api/mcp" }
}
}Tools
| Tool | Arguments | Returns |
|---|---|---|
list_pairs | none | Pairs, token addresses, decimals, a suggested size. |
request_quotes | pair, size | The same response as /api/rfq: signed quotes, best bid and ask, pool comparison. |
darkhooks_swap_calldata | quote, signature, side, amount | Universal Router calldata settling that side through the DarkHooks v4 pool. It tells the server your side; build it locally to keep it. |
darkhooks_pools | none | The hook, its pools, the router and Permit2. |
get_tape | limit | Recent fills read from the contract. |
There is no tool argument for a side, on purpose. An agent decides locally, then calls fill with the SDK's fill(account, quote, side) or any EVM library.
curl -s https://darkhooks.app/api/mcp -H 'content-type: application/json' -d '{
"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"request_quotes","arguments":{"pair":"WETH","size":"0.00002"}}
}'