mcp

v0.1.5
@maroo-chain/mcp Checked 15 hours ago Published 10 days ago

Maroo Chain MCP — chain knowledge, chain reads and a local-key testnet wallet for AI clients.

Maroo Chain MCP — chain knowledge + chain access for AI clients. Pairs with @maroo-chain/m-aws (the agent-wallet stack); stands alone as the chain's eyes. Wire it into Claude Code, Cursor, Claude Desktop, Windsurf, or Gemini CLI: 12 tools across 3 categories. Not all of them are read-only: maroo_wallet_create and maroo_wallet_import write an encrypted key file under ~/.maroo/keystore/, and maroo_send signs a transfer with that key and broadcasts it to Maroo testnet (after the preflight checks), then records the amount in ~/.maroo/daily-spending.json for the local spending limits.

Summary extracted from the README.

@maroo-chain/mcp

Maroo Chain MCP — chain knowledge + chain access for AI clients. Pairs with @maroo-chain/m-aws (the agent-wallet stack); stands alone as the chain's eyes.

Two MCP servers in one kit:

  • @maroo-chain/mcp ← this one. Knowledge base + chain reads, plus a local-key testnet wallet.
  • @maroo-chain/m-aws — stateful agent-wallet stack. AA wallets, on-chain policy, transfers.

Install

Wire it into Claude Code, Cursor, Claude Desktop, Windsurf, or Gemini CLI:

claude mcp add maroo -- npx -y @maroo-chain/mcp serve

Or globally:

npm i -g @maroo-chain/mcp
maroo-mcp init       # create ~/.maroo/keystore and register `maroo` with your MCP clients (asks per client)
maroo-mcp serve      # start the MCP server (stdio)

What you get

12 tools across 3 categories. Not all of them are read-only: maroo_wallet_create and maroo_wallet_import write an encrypted key file under ~/.maroo/keystore/, and maroo_send signs a transfer with that key and broadcasts it to Maroo testnet (after the preflight checks), then records the amount in ~/.maroo/daily-spending.json for the local spending limits. The other nine tools only read: the bundled knowledge base, the chain, and that spending file (maroo_balance, maroo_preflight). The three wallet tools take a private key or passphrase as a tool argument; see Keys and passphrases.

Knowledge — 3 tools

The Maroo knowledge base ships in the package, organised in sections under concepts/, apis/, guides/ and resources/. maroo_discover reports the current entry count and lists every section.

Tool Purpose
maroo_discover Adaptive overview of every section the KB covers. Call FIRST in any conversation about Maroo.
maroo_kb_search Keyword search across the bundled KB entries.
maroo_kb_lookup Read a specific entry by id or path.

Wallet & Chain — 4 tools

Generic chain access via viem against Maroo testnet (chainId 450815).

Tool Purpose
maroo_chain_info Chain status: block height, gas price, RPC, explorer.
maroo_wallet_create Generate a new key, encrypt with AES-256-GCM at ~/.maroo/keystore/.
maroo_wallet_import Import an existing key, encrypted at rest.
maroo_balance OKRW balance + on-chain PCL daily-volume snapshot.

Compliance & Transaction — 5 tools

Maroo's compliance gates (PCL precompile) + transfer ergonomics.

Tool Purpose
maroo_pcl_check Would PCL's global policy accept this transfer (per-transfer cap, daily volume, KYC exemption)? Read-only preview.
maroo_pcl_limits { amount, maxAmount, remaining, resetAt } for the daily window that binds the address, plus the per-transfer cap, KYC status and the largest transfer allowed now. null = that cap does not apply to the address; "?" = could not be determined (evaluable: false), never "unlimited".
maroo_preflight Combined check: local policy + PCL + balance. Run before maroo_send.
maroo_send Sign + broadcast an OKRW transfer. Auto-runs preflight as a safety net.
maroo_tx_status Poll a tx hash for receipt.

Keys and passphrases

The wallet tools take secrets as ordinary tool arguments:

Tool Secret arguments What it does
maroo_wallet_create passphrase Generates a private key and saves it, encrypted with the passphrase, under ~/.maroo/keystore/
maroo_wallet_import privateKey, passphrase Imports a raw private key into that keystore
maroo_send passphrase Decrypts the key, then signs and broadcasts a Maroo testnet OKRW transfer

Tool arguments are written by the model, so the model provider sees every private key and passphrase passed to these tools, and the MCP client keeps them in the conversation transcript. The key file is encrypted at rest, but that does not keep these arguments out of the conversation. Import only a disposable testnet key, never one that controls funds on another network, and never reuse a passphrase from elsewhere.

Architecture

  • MCP server: stdio transport, @modelcontextprotocol/sdk v1.12+.
  • Chain access: viem public client for reads against rpc-testnet.maroo.io. Private keys stay in ~/.maroo/keystore/: maroo_send decrypts one in memory with the passphrase, signs locally and sends only the signed transaction.
  • PCL precompile: 0x1000000000000000000000000000000000000005 (Maroo v0.9.0+ ABI). globalPolicies() returns the policy tree the chain evaluates before every transfer; globalPeriodicVolume(address user, string asset, uint64 resetPeriodSeconds, bool resolveAgentOwners) returns PeriodicVolume[] { amount, maxAmount, resetPeriodSeconds, resetAt }. The PCL tools decode the tree and mirror the chain's rules for a native OKRW (atokrw) transfer; on testnet that is 2,000,000 OKRW per transfer and 10,000,000 OKRW per UTC day. A KYC EAS attestation on a regular wallet lifts both caps. For an agent wallet the daily cap is counted per owner (the owners of the agents bound to it) and binds every owner without the attestation. An owner's attestation lifts the per-transfer cap and exempts that owner's own daily counter; the agent wallet's own attestation lifts the per-transfer cap, and exempts a daily counter only when the wallet is itself one of its owners, so a KYC'd agent wallet whose only owner is itself has neither cap. The pre-0.1.4 view globalOkrwEasPeriodicVolume(address) was removed from the chain and always reverts. A PCL read that reverts, an unindexed periodic counter, an agent wallet bound to more than 2,000 agents, or a policy template this version cannot evaluate (anywhere in the tree) fails closed. maroo_pcl_check and preflight pass through (verdict: "unavailable"), as in 0.1.x, only when no attempt of the first read, globalPolicies(), gets an answer: viem retries that read 3 times, and every attempt fails before any HTTP response arrives (DNS failure, connection refused or reset, a connect timeout). Everything else fails closed: any attempt of that read that gets an HTTP response (any status, a gateway's 504 included, even a 200 whose body is then cut off), a JSON-RPC error, a TLS error or a request timeout, whatever the other attempts get, and any failure of a later read, a missing response included.
  • Knowledge base: bundled in the published tarball at <package>/content/. Override with MAROO_KB_PATH to point at a custom KB clone.

Environment

Var Default Purpose
MAROO_KB_PATH bundled content/ Knowledge base directory. Set for local KB development.
MAROO_RPC_URL https://rpc-testnet.maroo.io RPC endpoint. Set for a private testnet or local node.

License

MIT. © Hashed Open Finance.