Skip to main content
Glama

dex-data MCP server

dex-data-mcp 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-mcp

Or, 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

DEX_WALLET_KEY

EVM private key that pays. Omit it and this server can never spend anything. EVM_PRIVATE_KEY is read as a fallback.

unset — free tier only

DEX_MAX_PRICE_USD

Per-call ceiling. A call costing more is refused before paying.

0.05

DEX_MAX_SPEND_USD

Total for the life of the process.

1.00

DEX_MAX_CALLS

Number of paid calls for the life of the process.

200

DEX_MCP_TIMEOUT_MS

Upstream request timeout.

45000

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:

  1. No wallet → never pays. This is the state you are in unless someone set a key.

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

  3. Price above DEX_MAX_PRICE_USD → refuses, and names the price and the cap.

  4. Would cross DEX_MAX_SPEND_USD or DEX_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

get_base_liquidity

$0.01

DEX liquidity, depth and TVL per venue on Base

{"pair":"WETH/USDC"}

get_polygon_token_price

$0.01

Live USD price from Polygon pools, with the backing liquidity and a confidence rating

{"symbol":"WMATIC"}

get_avalanche_pool_reserves

$0.01

Raw AMM reserves, fee, implied price and TVL at one block height

{"pair":"WAVAX/USDC"}

find_polygon_arbitrage

$0.01

Cross-venue price gaps on Polygon, ranked by gross spread

{"minSpreadBps":25}

find_avalanche_arbitrage

$0.01

The same scan on Avalanche C-Chain

{"minSpreadBps":25}

get_v4_hook_risk

$0.01

Uniswap v4 hook permission bits, custody class and verified-source consensus

{"address":"0x…80"}

lookup_lei

$0.03

GLEIF legal-entity record by name, lapsed entities flagged not hidden

{"q":"Apple Inc."}

get_treasury_yield_curve

$0.03

US Treasury par yield curve, 1 month to 30 years

{} for the latest

get_company_dossier

$0.05

Identity, OFAC screening and SEC registration for one entity, joined

{"ticker":"AAPL"}

get_sec_filings

$0.05

Everything an issuer has filed since your cursor

{"ticker":"AAPL","since":"2026-09-01"}

get_sec_events

$0.05

8-K material events since your cursor, decoded by item code

{"ticker":"TSLA","since":"2026-09-01","items":"5.02"}

get_sec_insiders

$0.05

Forms 3/4/5, SC 13D/G ownership changes since your cursor

{"ticker":"NVDA","since":"2026-09-01"}

get_spend_budget

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. since is required and inclusive. Pass the date you last read; you get what has landed since. They report matched and truncated, 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=undefined and it does not cost you a call.

  • get_v4_hook_risk never 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. Treat OPAQUE as 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 chain argument any more. Each tool targets one chain's route and writes the whole path itself. Sending chain is 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_chains and get_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_curve and get_spend_budget are 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 viem

Without 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 exact scheme 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) and DEX_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 to NaN, which switched every cap off.

  • get_spend_budget reports 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.mjs is the adapter that reads the DEX_* 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.

Available Tools

23 tools
find_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).

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

    A3.8/5.0

    Scored across 23 tools

    Disambiguation4/5

    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 Consistency3/5

    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.

    Tool Count2/5

    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.

    Completeness4/5

    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

    ActivitySlowing
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Eight 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.
      8
      120 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides 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.
      1
      43 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      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.
      4
      76 npm
      MIT