rhc-mcp

rhc-mcp

Enables AI agents to read Robinhood Chain stock-token positions, quote swaps, and execute swaps through the Model Context Protocol, bridging on-chain assets that Robinhood's own off-chain MCP cannot reach.

Category
访问服务器

README

rhc-mcp

An MCP server for Robinhood Chain — the on-chain agentic surface Robinhood's own agent can't reach.

Robinhood's Agentic Trading exposes an MCP server so any Claude / ChatGPT / MCP agent can trade — but it's off-chain, US-only, equities-only. It can't see or touch the tokenized Robinhood Chain stock tokens.

rhc-mcp is the complement: point any MCP-speaking agent at Robinhood Chain and let it read on-chain stock-token positions, see the real total-return value ERC-20 reads hide, quote, and swap — over the same Model Context Protocol. Read tools need no key; swapping is off by default and heavily guarded.

Swaps go through Robinhood Chain's Uniswap v4 UniversalRouter directly — nothing to deploy. One catch worth knowing: the chain forks the v4 swap struct with an extra minHopPriceX36 field, so stock Uniswap SDK calldata reverts. This encoder adds it (verified byte-identical to real on-chain swaps). The sibling repo RHCSwap is an alternate route (a tiny contract that hits the v4 PoolManager directly) if you'd rather not touch Permit2.


How it fits

flowchart LR
    A["AI agent<br/>(Claude · ChatGPT · any MCP client)"]
    subgraph RH["Robinhood's MCP"]
      O["off-chain brokerage<br/>US · equities only"]
    end
    subgraph THIS["rhc-mcp (this repo)"]
      T["get_positions · quote_swap · execute_swap"]
    end
    subgraph CHAIN["Robinhood Chain (Arbitrum Orbit, id 4663)"]
      R["stock tokens<br/>balanceOf + uiMultiplier"]
      Q["Uniswap v4 Quoter"]
      S["UniversalRouter + Permit2<br/>(v4 swap)"]
    end
    A -->|off-chain trades| O
    A -->|on-chain, this repo| T
    T --> R
    T --> Q
    T --> S

Tools

Tool Access What it does
rhc_info read Chain / RPC / contract addresses; reports whether swapping is enabled or read-only.
get_positions read A wallet's stock-token positions: raw balance, uiMultiplier, the real total-return balance (raw × multiplier ÷ 1e18), and the accrued appreciation % that raw ERC-20 reads hide.
quote_swap read Exact-input single-hop quote via the Uniswap v4 Quoter. Proves the pool has liquidity and sizes minAmountOut.
execute_swap write Executes a swap via the Uniswap v4 UniversalRouter (+ Permit2 for ERC-20 input) — no deployed contract. Dry-run by default; guarded (see Safety).

The uiMultiplier insight

Stock tokens are ERC-8056 total-return tokens: raw balanceOf is static, and uiMultiplier() (1e18-scaled) grows as in-kind dividends reinvest and on splits. A naive ERC-20 balance read understates what a holder actually owns. get_positions surfaces both and the gap between them — the on-chain yield an agent would otherwise miss.

Install

git clone https://github.com/jumpboxtech/rhc-mcp && cd rhc-mcp
npm install && npm run build
cp .env.example .env   # edit for swapping; read tools need nothing

Wire it to an agent

Claude Code:

claude mcp add rhc-mcp -- node /absolute/path/to/rhc-mcp/dist/index.js

Claude Desktop / any MCP client (claude_desktop_config.json):

{
  "mcpServers": {
    "rhc-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/rhc-mcp/dist/index.js"],
      "env": { "RHC_RPC_URL": "https://rpc.mainnet.chain.robinhood.com" }
    }
  }
}

Then ask your agent: "What are my Robinhood Chain positions for 0x…?" or "Quote 1 NVDA to USDG."

Safety model

execute_swap moves real funds, so it is deliberately locked down:

  • Read-only by default — with no RHC_PRIVATE_KEY, the server can only read; swaps are refused.
  • Key never touches the tool surface — the signer comes only from RHC_PRIVATE_KEY, never a tool argument, and is never returned or logged.
  • Dry-run by defaultexecute_swap returns the plan (expected out, enforced min out, and which Permit2 approvals a real run would send) without sending unless the caller passes dryRun: false.
  • Hard size capRHC_MAX_SWAP_AMOUNT (whole input tokens, default 1) bounds any single swap.
  • Slippage always enforced — a real minAmountOut is required, taken from the argument or derived from a fresh quote minus slippageBps.
  • Scoped Permit2 grant — the Permit2 → router allowance is scoped to amountIn with a short (~1h) expiry, not an unbounded standing approval.

Configuration

Env Required for Meaning
RHC_RPC_URL RPC endpoint (defaults to the public mainnet RPC).
RHC_PRIVATE_KEY swapping Signer key. Unset ⇒ read-only. Keep it in a real secret store.
RHC_MAX_SWAP_AMOUNT swapping Per-swap input cap in whole tokens (default 1).

Robinhood Chain addresses (chain id 4663)

Contract Address
UniversalRouter (the real one; 2 decoys exist) 0x8876789976DECBFcbBBe364623C63652dB8c0904
Permit2 0x000000000022D473030F116dDEE9F6B43aC78BA3
Uniswap v4 PoolManager 0x8366a39CC670B4001A1121B8F6A443A643e40951
StateView 0xf3334192d15450cdd385c8b70e03f9a6bd9e673b
Quoter 0x8dc178efb8111bb0973dd9d722ebeff267c98f94

RPC: https://rpc.mainnet.chain.robinhood.com · Explorer: robinhoodchain.blockscout.com

Scope & limits

Exact-input, single-hop, hookless pools — deliberately minimal. Exact-output and multi-hop aren't covered (and haven't been checked for the same minHopPriceX36 quirk). The known-token registry is a small starter set (USDG, NVDA); pass any 0x address directly. Unaudited — read it before you route funds through it.

License

MIT © jumpbox — jumpbox.tech · @jumpbox_tech

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选