Quickstart
Requires Node.js v18+ installed locally (used bynpx).
Add to MCP config:
EVM_WALLET_PRIVATE_KEY - EVM private key without 0x. Enables signing/broadcast tools.
Example Workflow
A typical cross-chain swap via the MCP server follows this flow:Tools
Tools are split into read-only (work without a key) and execution (requireEVM_WALLET_PRIVATE_KEY). In hosted mode, only read-only tools are available.
Security Model
Rubic MCP Server is non-custodial:- Private keys never leave your machine.
EVM_WALLET_PRIVATE_KEYis read from a local.envfile or MCP client config, used for in-process signing via viem, and never transmitted over the network. - The server constructs transaction calldata (
rubic_build_swap_tx) and returns it as a structured JSON object. Signing and broadcast are separate, opt-in steps. - Without
EVM_WALLET_PRIVATE_KEY, the server operates in read-only mode: quotes, token search, chain discovery, and swap URL generation work normally. Signing tools return a clear error. - The Rubic API (
rubic-api-v2.rubic.exchange) receives swap parameters and returns routing + calldata. It never receives your private key.
Limitations
Rubic MCP Server does not:- Custody or store private keys. Keys exist only in your local env / process memory.
- Support non-EVM chains for signing.
rubic_sign_txandrubic_broadcast_txwork only on EVM chains. For non-EVM chains (Solana, TRON, TON, Bitcoin), userubic_build_swap_txto get calldata and sign externally, or userubic_get_swap_urlfor browser-based execution. - Execute limit orders or DCA. Only market swaps via routing aggregation.
- Guarantee complete portfolio coverage.
rubic_get_balanceschecks tokens from bundledtokens.json. Custom/unlisted tokens may require manual contract checks. - Manage token approvals automatically. If an ERC-20 approval is needed,
rubic_build_swap_txreturnsapprovalAddress— the user must approve separately. - Guarantee price. Quotes are estimates; actual execution price may differ due to slippage, MEV, or market movement between quote and broadcast.
- Support fiat on/off-ramp. No bank, card, or payment provider integration.