Skip to main content
Glama

OpalHook MCP

An MCP server for Robinhood Chain trading agents. It provides quotes, policy-checked unsigned public-swap calldata, simulation, hook information, prices and OpalHook's deployed-contract directory. It never holds a key, signs or broadcasts.

Derived from the MIT-licensed ZeroHook MCP server. Original attribution and exact upstream revision are retained in LICENSE, NOTICE and UPSTREAM.json. OpalHook adds its own SDK integration, configuration/server identity and a read-only deployment-discovery tool.

Install

Install v0.1.3 from GitHub in your project. Use Node 22.13 or newer.

npm install https://github.com/opalhook/opalhook-mcp/releases/download/v0.1.3/opalhook-mcp-0.1.3.tgz

The package name is @opalhook/mcp. The package is unpublished on the npm registry.

Set your MCP client’s stdio command to the absolute path to node_modules/.bin/opalhook-mcp in that project. Protocol JSON-RPC stays on stdout, and logs go to stderr.

Related MCP server: Rialto Swap MCP

Build and connect

Node 22.13 or newer. The OpalHook SDK dependency is a pinned built GitHub release asset; no sibling checkout is needed.

git clone https://github.com/opalhook/opalhook-mcp.git opalhook-mcp
cd opalhook-mcp
npm ci --ignore-scripts
npm run typecheck
npm run build
npm test
npm start

When running from a source checkout, configure your MCP client to run node /absolute/path/to/opalhook-mcp/dist/index.js using stdio.

Tools

  • quote: routes and policy preview, without executable calldata.

  • build_swap: policy checks, simulation and unsigned calldata; a separate wallet must review and sign.

  • simulate: read-only call/gas estimate.

  • list_hook_pools, hook_passport: indexed hook information.

  • token_price, stock_tokens: public market data.

  • spending_policy: current limits and ledger usage.

  • opalhook_deployment: OpalHook privacy contracts and approval scope. It does not construct a private proof or activate spending.

Policy and configuration

OPALHOOK_POLICY_FILE selects a policy JSON file; OPALHOOK_POLICY supplies inline policy JSON. OPALHOOK_LEDGER_FILE persists daily usage across restarts. Configure that file for durable limits: the default in-memory ledger resets when the process restarts. Do not commit your operational ledger.

OPALHOOK_RPC_URLS chooses read RPCs. OPALHOOK_POOLS_FILE adds pool definitions and OPALHOOK_DISCOVER_BLOCKS enables a bounded startup discovery scan. Default discovery is off. The original policy schema remains compatible with the app's exported policy.

Policy rules cover per-trade and daily USD limits, token allowlists, slippage, price impact, pinned contracts/hooks and simulation. The ledger counts returned calldata, not confirmed settlement. Local policy cannot stop a separate wallet/client from acting outside this server. See the source and tests for exact rules; no audit or transaction-success guarantee is made.

This server builds public swaps only. Private spending uses the OpalHook app, a local note vault and OpalHook operator-reviewed deposits. This is not 0xbow screening. The deployment directory is returned by opalhook_deployment; inspect addresses on the Robinhood Chain explorer. Tests use mocked routing and an actual local stdio client; they execute no live swap.

Compatibility

See the migration guide for earlier releases and supported aliases.

Available Tools

10 tools
blurhook_deploymentOpalHook deployed privacy infrastructureA
Read-only

Read OpalHook contract addresses and privacy scope on Robinhood Chain. This tool does not construct private proofs or authorize deposits.

Inputs: no named parameters.

build_swapBuild swap calldata under the spending policyA

Quote, enforce the spending policy (allowlist, per-trade cap, daily cap, max slippage, max price impact, pinned contracts and hooks), simulate from the agent wallet, and return Universal Router calldata for that wallet to sign. ERC-20 input without Permit2 allowances returns the approval calldata first. Refusals list every rule that failed. The trade's USD size counts toward the daily cap once calldata is returned.

Inputs: from (required), amount (required), tokenIn (required), tokenOut (required), +1 more.

hook_passportHook PassportA
Read-only

