dex-data
Query live DEX/on-chain market data, regulatory/financial records, and web/geo utilities via MCP, with 25 free calls/day then USDC-on-Base paid calls under caps.
DEX/on-chain: token prices, liquidity/TVL, best venue/routing, slippage, liquidity risk, raw reserves, arbitrage scans, gas prices, chain/token/venue listings, and Uniswap v4 hook risk.
Regulatory/financial: GLEIF LEI lookup, US Treasury yield curve, OFAC-screened company dossiers, and SEC filings/events/insider deltas.
Web/geo/research: geocoding/reverse geocoding, IP geolocation, weather, web search/suggestions, holidays, RSS/Atom/RDF feed reading, URL/PDF-to-Markdown, and secure randomness.
Payments/budget: get_spend_budget, free tier, wallet-gated paid calls, and fail-closed caps on price, spend, and call count.
Note: The schema lists legacy/removed tools (e.g. get_token_price, get_liquidity, search, get_weather); README 1.7.0 says those routes remain callable directly but are no longer shipped as tools.
Provides live DEX market data on BNB Chain, including token prices, liquidity depth, pool reserves, best execution venue, liquidity risk, and pre-trade slippage estimation.
Provides live DEX market data on Polygon, including token prices, liquidity depth, pool reserves, best execution venue, liquidity risk, and pre-trade slippage estimation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dex-data What's the current price of ETH on Arbitrum?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dex-data MCP server
For an agent
Everything you need to decide whether to call this server, and what it will cost, is in this section. Read no further unless a human is asking.
Install
claude mcp add dex-data -- npx -y dex-data-mcpOr, for any MCP host that reads a JSON config:
{ "mcpServers": { "dex-data": { "command": "npx", "args": ["-y", "dex-data-mcp"] } } }Related MCP server: AgentData MCP Server
Cost model
The first 25 calls each day are free on every tool. No wallet, no signup, no API key, no account. The free answer is the full answer — nothing is stubbed, truncated or degraded. What the free tier limits is how many calls you make, not what is in them.
After 25 calls in a day, a tool returns a payment challenge instead of an answer. If — and only if — a wallet is configured, this server settles that challenge in USDC on Base and returns the answer. With no wallet it tells you the price and spends nothing.
Environment
variable | what it does | default |
| EVM private key that pays. Omit it and this server can never spend anything. | unset — free tier only |
| Per-call ceiling. A call costing more is refused before paying. |
|
| Total for the life of the process. |
|
| Number of paid calls for the life of the process. |
|
| Upstream request timeout. |
|
The default ceiling is $0.05, which is exactly the dearest tool here. Lower it
below that and the $0.05 tools stop working — deliberately, and they say so.
The cap, and what "fails closed" means
Every paid call passes the same four gates, in this order, and any one of them refuses without paying:
No wallet → never pays. This is the state you are in unless someone set a key.
Price unreadable → refuses. A challenge whose amount cannot be parsed is not treated as free or as cheap; it is treated as unknown, and unknown does not get paid.
Price above
DEX_MAX_PRICE_USD→ refuses, and names the price and the cap.Would cross
DEX_MAX_SPEND_USDorDEX_MAX_CALLS→ refuses.
Accounting is in integer micro-USD, so a $1.00 budget at $0.05 a call buys
exactly 20 calls and not 19 — floating-point drift cannot quietly close the
budget early.
Call get_spend_budget before any loop over paid tools. It is free, local
and makes no network call, and it returns what has been spent and every cap in
force.
Tools
Thirteen tools. Twelve fetch from the gateway; one is local. Each of the twelve targets exactly one route, and together they are exactly the routes the storefront lists — there is no hidden catalogue and no tool pointing at something that was withdrawn.
tool | price/call | what it returns | example |
| $0.01 | DEX liquidity, depth and TVL per venue on Base |
|
| $0.01 | Live USD price from Polygon pools, with the backing liquidity and a confidence rating |
|
| $0.01 | Raw AMM reserves, fee, implied price and TVL at one block height |
|
| $0.01 | Cross-venue price gaps on Polygon, ranked by gross spread |
|
| $0.01 | The same scan on Avalanche C-Chain |
|
| $0.01 | Uniswap v4 hook permission bits, custody class and verified-source consensus |
|
| $0.03 | GLEIF legal-entity record by name, lapsed entities flagged not hidden |
|
| $0.03 | US Treasury par yield curve, 1 month to 30 years |
|
| $0.05 | Identity, OFAC screening and SEC registration for one entity, joined |
|
| $0.05 | Everything an issuer has filed since your cursor |
|
| $0.05 | 8-K material events since your cursor, decoded by item code |
|
| $0.05 | Forms 3/4/5, SC 13D/G ownership changes since your cursor |
|
| free, local | What this session has spent and every cap in force |
|
Prices are USDC on Base (eip155:8453) and are read from the gateway's own
x-payment-info, not kept in step by hand.
Three things that will save you a wasted call
The three
get_sec_*tools return DELTAS, not dumps.sinceis required and inclusive. Pass the date you last read; you get what has landed since. They reportmatchedandtruncated, so a cut-off delta is never mistaken for a complete one.Missing arguments are refused here, not upstream. A call with a required argument absent or empty is stopped before any request is made, and says
Nothing was requested and nothing was spent. It does not become?symbol=undefinedand it does not cost you a call.get_v4_hook_risknever outputs SAFE. It is capability analysis: it tells you what a hook is able to do to your trade, not whether its author intends to. TreatOPAQUEas unresolved, not as clean.
For a human
What this is
Thirteen MCP tools over live on-chain and regulatory data: DEX market state on Base, Polygon and Avalanche, Uniswap v4 hook security, GLEIF legal-entity lookup, OFAC-screened counterparty dossiers, SEC EDGAR change oracles and the US Treasury yield curve.
Zero dependencies, stdio, Node 18+. The payment packages are optional and are only loaded if a wallet is configured.
Why the tool list shrank in 1.7.0
1.6.1 shipped 23 tools. This release ships 13, and the nine-tool difference is the point.
The gateway behind this server sold 62 priced routes, and this package carried a tool for most of them — including geocoding, weather, web search, public holidays, RSS and IP lookup. Then the demand was measured across the whole recorded history of the storefront: 12 routes have either organic buyers or no substitute anywhere in the catalogue. The other 50 had between zero and two calls each, every one of them from a single wallet. On 2026-09-16 the storefront was cut to those 12, and this release follows it.
A tool list is not free. It is loaded into the model's context in every session, whether or not a single tool is called, and a tool that advertises a shelf the storefront no longer stocks costs the agent a turn to discover the gap. Removing nine tools makes the list shorter and every entry in it true.
The 50 dropped routes still work. They are served, priced and payable by anyone holding the URL. Removing a tool withdrew a recommendation, not a product.
Three of the nine went for a second, independent reason: the upstreams behind
geocode, reverse_geocode and get_weather retire on 2026-09-27. A tool that
will 404 in eleven days should not ship in a release today.
Upgrading from 1.6.x
Breaking, and deliberately so:
No tool takes a
chainargument any more. Each tool targets one chain's route and writes the whole path itself. Sendingchainis now an error rather than being silently ignored — ignoring it would have sent a Polygon question to a Base route and charged for the answer.These tools are gone, with the routes they used to call, which are all still live:
get_token_price(/price),get_liquidity(/liquidity),get_pool_reserves(/reserves),find_arbitrage(/scan),get_best_venue(/route),get_slippage(/slippage),get_liquidity_risk(/risk),geocode,reverse_geocode,get_weather,search,get_search_suggestions,get_holidays,read_feed,get_random,url_to_markdown,geolocate_ip,get_gas,list_chainsandget_dex_spread(/call).Chain-specific replacements exist for the routes the storefront kept:
get_base_liquidity,get_polygon_token_price,get_avalanche_pool_reserves,find_polygon_arbitrage,find_avalanche_arbitrage.New:
get_v4_hook_risk,get_company_dossier,get_sec_filings,get_sec_events,get_sec_insiders.lookup_lei,get_treasury_yield_curveandget_spend_budgetare unchanged.
If you were calling a removed tool, the route behind it still answers. Call it
directly, at list price, at https://x402.donnyautomation.com.
Paying
Set DEX_WALLET_KEY to an EVM private key holding USDC on Base, and install the
optional payment packages:
npm i @x402/fetch @x402/core @x402/evm viemWithout both, this server cannot spend anything: it returns the price and the payment instructions and stops. With them, it pays only what the caps in the agent section above allow.
Fund it with USDC on Base and nothing else. x402's
exactscheme is EIP-3009: you sign an off-chain authorization and the facilitator broadcasts and pays the gas, so the wallet needs zero ETH.Use a burner. The key sits in your MCP client config in plaintext. A few dollars of USDC, never a main wallet.
Spend is capped and fails closed —
DEX_MAX_SPEND_USD(default $1 total for the process),DEX_MAX_PRICE_USD(default $0.05 for any single call) andDEX_MAX_CALLS(default 200). Hitting any one stops payment and returns a plain explanation rather than continuing to spend. The asking price is read from the 402 challenge and refused before paying if it exceeds the ceiling. A cap that cannot be parsed (DEX_MAX_SPEND_USD=1,00) now refuses to start rather than silently evaluating toNaN, which switched every cap off.get_spend_budgetreports what this session has spent and the caps in force.Since 1.7.0 the caps, the integer accounting and the receipts log live in
x402-budget, a standalone package in this repo that holds no wallet.pay.mjsis the adapter that reads theDEX_*variables and supplies the signing function. Behaviour is unchanged.
Use a wallet you funded for this and nothing else. This server holds no custody, takes no fee and sends nothing anywhere except the payment the challenge asks for — but the key is yours to scope.
Development
node test/arg-validation.test.mjs # argument validation over real stdio, no network
node test/budget.test.mjs # spend-cap accounting, no wallet, no network
node test/paywall-402.test.mjs # every tool against a recorded 402, loopback only
node test/spend-cap.test.mjs # the cap refuses each price point, loopback only
node packages/x402-budget/test/budget.test.mjs # the library's own caps and receipts, no network
node scripts/check-coverage.mjs # tools vs the gateway's listed catalogue (needs the network)The five no-network suites run in CI on every push and pull request. The coverage check runs at release, because it is the only one that needs the gateway to be up.
test/fixtures/challenge-402.json is a verbatim recording of the live gateway's
402 challenge for each of the twelve routes. Re-record it if prices change; the
suites assert that each tool's description quotes the same price the challenge
asks for.
Links
Gateway and full API: https://x402.donnyautomation.com
MIT licensed.
Available Tools
23 toolsfind_arbitrageA
Scan a chain for cross-venue arbitrage right now: pairs whose price differs enough between DEXes to be worth trading, ranked by GROSS USD AT THE OPTIMAL TRADE SIZE — not by raw spread, because a wide spread on a tiny pool is not an opportunity. Returns an empty list when there is nothing, which is a real answer. Excludes gas, MEV and execution risk.
Inputs: chain, minSpreadBps.
geocodeA
Convert a street address, city or place name to latitude/longitude coordinates — worldwide, via OpenStreetMap. Returns coordinates, display name, structured address parts and a confidence score. No match returns a clear 404, never a guessed coordinate.
Inputs: query (required).
geolocate_ipA
Locate a public IPv4 or IPv6 address: country, region, city, postcode, coordinates, timezone, ASN, org and ISP. Datacentre/VPN/proxy/Tor detection is returned FIRST because it decides whether the location means anything — and when the upstream does not supply that detection the answer says unknown, never clean. An IP locates a network, not a person: the coordinates are a registered-range centroid, so never present them as where someone is.
Inputs: ip (required).
get_best_venueA
Which DEX is cheapest to buy on and which pays most to sell into, with the cross-venue spread in bps and a fee-adjusted arbitrage spread. Smart order routing data.
Inputs: pair (required), chain.
get_dex_spreadA
PAID ($0.01 USDC/call, no free tier). Real-time cross-DEX price & spread for BSC: per-venue prices across PancakeSwap v2, PancakeSwap v3 (all fee tiers), Biswap and ApeSwap in one call, plus best buy/sell venue, gross arbitrage spread (bps + USD), optimal trade size, liquidity and block number. Params: pair=SYM/SYM (e.g. WBNB/USDC), optional fee=v3 tier. Needs a funded wallet in DEX_WALLET_KEY or EVM_PRIVATE_KEY; without one it returns payment instructions and spends nothing. Cheaper alternatives in this same server, free for 25 calls/day and no wallet: "get_liquidity" for per-venue depth and "find_arbitrage" for a cross-venue spread scan.
Inputs: pair (required), fee.
get_gasA
Live gas prices across BNB Chain, Polygon, Arbitrum, Base, Avalanche and Optimism, priced in USD and ranked cheapest-first. Returns gas price in gwei, base fee, and what a transfer, an ERC-20 transfer and a swap actually cost in dollars on each chain. Gwei is NOT comparable across chains because the gas token differs in price, so USD is the only ranking that says where a transaction really costs least. For bridging, routing and execution timing.
Inputs: chain.
get_holidaysA
Public and bank holidays for 100+ countries, and the business-day question behind them. Pass a date and it answers directly whether that date is a business day and what the next and previous ones are, counting weekends and holidays and walking across year boundaries. Without a date it returns the whole year, including which regions observe a non-national holiday. Regional closures, half-days and market trading calendars are not covered.
Inputs: country (required), date, year.
get_liquidityA
Market depth and TVL for a trading pair, broken down per venue: how deep the pools are, which venue holds the most liquidity, and each venue share of total depth.
Inputs: pair (required), chain.
get_liquidity_riskA
Pre-trade depth check for a pair: classifies the market DEEP, MODERATE, SHALLOW or VERY_THIN from live pool TVL, counts routable venues, and flags single-venue markets and wide spreads. Liquidity depth analysis only — NOT a contract audit and NOT a honeypot check.
Inputs: pair (required), chain.
get_pool_reservesA
Raw pool reserves for a pair on every indexed venue: the two token balances, the pool fee in bps, the implied price from those reserves and the pool TVL, all read at one block height which is returned with the answer. This is the underlying data the price, depth and slippage tools are computed from — use it when you want to do your own maths rather than take ours.
Inputs: pair (required), chain.
get_randomA
Cryptographically secure randomness for agents that are deterministic or sandboxed and cannot generate their own: uniform integers in [min, max] (rejection-sampled, no modulo bias) or raw random bytes as hex and base64. For nonces, IDs, sampling and shuffling.
Inputs: max, min, bytes, count.
get_search_suggestionsA
What people actually type into a search box for a topic — live search autocomplete, expanded across question modifiers (how/what/why/is/can/does) and comparison modifiers (vs/or), then split into suggestions, questions and comparisons. Rows where the engine dropped your term and answered something else are filtered out and counted. A demand signal for content and keyword research, not a ranking — search volume is not published upstream and is not invented.
Inputs: q (required), lang, depth, country.
get_slippageA
Price impact for a SPECIFIC trade size — what a trade will actually get, which a spot price cannot tell you. Simulates the swap against live reserves on every venue. Price impact and the pool fee are reported separately. Pool-level only: excludes gas, MEV and multi-hop routing.
Inputs: pair (required), chain, amountIn, amountUsd.
get_spend_budgetA
How much this session has spent on paid calls, and the caps in force. Free, local, and makes the cost of continuing visible before it is incurred.
Inputs: no named parameters.
get_token_priceA
Live USD price of any ERC-20 token, read from DEX pools at call time. Accepts a ticker (CAKE, WETH, ARB) or any contract address. Returns the price, the pair it was priced through, the USD liquidity backing that quote and a confidence rating. Refuses to return a price backed by a dust pool rather than reporting an unreliable number.
Inputs: token (required), chain.
get_treasury_yield_curveA
The US Treasury par yield curve for any published business day — every constant-maturity rate from 1 month to 30 years — plus the spreads and the inversion flag, because the real question is whether the curve is inverted rather than what fourteen numbers are. 2s10s, 3m10y and 5s30s are computed for you. A tenor Treasury did not publish that day is null, never zero. Nominal CMT rates: not real yields and not zero-coupon spot rates.
Inputs: date.
get_weatherA
Current weather and up to a 7-day forecast for any coordinates worldwide: temperature, feels-like, humidity, precipitation, wind speed/gusts/direction now, plus daily highs, lows and precipitation probability. Model forecast, not a station reading — the response says so. Use the geocode tool first if you have a place name rather than coordinates.
Inputs: lat (required), lon (required), days.
list_chainsA
Supported chains, their indexed tokens and venues. Free, and the right first call if you are unsure which chain or ticker to use.
Inputs: no named parameters.
lookup_leiA
Look up a company in the GLEIF Legal Entity Identifier golden copy BY NAME, not just by identifier — knowing the LEI already is the hard part. Returns the LEI, registered legal name, previous names, legal form, jurisdiction, legal and headquarters addresses and the registration record. Lapsed, retired and annulled entities come back flagged rather than filtered out: a hidden record and no record are indistinguishable to the caller.
Inputs: q, lei, limit.
read_feedA
Read any public RSS, Atom or RDF feed as clean JSON: feed title, link and description, then items with title, real destination link, author, categories and the published date both verbatim and normalised to ISO 8601. Each summary is returned twice — the feed HTML as published, and a plain-text rendering safe to put straight into a prompt. An unparseable date is null, never an invented timestamp. Pair with url_to_markdown to read a linked article.
Inputs: url (required), limit.
reverse_geocodeA
Convert latitude/longitude coordinates to the nearest street address and place name — worldwide, via OpenStreetMap. Coordinates in the ocean or unmapped return 404, never a fabricated address.
Inputs: lat (required), lon (required).
searchA
Web search — a free-text query returns ranked organic results, each with title, real destination URL, display URL and snippet. Sponsored rows are excluded. Up to 25 results; count is a maximum, not a guarantee, because a row whose destination cannot be resolved is dropped rather than guessed at. Results are not fetched or verified — pair with url_to_markdown to read any result.
Inputs: q (required), count.
url_to_markdownA
Fetch a public article or PDF URL and return clean Markdown plus title, byline, site name and word count. HTML is extracted with Firefox reader-mode rules; PDFs return their text layer with page count. Image-only PDFs and client-rendered app shells return typed errors (no_text_layer, not_extractable) instead of empty output passed off as the article.
Inputs: url (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Tools are mostly distinct with detailed descriptions, but there is overlap among DEX-related tools (e.g., get_liquidity, get_pool_reserves, get_slippage, get_liquidity_risk, find_arbitrage, get_best_venue, get_dex_spread) that could cause confusion. The extensive descriptions mitigate this, but not entirely.
Naming is inconsistent across tools: many use 'get_' (get_token_price, get_liquidity, get_gas) but others use different verbs (find_arbitrage, list_chains, read_feed, geolocate_ip, lookup_lei, url_to_markdown, geocode, reverse_geocode, search). The pattern is not uniform, though within groups it is consistent.
The server is named 'dex-data' but includes 23 tools, many of which are unrelated to DEX (weather, holidays, random, search, LEI lookup, treasury yields, IP geolocation). This suggests scope creep and a mismatch between the name and the toolset, making the count feel excessive for the stated purpose.
For the broad domain implied by the actual toolset (covering DEX, gas, weather, news, geolocation, financial data), the coverage is fairly comprehensive. However, if the intended domain is strictly DEX data, there are missing features like historical price data or order book depth, but given the mix of tools, completeness is good overall.
Maintenance
Related MCP Connectors
Onchain DeFi intelligence API for Base, payable per call with x402 (USDC). Live MCP tools: get_bot_status (Telegram bot health), get_market_stats (market snapshot), get_onchain_sales (proven revenue from live x402 routes). Built for agents that need verifiable onchain data — whale flow, signals, and sales evidence at $0.005/call.
Multichain DEX router: free MCP tools for swap-quote prices, chains, catalog; paid via x402.
Pay-per-call ($0.005-$0.03 USDC) market, on-chain, and prediction-market data API for AI agents and trading bots via x402 — no signup, no API key. Remote MCP server, 28 tools: token security (honeypot/liquidity/counterfeit checks), Hyperliquid oracle-gap risk, kimchi premium, funding APR, DEX slippage, Polymarket arbitrage/liquidity audits, Hyperliquid HIP-4 odds.
Pay-per-call DeFi and macro intel for AI agents. x402 USDC tools via streamable HTTP /api/mcp.
Related MCP Servers
- AlicenseAqualityBmaintenanceEight crypto and DeFi data tools for AI agents: prices, gas, one ParaSwap route quote, GoPlus token security and top-holder samples, DefiLlama yields, Hyperliquid/dYdX funding, and observed wallet balances. Inspect prices free; pay 0.001–0.008 USDC per call on Base through x402. No API key or subscription.8120 npmMIT
- AlicenseAqualityCmaintenanceProvides 16 crypto market data tools for MCP-compatible AI clients with x402/USDC micropayments on Base Mainnet.1620 npmMIT
- AlicenseAqualityDmaintenanceProvides a tool to get real-time cross-DEX price and spread data for PancakeSwap v2 and v3 on BSC, with a pay-per-call model settled via x402.143 npmMIT
- AlicenseAqualityDmaintenanceProvides 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.476 npmMIT