Rubic logo

Swap Tokens Across 70+ Chains
via AI Agents

With Quoting and Swap Simulation

Rubic MCP Server gives Claude, Cursor, VS Code, and other MCP-compatible AI tools structured access
to cross-chain and on-chain token swaps — quote, simulate, build, sign, broadcast, and track transactions.

Non-custodial. Open-source.

  • 13 TOOLS
  • 70+CHAINS*
  • NON-CUSTODIAL LOCAL SIGNING
  • MIT LICENSE

* Chain count reflects supported routing paths. EVM chains support full execution, while non-EVM chains support quoting and browser fallback.

npx -y @cryptorubic/mcp

Add to Claude, Cursor, VS Code,
or any MCP client

Compatible with

Supported AI Tools
and MCP Clients

Rubic’s MCP Server connects to popular MCP-compatible AI tools and developer environments, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Cline, Continue, and Zed.

Claude
Cursor
VS Code
Windsurf
Cline
Continue
Zed
Docker

Any MCP-compatible client that speaks stdio or streamable HTTP can connect.

Why AI Agents Use
Rubic’s MCP Server

Rubic MCP Server replaces browser actions with structured DeFi tools. Agents quote, simulate, build, and surface risks, while users approve and sign.

Structured MCP tools
for DeFi workflows

Typed inputs and outputs agents can reliably
plan against.

Typed error handling

Semantic codes enable clean agent recovery
and decision branching.

Modular swap execution
flow

Quote, build, sign, broadcast, and track as
separate tools for flexible agent control.

Read-only mode

Discover routes, quotes, and calldata without
a private key.

Pre-approval swap
simulation

Preview output, fees, and risk before
execution.

Local signing with
fallback

Keys stay local; non-EVM or manual flows fall
back to Rubic in-browser.

How Rubic MCP Server Works

From config to broadcast in three predictable steps. The agent shows a preview before anything is signed.

Connect

Add a JSON config block to Claude, Cursor, VS Code, Windsurf, Cline, Continue, Zed, or any MCP client.

Simulate

The agent previews the swap, including expected output, fees, gas estimate, route, duration, and risk level. No signing yet.

Execute

Approve the preview and the agent executes locally, or open the route in Rubic as a browser fallback.

Why Simulation-First Swaps Matter

Most DeFi MCP servers go straight from prompt to transaction.
Rubic’s MCP Server lets AI agents show their work first, with a preview before signing when the workflow requires it.

Without simulation

- Agent executes the swap immediately
- No fee breakdown before signing
- No risk assessment
- Generic error on failure
- “Agentic finance” marketing copy

Simulate-firstRubic’s MCP

- Agent simulates first, then shows a preview
- Total cost in USD: gas, protocol, and provider fees
- Risk level: low / medium / high
- Typed error codes for recovery
- Structured JSON data agents can verify

DeFi Use Cases for AI Agents

Real prompts, real flows. You describe the outcome, and the agent selects the tools.

Cross-Chain Token Swaps

C:\\
“Swap 500 USDC from Ethereum to Arbitrum”

Ask an AI agent to swap tokens between supported chains, compare routes, simulate the outcome, and proceed only after approval.
[rubic_simulate_swap]

On-Chain Token Swaps

C:\\
“Swap ETH to USDC on Arbitrum”

Use Rubic’s MCP Server for same-chain token swaps where supported, with quoting, simulation, and transaction preparation via MCP tools.
[rubic_simulate_swap]

Route Comparison with

C:\\
“Show me all routes for 1 ETH to MATIC”

Compare swap routes by output, fees, providers, timing, and risk.
[rubic_get_routes]

Swap Simulation with

C:\\
“Simulate swapping 1 AVAX to ETH”

Preview output, fees, gas, route details, and risk before signing.
[rubic_simulate_swap]

Supported Networks
for Cross-Chain
and On-Chain Swaps

Rubic’s MCP Server supports cross-chain and on-chain swap workflows across a broad set of EVM and non-EVM ecosystems through Rubic’s routing infrastructure.

EVMFull execution and local signing

Ethereum
BNB Chain
Base
zkSync Era
Arbitrum
Polygon
Optimism
Scroll
Linea
Mantle
Blast
Avalanche

Non-EVMQuoting, calldata & browser fallback

Solana
TRON
TON
Bitcoin
EVM networks support local signing and full execution; non-EVM networks use rubic_get_swap_url for browser-based confirmation.

Rubic MCP Server FAQ

Why is Rubic MCP Server?

Which AI tools does it support?

Is it custodial?

How are private keys handled?

Which chains are supported?

Can AI agents execute swaps automatically?

How does swap simulation work?

Where can I get started?

PointerScroll marker