Graph Uniswap MCP
Click on "Install 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., "@Graph Uniswap MCPWhat's the price of WETH 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.
Graph Uniswap MCP
One MCP interface over Uniswap V2, V3, and V4 across Ethereum, Arbitrum, Base, Polygon, Optimism, and BSC β powered by The Graph. Ask an agent for a price, the top pools, a pair, or recent swaps on any Uniswap deployment and get back clean JSON.
Built to be correct where naive subgraph access goes wrong:
π Self-healing β markets are addressed by subgraph ID, so queries always follow the publisher's latest published version.
discover_marketsre-resolves the best live subgraph from The Graph's network subgraph (ranked by curation signal), so new or replacement deployments surface with no code change.𧬠Schema-adaptive β Uniswap's subgraphs are not uniform (V2
pairsvs V3/V4pools; classicethPriceUSD/derivedETHvs newernativePriceUSD/derivedNative). The server introspects each subgraph once and adapts every query automatically.π« Footgun-proofed β Uniswap subgraph TVL is unreliable (one spam-token pool can report trillions in fake liquidity). Every ranking is by
volumeUSD, never TVL, and TVL is always returned with a caveat. Prices are derived on-chain and easy to sanity-check (a stablecoin reads ~$1).
Tools
Tool | What it does |
| Every versionΓchain and its backing subgraph |
| Re-resolve the best live subgraph from the network subgraph (self-healing) |
| USD price of a token (symbol or address) |
| Top pools on a chain, ranked by volume |
| Pool(s) for a token pair, either order |
| Full stats for one pool/pair |
| Newest swaps, optionally scoped to a pool |
| Arbitrary GraphQL against the resolved subgraph |
Every tool takes chain and an optional version (v2/v3/v4). Omit version and it uses the highest-volume version on that chain. Chain aliases (eth, arb, matic, bnb, β¦) are accepted.
Related MCP server: Uniswap Trader MCP
Setup
npm install
npm run buildGet a free Graph gateway API key at https://thegraph.com/studio (Billing β API Keys β first 100k queries/month are free), then add the server to your MCP client:
{
"mcpServers": {
"graph-uniswap": {
"command": "npx",
"args": ["-y", "graph-uniswap-mcp"],
"env": { "GRAPH_API_KEY": "your_key_here" }
}
}
}Or run locally: GRAPH_API_KEY=... npm start.
Example calls
get_token_price { "token": "WETH", "chain": "arbitrum" }
top_pools { "chain": "base", "version": "v4", "first": 5 }
find_pool { "tokenA": "WBTC", "tokenB": "USDC", "chain": "ethereum" }
recent_swaps { "chain": "base", "version": "v4", "first": 10 }
discover_markets { "chain": "arbitrum", "version": "v3" }Covered markets
13 markets, each backed by a canonical Uniswap-Labs subgraph addressed by subgraph ID (so it auto-follows the publisher's latest version). Query volumes are a rough popularity signal from the operator dashboard.
Version | Chain | What it covers | ~Queries/day | Subgraph ID |
V4 | Base | PoolManager pools + hooks, swaps, fee tiers, prices β highest-volume Uniswap subgraph on the whole network | 8.6M |
|
V4 | BNB | V4 pools, swaps, fee tiers, prices | 1.7M |
|
V4 | Ethereum | V4 pools, swaps, fee tiers, prices | 233K |
|
V4 | Arbitrum | V4 pools, swaps, fee tiers, prices | β |
|
V4 | Optimism | V4 pools, swaps, fee tiers, prices | β |
|
V3 | Ethereum | Concentrated-liquidity pools, fee tiers, swaps, positions, prices | 467K |
|
V3 | Arbitrum | V3 pools, fee tiers, swaps, prices | 854K |
|
V3 | Base | V3 pools, fee tiers, swaps, prices β native-pricing schema ( | 536K |
|
V3 | Polygon | V3 pools, fee tiers, swaps, prices | 539K |
|
V3 | Optimism | V3 pools, fee tiers, swaps, prices | 307K |
|
V3 | BSC | V3 pools, fee tiers, swaps, prices | 1.1M |
|
V2 | Ethereum | Constant-product pairs, reserves, swaps, prices | 2.4M |
|
V2 | Base | V2 pairs, reserves, swaps, prices | 1.6M |
|
Call list_markets for this table live, or discover_markets to re-resolve the best current subgraph from The Graph's network subgraph. (V4 is not yet deployed on Polygon.)
Reliability
Built for agents that can't babysit a hung tool call:
Fail-fast, never hang. Every gateway request is time-boxed by an
AbortController(default 15s/attempt), so a stalled indexer returns a clean error instead of hanging your agent. Only genuinely transient failures (indexer lag, 5xx) retry.Version fallback (self-healing on the data path). When you don't pin a version and the top market's indexers are down, the server transparently falls back to the next-highest-volume version on that chain and still returns real data β the response's
servedfield tells you which version answered. A pinned version is never silently swapped.Tunable via env:
GRAPH_HTTP_TIMEOUT_MS(15000),GRAPH_MAX_ATTEMPTS(2),GRAPH_TOTAL_BUDGET_MS(25000).
Keyless pay-per-query (x402)
This server uses a shared GRAPH_API_KEY (free tier: 100k queries/month). If you'd rather an agent pay per query with no API key or account at all, pair it with PayQL β an MCP that runs any Graph subgraph query (including all the Uniswap subgraphs above) over x402, paying ~$0.01 in USDC per call via the gateway's β¦/api/x402/β¦ path. Gasless (EIP-3009), keyless, wallet-agnostic β the payment is the auth. Use this MCP for the curated Uniswap tools, and PayQL when you want the raw, key-free pay-as-you-go path.
License
MIT Β© PaulieB14
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PaulieB14/graph-uniswap-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server