twofold-mcp
v1.2.0
Published
MCP server for Twofold, the dual-yield liquidity protocol on Robinhood Chain: pools, swaps, staking, with its own sandboxed wallet and ASCII dashboards.
Maintainers
Readme
What it does
Sixteen tools over stdio. Each reply renders as terminal output, so you can read the state your agent acted on at a glance:
│ TWO/USDG │ $205.46 │ ████████████████████████ │ 325,505.92 TWO │
│ USDe/USDG │ $150.00 │ ██████████████████░░░░░░ │ 149.53 USDe │
TVL, last 30h: ▁▂▂▂▂▂▂▁▂▁▂▂▂▂▃▄▅▁▃▇▇▇▇▇▇█████| tool | what it does |
|---|---|
| wallet_info | the server's own wallet: address and balances |
| wallet_send | send ETH or any ERC-20 from that wallet |
| pools_list | every Twofold pool, reserves drawn as a depth chart |
| pool_position | your shares in a pool and what burning them returns |
| pool_deposit | two-sided deposit, sized on-chain, slippage-capped |
| pool_withdraw | burn shares, take both legs back (stack: "first" for a position opened on the 2026-08 pools; new deposits always go to the current pools) |
| quote | price a swap without sending anything; venue: reference probes the chain's hookless pools (any pair, e.g. TWO/WETH) |
| swap | swap through a Twofold pool (or a reference pool via venue), quoted first, with a real minimum out |
| stake / start_unstake / claim_unstaked | the TWO staking cycle (1h cooldown) |
| claim_rewards / staking_info | streaming rewards and vault state |
| rewards_stream | live emission rate, days left, and what remains to distribute |
| market_activity | 24h volume per pair chain-wide, plus the latest vault flow |
| platform_stats | TVL bar chart, staking APY, a TVL sparkline |
Quickstart
npx twofold-mcp # or: npm i -g twofold-mcpRegister it with your MCP host. For Claude Code, put this in your project's
.mcp.json:
{ "mcpServers": { "twofold": { "command": "npx", "args": ["-y", "twofold-mcp"] } } }For Claude Desktop, add the same entry under mcpServers in
claude_desktop_config.json.
The wallet
On first run the server generates a fresh private key and stores it at
~/.twofold/wallet.key (mode 600). It never imports or touches a key you
already own. Ask your agent for wallet_info, send that address a little ETH
for gas plus the USDG you want it to trade on Robinhood Chain (chain id
4663), and the tools go live.
TWOFOLD_KEYFILEmoves the key somewhere else.TWOFOLD_RPCpoints at your own endpoint instead of the publicrpc.mainnet.chain.robinhood.com.
Safety model
- The wallet spends only what you send it.
- The server quotes each swap through the on-chain Quoter first and executes
with a real
amountOutMinimum, not zero. - Deposits and withdrawals carry slippage caps on both legs, 0.50% by default.
- There is no backend and nothing custodial: the server talks straight to the chain, and whoever holds pool shares can burn them back to tokens.
What Twofold is
Twofold pools pair tokenized equities (SPY, NVDA, TSLA, GME and more) and other assets against USDG. Idle USDG earns lending yield in ERC-4626 vaults while the same dollars quote swaps: one deposit, two yields. Live numbers: twofold.fi/stats.
