Arb DEX

by donnywin85

Not rated
GitHub

About

Live cross-DEX crypto prices read from on-chain pool state: per-venue price, liquidity depth and gross cross-venue spread across BSC, Polygon, Arbitrum, Base, Avalanche and Optimism. Works keyless, no account.

Details

Author
donnywin85
Categories
Finance, Other

Setup

Install Arb DEX in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/donnywin85/arb-dex-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

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 pooland 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 keyagainst a free hourly public snapshot.Docs·npm

Nothing to clone or build. Your MCP client fetches the package. Requires Node 18+.

claude_desktop_config.json— macOS~/Library/Application Support/Claude/, Windows%APPDATA%\Claude\:

{ "mcpServers": { "arb-dex": { "command": "npx", "args": ["-y", "arb-dex-mcp"], "env": { "RAPIDAPI_KEY": "your-rapidapi-key-here" } } } }

Restart Claude Desktop; the six tools appear under the connectors icon.Drop theenvblock entirely to run keyless— the server still starts and the free-snapshot tools still answer.

claude mcp add arb-dex --env RAPIDAPI_KEY=your-rapidapi-key-here -- npx -y arb-dex-mcp
claude mcp add arb-dex -- npx -y arb-dex-mcp

~/.cursor/mcp.json(global) or.cursor/mcp.json(per project):

{ "mcpServers": { "arb-dex": { "command": "npx", "args": ["-y", "arb-dex-mcp"], "env": { "RAPIDAPI_KEY": "your-rapidapi-key-here" } } } }

Cursor → Settings → MCP shows the server and its tools once the file is saved.

Same three facts: commandnpx, args["-y", "arb-dex-mcp"], transportstdio, optional envRAPIDAPI_KEY.

Real prompts, and the real shape that comes back. Payloads below were measured live on2026-08-15; they are trimmed for width but nothing is invented.

1. "What is WBNB/USDT trading at on every BSC venue right now?"

get_pricesreads every pool holding the pair — v2 pairs and each v3 fee tier separately — at one stated block:

{ "pair": "WBNB/USDT", "network": "bsc", "chainId": 56, "blockNumber": 116151268, "pricesByVenue": [ { "venue": "pancake", "surface": "v2", "feeBps": 25, "price": 611.7347, "tvlUsd": 56834814.36 }, { "venue": "biswap", "surface": "v2", "feeBps": 10, "price": 610.8278, "tvlUsd": 415733.94 }, { "venue": "apeswap", "surface": "v2", "feeBps": 20, "price": 611.1244, "tvlUsd": 3659.06 }, { "venue": "pancakeV3:1", "surface": "v3", "feeBps": 1, "price": 610.5684, "tvlUsd": 18596810.32 }, { "venue": "pancakeV3:5", "surface": "v3", "feeBps": 5, "price": 610.6531, "tvlUsd": 4941099.44 }, { "venue": "pancakeV3:25", "surface": "v3", "feeBps": 25, "price": 610.6304, "tvlUsd": 52534.35 }, { "venue": "pancakeV3:100", "surface": "v3", "feeBps": 100, "price": 609.1025, "tvlUsd": 12206.21 } ], "bestBuy": { "venue": "pancakeV3:100", "price": 609.1025 }, "bestSell": { "venue": "pancake", "price": 611.7347 }, "midSpreadBps": 43.22, "crossDex": { "grossSpreadBps": 0, "grossUsd": 0, "optimalInput": { "amount": 0, "token": "WBNB", "usd": 0 }, "buyVenue": "-", "sellVenue": "-" }, "liquidity": { "venues": 7, "totalTvlUsd": 80856857.67 }, "source": "rpc" }

Read the two spread numbers against each other.The raw mid spread is43 bps— and the gross capturable spread is0. 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, andoptimalInputis where the honesty lands.

2. "Show me the cross-DEX spreads on Base — are any actually capturable?"

get_spreadssweeps a whole chain and ranks bygross USD at the optimal size, not by headline basis points:

