Live cross-DEX pool prices, liquidity and spreads on 6 EVM chains, read from on-chain pool state.
io.github.donnywin85/arb-dex-mcp MCP Server
The io.github.donnywin85/arb-dex-mcp Model Context Protocol (MCP) server provides live cross-DEX pool data. It reads per-venue pool price, pool liquidity, and the gross cross-venue spread directly from on-chain pool state across 6 EVM chains.
๐ ๏ธ Key Features
Live cross-DEX crypto prices
Per-venue pool price and pool liquidity
Gross cross-venue spread
On-chain pool state as the data source
Coverage: 6 EVM chains
๐ Use Cases
Comparing pool pricing across DEX venues for EVM markets
Tracking liquidity and spreads to support arbitrage-related workflows
Supplying MCP-based model contexts with market-data from on-chain sources
โก Developer Benefits
MCP server integration for model-context workflows
Data grounded in on-chain pool state (not off-chain feeds)
Topics aligned to developer tooling and agents (e.g., MCP, market-data, web3)
โ ๏ธ Limitations
Data scope is limited to pool state on 6 EVM chains
Descriptions provided focus on prices, liquidity, and gross spreads only
Live cross-DEX crypto prices for your AI agent โ per-venue pool price, pool liquidity
and the gross cross-venue spread on 6 EVM chains, read straight from on-chain pool state.
Chains: BSC ยท Polygon ยท Arbitrum ยท Base ยท Avalanche ยท Optimism.
Venues: PancakeSwap (v2 + v3), Uniswap v3, SushiSwap, QuickSwap, Biswap, ApeSwap, BaseSwap,
Trader Joe, Pangolin โ every v2-style pool and every v3 fee tier separately, because a
$12k 1% pool and a $19M 0.01% pool are not the same quote.
Nothing is modelled, estimated or backfilled. Every payload states its own block number and
carries its own scope note, so an agent that quotes a figure also has the caveats attached to it.
Works with no API key against a free hourly public snapshot. Docs ยท npm
Quickstart
Nothing to clone or build. Your MCP client fetches the package. Requires Node 18+.
Claude Desktop
claude_desktop_config.json โ macOS ~/Library/Application Support/Claude/,
Windows %APPDATA%\Claude\:
Restart Claude Desktop; the six tools appear under the connectors icon.
Drop the env block entirely to run keyless โ the server still starts and the
free-snapshot tools still answer.
Claude Code
bash
claude mcp add arb-dex --env RAPIDAPI_KEY=your-rapidapi-key-here -- npx -y arb-dex-mcp
Keyless:
bash
claude mcp add arb-dex -- npx -y arb-dex-mcp
Then /mcp to confirm it connected.
Cursor
~/.cursor/mcp.json (global) or .cursor/mcp.json (per project):
Read the two spread numbers against each other. The raw mid spread is 43 bps โ and the
gross capturable spread is 0. The 609.10 quote lives in a $12k pool; the size that would
actually clear it moves the price past the gap before you get there. A tool that reported only
the 43 bps would be handing an agent a number it cannot trade. This one reports both, and
optimalInput is where the honesty lands.
2. "Show me the cross-DEX spreads on Base โ are any actually capturable?"
get_spreads sweeps a whole chain and ranks by gross USD at the optimal size, not by
headline basis points:
json
{"network":"base","chainId":8453,"scannedPairs":11,"opportunities":[],"found":0,"filters":{"minSpreadBps":10,"minVenueTvlUsd":1000,"minGrossUsd":0.01,"limit":5},"ranking":"gross USD at the optimal trade size, NOT raw spread โ a large spread with a tiny optimal size is not an opportunity","scope":"GROSS cross-venue spread from live pool state, BEFORE gas, MEV and any slippage beyond the optimal size. Not a profit estimate and not trade advice. Venues below the liquidity floor are excluded because a spread against a dust pool is an artefact, not an opportunity.","elapsedMs":2847}
found: 0 is a real answer and it is the common one. Eleven pairs scanned, nothing cleared
the floor. Venues under $1,000 TVL are dropped outright. When rows do come back, each carries
capturable, warning and shallowestSideTvlUsd so a big basis-point number cannot mislead on
its own. This tool will tell your agent there is nothing there โ which is the whole point of
asking it.
3. "How much history does arb-dex actually have, and for which chains?"
get_history_summary sizes the archive before you query it:
Coverage is only what was measured. A gap stays a gap โ rowsByEra says how much detail each
era of rows carries, and ARB/USDC having 98 observations but 0 qualified is the archive
telling you that pair has never once cleared the spread floor.
Tools
Tool
What it answers
Access
get_chains
Which chains are covered, their chain IDs, tokens and DEX venues
Any key ยท keyless returns the chain list only, and says so
get_pairs
What is priceable on one chain: token universe, venues, pair syntax
Any key ยท keyless returns the measured subset, labelled as such
get_prices
One pair's price at every venue holding a pool for it, plus reserves, TVL, fee tier and the cross-DEX spread
Any key
get_spreads
A whole chain's cross-venue dislocations, ranked by gross USD at the optimal size
Any key for live: true ยท keyless serves the free hourly snapshot
get_history_summary
What the measurement archive covers: rows, pairs tracked, chains seen, span, retention
Any key (free tier included)
get_history
One pair's per-venue price/liquidity series and gross cross-venue spread over 24h / 7d / 30d
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. Sampling is
roughly hourly, and gaps are never interpolated or backfilled. Call get_history_summary first
to see what span exists before asking for a window.
What it will not do
Spreads are gross โ before gas, MEV and slippage beyond the optimal size. Not a profit
estimate and not trade advice.
It never fabricates a row. Without a key, get_chains, get_pairs and get_spreads
answer from the free public surface and each carries a limitation field naming exactly what
a key would add. get_prices, get_history_summary and get_history return an explicit
key-required error with the signup link rather than a thinner answer dressed up as a full one.
It does not execute trades, hold funds, or touch a wallet. It is read-only market data.
This package ships no credentials of any kind. The key is yours and stays in your config.
Get a key
The paid tools call the API through RapidAPI using your own key.
Copy your X-RapidAPI-Key from the RapidAPI dashboard.
Put it in RAPIDAPI_KEY in the config above โ never in code, and never in a commit.
Plans
Five of the six tools work on the free tier. Only the per-pair history series is gated:
Plan
Adds
BASIC ($0)
Live quotes on every chain, plus get_history_summary so you can size the archive before you buy it
PRO ($15/mo)
get_history โ the measured per-venue series for one pair, 24h window, 1000 calls/mo
ULTRA ($49/mo)
No window limit and no history meter, plus depth/slippage and spread alerts
MEGA ($149/mo)
Bulk paging over the complete archive for your own store
Calling get_history below PRO returns an explicit tier_required error naming the plan and
the upgrade URL โ it does not fail silently or return an empty series.
Configuration
Env var
Default
Purpose
RAPIDAPI_KEY
โ
Your RapidAPI key. Required for the 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.
Set these in your MCP client's env block (see the configs above). .env.example ships in the
package and documents the same variables for local runs from a clone.
Test
The test suite is not in the npm tarball โ run it from a clone:
bash
git clone https://github.com/donnywin85/arb-dex-mcp.git
cd arb-dex-mcp && npm install
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.
Your own RapidAPI key for the Multi-Chain DEX Prices & Liquidity API (https://rapidapi.com/donnydev/api/multi-chain-dex-prices-liquidity). The free-tier subscription is enough to start. Required for live pool prices and fresh sweeps; without it get_chains, get_pairs and get_spreads fall back to a free hourly public snapshot and say so in the payload.
ARB_DEX_TIMEOUT_MS
Optional request timeout in milliseconds. Defaults to 45000 โ a full-chain live scan is a real on-chain sweep and can take ~30s.