arb-dex-mcp
Provides live cross-DEX market data on six EVM chains, including per-venue prices, liquidity, and gross spreads with optimal trade sizes. Enables AI agents to query real on-chain data for BSC, Polygon, Arbitrum, Base, Avalanche, and Optimism via MCP tools.
README
arb-dex-mcp
An MCP server that gives an AI agent live cross-DEX market data on six EVM chains — BSC, Polygon, Arbitrum, Base, Avalanche and Optimism.
Every number is read from on-chain pool state at a stated block: per-venue pool price, pool TVL, and the gross cross-venue spread with the optimal trade size that captures it. Nothing is modelled, estimated or backfilled, and each payload carries its own scope note — so an agent that quotes a figure also has the caveats attached to it.
Backed by the Multi-Chain DEX Prices & Liquidity API.
Tools
| Tool | What it answers | Key needed |
|---|---|---|
get_chains |
Which chains are covered, their chain IDs, tokens and DEX venues | Optional — falls back to the free snapshot |
get_pairs |
What is priceable on one chain: token universe, venues, pair syntax | Optional — falls back to the free snapshot |
get_prices |
One pair's price at every venue holding a pool for it, plus reserves, TVL, fee tier and the cross-DEX spread | Required |
get_spreads |
A whole chain's cross-venue dislocations, ranked by gross USD at the optimal size | Optional — free hourly snapshot without a key, fresh on-chain sweep with live: true |
get_history_summary |
What the measurement archive covers: rows, pairs tracked, chains seen, span, retention | Required |
get_history |
One pair's per-venue price/liquidity series and gross cross-venue spread over 24h / 7d / 30d | Required |
The two history tools read the service's own measurement archive, so they answer the
question the live tools cannot: whether a dislocation persisted or was a single sample.
Coverage is only what was measured — sampling is roughly hourly, and a gap stays a gap
rather than being interpolated or backfilled. Call get_history_summary first to see what
span exists before asking for a window.
Without a key the server still runs and returns real data from the free public surface, labelled as such. It never fabricates a row or silently degrades: a paid call with no key returns an explicit key-required error with the signup link.
Spreads are gross — before gas, MEV and slippage beyond the optimal size. Not a profit
estimate and not trade advice. A wide spread against a shallow pool is worth very little,
and get_spreads says so per row rather than letting a big basis-point number mislead.
Install
git clone https://github.com/donnywin85/arb-dex-mcp.git
cd arb-dex-mcp
npm install
Requires Node 18+.
Get a key
The paid tools call the API through RapidAPI using your own key. This package ships no credentials of any kind.
- Subscribe (there is a free tier): https://rapidapi.com/donnydev/api/multi-chain-dex-prices-liquidity
- Copy your
X-RapidAPI-Keyfrom the RapidAPI dashboard. - Put it in
RAPIDAPI_KEYin the config below — never in code, and never in a commit.
Claude Desktop
claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/,
Windows: %APPDATA%\Claude\):
{
"mcpServers": {
"arb-dex": {
"command": "node",
"args": ["/absolute/path/to/arb-dex-mcp/src/index.mjs"],
"env": {
"RAPIDAPI_KEY": "your-rapidapi-key-here"
}
}
}
}
Restart Claude Desktop; the six tools appear under the connectors icon.
Claude Code
claude mcp add arb-dex --env RAPIDAPI_KEY=your-rapidapi-key-here -- node /absolute/path/to/arb-dex-mcp/src/index.mjs
Then /mcp to confirm it connected.
Try it
Ask your agent:
- "Which chains and DEX venues does arb-dex cover?"
- "What is WBNB/USDT trading at on every BSC venue right now?"
- "Show me the cross-DEX spreads on Polygon — are any actually capturable?"
- "Run a live spread sweep on Arbitrum and rank by gross USD."
- "How much history does arb-dex actually have, and for which chains?"
- "Did the WETH/USDC spread on Base persist over the last 24h or was it one sample?"
Configuration
| Env var | Default | Purpose |
|---|---|---|
RAPIDAPI_KEY |
— | Your RapidAPI key. Required for paid tools. |
ARB_DEX_TIMEOUT_MS |
45000 |
Request timeout. A live full-chain sweep is a real on-chain read and can take ~30s. |
ARB_DEX_FREE_BASE_URL |
production origin | Override the free-surface host. |
ARB_DEX_RAPIDAPI_HOST |
multi-chain-dex-prices-liquidity.p.rapidapi.com |
Override the RapidAPI host. |
See .env.example.
Test
npm run selftest # keyless: exercises the free fallbacks
RAPIDAPI_KEY=... npm run selftest # keyed: exercises the paid routes
The test spawns the server over stdio and calls every tool against the real production API — nothing is mocked. It asserts on live values (block number, per-venue prices, scanned-pair counts), so a run that passes is evidence the data path works end to end.
Closed gap
The API's paid measurement archive (/v1/history/*) was live on the origin but unlisted on
RapidAPI, so calls through the proxy 404'd and get_history was deliberately held back
rather than shipped broken. Both routes were published on the listing on 2026-08-11 and
re-measured through the proxy the same day — summary 200, pair series 200, unsupported
window 400 — so get_history_summary and get_history ship as tools, each covered by a
live keyed assertion in the selftest.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.