What a Uniswap v4 hook can do, read from public on-chain data: permission flags from its address, proxy and owner, Sourcify verification, admin-style functions in its bytecode, pools in the list, and a rule-based risk score with every rule that fired.

Inputs: hook (required).

list_hook_poolsList Uniswap v4 hooks and their poolsA
Read-only

Hooks in the server's pool list ranked by swaps, with pool counts, tokens and recorded codehash pins. Pass a hook to list its pools, or a token to filter.

Inputs: hook, limit, token.

opalhook_deploymentOpalHook deployed privacy infrastructureA
Read-only

Read OpalHook contract addresses and privacy scope on Robinhood Chain. This tool does not construct private proofs or authorize deposits.

Inputs: no named parameters.

quoteQuote a swapA
Read-only

Best route for a swap on Robinhood Chain across Uniswap v3 (4 fee tiers), v4 and hooked v4 pools, including splits and two-hop routes via USDG or ETH. Returns amounts, minimum received, price impact, pinned-code and hook checks, warnings, and a preview of the spending-policy verdict. Never returns calldata.

Inputs: amount (required), tokenIn (required), tokenOut (required), slippageBps.

simulateSimulate a transactionA
Read-only

Run a transaction with eth_call from a wallet and estimate its gas, without sending it. Returns ok, gasEstimate and the revert reason when it fails. fundEth gives the wallet enough ETH through a state override for a dry run.

Inputs: to (required), data (required), from (required), value, +1 more.

spending_policySpending policyA
Read-only

The spending policy this server enforces before returning calldata, the USD spent in the rolling 24 h window and what is left of the daily cap.

Inputs: no named parameters.

stock_tokensVerified Robinhood Stock TokensA
Read-only

Robinhood Stock Tokens on Robinhood Chain, listed only when the contract's runtime code exactly matches the official Stock Token proxy (copycats with the same symbol are never listed), with whether the spending policy allows trading each.

Inputs: no named parameters.

token_priceToken USD pricesA
Read-only

USD price per whole token from live Uniswap v3/v4 quotes, directly against USDG or via ETH (USDG counts as 1 USD). Up to 30 tokens.

Inputs: tokens (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 10 tools

    Disambiguation2/5

    opalhook_deployment and blurhook_deployment have byte-for-byte identical descriptions, so an agent cannot tell which to call or whether they differ. The remaining tools (quote, build_swap, simulate, spending_policy, token_price, stock_tokens, hook_passport, list_hook_pools) are clearly distinct, and quote/build_swap are explicitly demarcated (one never returns calldata).

    Naming Consistency3/5

    All names are snake_case, but the convention splits: read-only tools are bare nouns (quote, simulate, stock_tokens, hook_passport) while the mutating one is verb_noun (build_swap), and two tools are prefixed with near-duplicate product names (opalhook_/blurhook_). It reads fine but is not a predictable verb_noun pattern.

    Tool Count4/5

    10 tools is well within the healthy range and each covers a real step of the swap/hook workflow. The lone redundancy is the duplicated deployment tool, which is a content problem rather than a count problem.

    Completeness4/5

    The surface covers the full flow: price discovery (quote, token_price), policy check, calldata construction with allowance handling (build_swap), dry-run (simulate), and context (deployment, hook_passport, list_hook_pools, stock_tokens). Minor gaps remain — no direct balance/allowance query, no transaction submission or status tracking — but agents can work around these via simulate and wallet-side signing.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      B
      maintenance
      A zero-config data server for read-only queries on Robinhood Chain (stock tokens, memecoins, launches, chain stats) and an opt-in trading server with spend caps and confirm gates for executing swaps and transfers.
      9
      68 npm
      9
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables 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.
      4
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an agent to quote swaps and get unsigned transaction calldata for trading on Robinhood Chain, with best-price routing checked against a spending policy (caps, allowlists, slippage, price impact, pinned contracts, simulation) before anything is returned. Also provides simulation, hook-pool and hook-risk inspection, token price lookups, verified stock-token listing, and rolling spend status, while never holding keys, signing, or sending.
      MIT