MCP: AI Agent Integration

AI agents can now perform cross-chain token swaps through natural language using the Squid MCP — a Model Context Protocolarrow-up-right server that connects AI assistants like Claude to Squid Routerarrow-up-right.

Instead of writing code to interact with swap APIs, developers can give an AI assistant access to Squid's cross-chain infrastructure and let users swap tokens by simply describing what they want. The MCP handles wallet management, route quoting, swap execution, and status tracking — all through conversation.

circle-exclamation

Features

  • Wallet management — generate and store a private key in the OS keychain; retrieve the agent wallet address

  • Token & chain discovery — list all EVM chains and tokens supported by Squid Router

  • Balance checking — query native and ERC-20 balances across all EVM chains

  • Cross-chain swaps — get a route quote, review it, then execute with background monitoring

  • Swap status — poll the status of any in-flight swap by transaction hash

circle-info

The Squid MCP currently supports EVM chains only.


Getting Started

Requirements

1. Clone the repo and build

2. Connect to your MCP client

Add the MCP server to your AI client of choice.

Claude Desktop

  1. Open the Claude Desktop settings

macOS menu bar with the Claude app menu open, showing Settings... highlighted

  1. Go to Settings > Desktop app > Developer and click "Edit Config"

Claude Desktop Settings page with the Developer section selected, showing an Edit Config button

  1. This will open claude_desktop_config.json in your file explorer

macOS Finder window showing the Claude config directory with claude_desktop_config.json highlighted

  1. Open the file with a text editor and add squid-mcp under mcpServers:

  1. Restart Claude Desktop — you should now see the Squid MCP available and running

Claude Desktop Developer page showing squid-mcp listed with status running

chevron-rightUsing fnm or nvm?hashtag

Claude Desktop does not inherit your shell environment, so the node shim on your PATH may not resolve correctly. Use the absolute path to the node binary instead:

To find the path for your active version:

Claude Code (CLI)

If successful, you should see:

To verify it was added successfully, run /mcp in Claude Code.

Claude Code CLI showing squid-mcp listed under Local MCPs with a green checkmark


Available Tools

Tool
Description

setup_wallet

Generate a new wallet and store it in the OS keychain

get_agent_address

Return the agent wallet address

get_chains

List all EVM chains supported by Squid Router

get_tokens

List tokens on a given chain (filterable by symbol/name)

get_balances

Show non-zero balances across all chains (or a specific one)

get_route

Get a swap route quote (stores it as a pending route)

execute_swap

Execute the pending route; monitors completion in background

get_status

Poll the status of a swap by transaction hash


Typical Swap Workflow

Once the wallet is set up and funded, you can simply tell the AI assistant what you want to do in natural language — for example:

"Swap 1 USDC on Ethereum to ETH on Base"

The assistant will use the tools above to get a quote, present it for your approval, and execute the swap.


Export Your Private Key

To back up or import the agent wallet key into another wallet:

The key is printed only to your local terminal — it is never sent to the AI assistant or any MCP context.

Last updated