{ "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: 0is 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 rowsdocome back, each carriescapturable,warningandshallowestSideTvlUsdso 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_summarysizes the archivebeforeyou query it:

{ "rows": 133, "rowsWithPairDetail": 103, "rowsByEra": { "digest-totals-only": 30, "top-list-pairs": 5, "full-sweep": 98 }, "pairsTracked": 107, "firstAt": "2026-08-10T17:35:09.355Z", "lastAt": "2026-08-15T20:54:34.417Z", "spanHours": 123.32, "chainsSeen": ["arbitrum", "avalanche", "base", "bsc", "optimism", "polygon"], "pairs": [ { "chain": "polygon", "pair": "WBTC/USDC", "observations": 103, "qualifiedObservations": 39 }, { "chain": "bsc", "pair": "BTCB/USDT", "observations": 99, "qualifiedObservations": 15 }, { "chain": "arbitrum", "pair": "ARB/USDC", "observations": 98, "qualifiedObservations": 0 } ] }

Coverage is only what was measured. A gap stays a gap —rowsByErasays how much detail each era of rows carries, andARB/USDChaving 98 observations but0 qualifiedis the archive telling you that pair has never once cleared the spread floor.

The two history tools read the service's own measurement archive, so they answer the question the live tools cannot: whether a dislocationpersistedor was a single sample. Sampling is roughly hourly, and gaps are never interpolated or backfilled. Callget_history_summaryfirst to see what span exists before asking for a window.

- 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_pairsandget_spreadsanswer from the free public surface and each carries alimitationfield naming exactly what a key would add.get_prices,get_history_summaryandget_historyreturn 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.

The paid tools call the API through RapidAPI usingyour ownkey.

Five of the six tools work on thefreetier. Only the per-pair history series is gated:

Callingget_historybelow PRO returns an explicittier_requirederror naming the plan and the upgrade URL — it does not fail silently or return an empty series.

Set these in your MCP client'senvblock (see the configs above)..env.exampleships in the package and documents the same variables for local runs from a clone.

The test suite is not in the npm tarball — run it from a clone:

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 thereal 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.

- npm:https://www.npmjs.com/package/arb-dex-mcp
- Docs:
https://donnywin85.github.io/arb-dex-mcp/
- Official MCP Registry:io.github.donnywin85/arb-dex-mcp
- TensorBlock MCP Index:
https://www.tensorblock.co/mcp/servers/github-donnywin85-arb-dex-mcp-7dd9a70c
- Source:
https://github.com/donnywin85/arb-dex-mcp
- The API behind it:
https://rapidapi.com/donnydev/api/multi-chain-dex-prices-liquidity

DeFi execution on Base, Citrea, HyperEVM and Monad via Fibrous aggregation: swap quotes, swaps, transfers, cross-chain portfolio and Aave V3.

DeFi liquidity-pool scores and Enter/Hold/Exit verdicts for Solana and EVM, with a public miss-inclusive track record. Free keyless API and MCP server.

MCP to interface with multiple blockchains, staking, DeFi, swap, bridging, wallet management, DCA, Limit Orders, Coin Lookup, Tracking and more.

Bitcoin-native MCP server for AI agents: BTC/STX wallets, DeFi yield, sBTC peg, NFTs, and x402 payments.

An AI gateway for the Blend Protocol on Stellar, enabling DeFi actions like lending, borrowing, and pool creation through AI assistants or apps.

MCP server for dry-run EVM transaction simulation via Crypto APIs

MCP server for DeFi data — real-time crypto prices, token analytics, wallet balances, and on-chain data across multiple chains.

Real-time DeFi lending rates across 14+ protocols (Aave, Morpho, Spark, Compound, Venus, etc). Query borrow/supply rates, c ompare platforms, calculate looping strategies on 6 chains (Ethereum, Arbitrum, Base, BSC, Solana, HyperEVM).

Cross-protocol DeFi yield opportunities with risk metrics via DefiLlama. 16,000+ pools across 60+ chains. Risk classification, APY trends, and yield comparison.

Access blockchain transaction data in natural language, providing human-readable descriptions for AI assistants.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.