@zerohooktrade/mcp
Enables agents to trade on Robinhood Chain (chain id 4663) through the Zerohook routing engine, including quotes, swap calldata building, simulations, hook pool inspection, token pricing, stock-token discovery, and spending-policy enforcement.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@zerohooktrade/mcpQuote 0.5 ETH to USDG at 0.5% slippage and give me the swap calldata"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@zerohooktrade/mcp
A Model Context Protocol server that lets an agent trade on Robinhood Chain (chain id 4663) through the Zerohook routing engine (@zerohooktrade/sdk), under a spending policy enforced before any calldata leaves the server.
Read-only and calldata only. The server never holds a key, never signs and never sends. The agent's own wallet signs what
build_swapreturns.Best price across Uniswap v3 (all four fee tiers), v4 and hooked v4 pools, with splits and two-hop routes through USDG or ETH.
Spending policy: per-trade cap, rolling 24 h cap, token allowlist, max slippage, max price impact, pinned contracts and hooks, and an
eth_callsimulation from the agent wallet. The same rules as the agent-mode page of the app; the policy JSON it exports loads here unchanged.stdio transport. Logs go to stderr only.
Links: app dapp.zerohook.trade · docs docs.zerohook.trade · site zerohook.trade.
Install
The server depends on the SDK as a sibling folder (file:../zhook-sdk):
git clone https://github.com/zerohooktrade/zhook-sdk.git
git clone https://github.com/zerohooktrade/zhook-mcp.git
(cd zhook-sdk && pnpm install && pnpm build)
cd zhook-mcp && pnpm install && pnpm buildRequires Node 20 or later.
Related MCP server: @krypsisnetwork/mcp
Connect an MCP client
Any client that launches stdio servers works. A typical mcpServers entry:
{
"mcpServers": {
"zerohook": {
"command": "node",
"args": ["/absolute/path/to/zhook-mcp/dist/index.js"],
"env": {
"ZHOOK_POLICY_FILE": "/absolute/path/to/policy.json",
"ZHOOK_LEDGER_FILE": "/absolute/path/to/spend-ledger.json"
}
}
}
}Configuration
Variable | Meaning | Default |
| Spending policy JSON file | built-in policy below |
| The same policy as an inline JSON string | |
| JSON file keeping the rolling 24 h spend across restarts | in memory |
| Comma-separated Robinhood Chain read RPCs | public RPCs |
| Extra v4 pools: an array (or | none |
| Scan this many recent blocks for new pools at start |
|
The SDK's bundled default pool set is always loaded; the pools file and discovery add to it.
Spending policy
{
"name": "trading-agent",
"perTradeUsd": 250,
"dailyUsd": 1000,
"allowlist": [
{ "symbol": "ETH", "address": "ETH" },
{ "symbol": "USDG", "address": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168" }
],
"allowVerifiedStockTokens": false,
"maxSlippageBps": 50,
"maxPriceImpactPct": 1,
"hooks": true,
"pinnedHooksOnly": true,
"requireSimulation": true
}This is the built-in default. Fields:
Field | Rule |
| Refuse when amount × live USD price of |
| Refuse when the rolling 24 h total plus this trade is above this. |
| Both tokens must be listed ( |
| Also allow any Robinhood Stock Token whose contract code exactly matches the official proxy. |
| Ceiling for slippage (1–300). The minimum received is enforced on-chain by the router. |
| Refuse above this impact, or when impact cannot be measured. |
| Route through hooked v4 pools. |
| Refuse routes through a hook whose code is not pinned or has changed. |
| Refuse unless the calldata passes |
| Optional integrator fee (0–50 bps). |
Every pinned contract (Universal Router, Permit2, v4 PoolManager, quoters, v3 factory, WETH9, USDG) must match its recorded codehash, always.
The trade's USD size is added to the ledger when build_swap returns calldata, whether or not the agent then sends it, so the cap can only be under-used, never exceeded.
Tools
Tool | Input | Returns |
|
| Route, amounts, minimum received, price impact, pin and hook checks, warnings, and the policy verdict preview. No calldata. |
|
|
|
|
|
|
|
| Hooks ranked by swaps with codehash pins, or one hook's pools. |
|
| Permission flags, proxy, owner, Sourcify status, admin-style functions, risk score and rules. |
|
| USD price per whole token from live Uniswap quotes (USDG = 1). |
| none | Robinhood Stock Tokens verified by exact proxy code, with |
| none | Active policy, spend in the rolling 24 h window, remaining daily cap. |
Tokens are addresses on Robinhood Chain, or "ETH" for native ETH. Amounts are decimal strings in whole-token units.
Typical flow
quoteto see the route and whether the policy would allow it.build_swapwith the agent wallet asfrom.If
needs_approval: sign and send the approvals, then callbuild_swapagain.Sign and send
txbeforedeadline. The router reverts if fewer thanminOuttokens arrive.
Limits
Exact-input swaps only; one chain (Robinhood Chain).
The ledger is per server process unless
ZHOOK_LEDGER_FILEis set. Two servers sharing one wallet should share one ledger file, and not run at the same time.Prices for the caps come from live Uniswap quotes; USDG is counted as 1 USD.
Public RPCs rate-limit; set
ZHOOK_RPC_URLSfor heavy use.v4 routing covers the pool list in use (default set, pools file, discovery). See the SDK README for routing limits.
Development
pnpm lint && pnpm typecheck && pnpm build && pnpm testTests drive the real MCP protocol through an in-memory client against a deterministic engine, and spawn the built server over stdio to check that stdout carries only JSON-RPC.
License
MIT © Zerohook
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP for Rialto quotes and swap preflight on Robinhood Chain. No signing or broadcast.
Swap quotes + unsigned txs on 8 EVM chains, plus Solana data: boards, candles, wallet PnL. No key.
Best-route swap quotes, token search and USD prices across EVM chains. Read-only, never trades.
Gasless MEV-protected swaps + cross-chain quotes across EVM chains — incl. tokenized stocks.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables MCP clients to get swap quotes and calldata on Robinhood Chain with equity-aware guardrails such as oracle fair-price checks and market-hours warnings, without holding keys or executing transactions.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients and AI agents to privately swap and send assets on Robinhood Chain, with quotes, swap creation, deposit payment from an optional local wallet, status checks, handoff links, wallet balances, and rewards.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to obtain on-chain DEX aggregator quotes computed by the on-chain Quoter contract through their own RPC node, returning verified unsigned swap calldata, simulations, token info, deployment registry checks, and live staking solvency. All tools are read-only and keyless, so the agent never signs or holds a private key.748 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables authenticated agents to discover and invoke trading tools, manage resources and prompts, and place real equity, option, or crypto orders through a Robinhood Agentic Account.MIT