uniswap-pools-mcp
Allows querying Uniswap pools/pairs on the Ethereum blockchain by token address, retrieving details such as volume, liquidity, and fees for V2, V3, and V4 pools.
References GitHub for repository access and license information, with the MCP server code hosted and available at a GitHub repository.
Formats query results as markdown tables and text summaries, providing structured outputs for pool data including token pairs, addresses, fee tiers, and financial metrics.
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., "@uniswap-pools-mcpget Uniswap pools for USDC token"
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.
Uniswap Pools MCP
An MCP server for querying Uniswap pools/pairs by token address, delivering clean, structured results for easy integration and analysis.
Features
Query Uniswap Pools/Pairs:
Fetch V2, V3, and V4 pools/pairs for a given token address.
Retrieve specific pool/pair details by version (
v2,v3,v4) and ID.
Formatted Output:
Returns data in markdown tables for combined pool queries.
Provides markdown text summaries for specific pool/pair queries, including token addresses.
Related MCP server: uniswap-poolspy-mcp
Installation
Prerequisites
Python: Version 3.10 or higher.
uv: A Python package manager (recommended for dependency management).
The Graph API Key: Required for querying Subgraphs. Obtain one from The Graph.
Setup
Clone the Repository:
git clone https://github.com/kukapay/uniswap-pools-mcp.git cd uniswap-pools-mcpInstall Dependencies:
uv syncInstalling to Claude Desktop:
Install the server as a Claude Desktop application:
uv run mcp install main.py --name "Uniswap Pools"Configuration file as a reference:
{ "mcpServers": { "Uniswap Pools": { "command": "uv", "args": [ "--directory", "/path/to/uniswap-pools-mcp", "run", "main.py" ], "env": { "THEGRAPH_API_KEY": "thegraph-api-key"} } } }Replace
/path/to/uniswap-pools-mcpwith your actual installation path, andthegraph-api-keywith your API key from The Graph.
Usage
The server provides several tools to query Uniswap pool/pair data.
Tools
Get All Pools/Pairs for a Token:
def get_token_pools(token_address: str) -> str:Description: Queries all Uniswap V2, V3, and V4 pools/pairs for a given token address.
Parameters:
token_address(str): Ethereum address of the token (e.g.,0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48for USDC).
Output: Markdown table with columns: Version, ID, Pair, Fee Tier, Volume USD, Liquidity/ReserveUSD, Fees USD.
Example:
Prompt:
Get Uniswap pools for token at address 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48Output:
| Version | ID | Pair | Fee Tier | Volume USD | Liquidity/ReserveUSD | Fees USD | |---------|--------------------------------------------|-----------|----------|------------|---------------------|----------| | v2 | 0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc | USDC/WETH | 3000 | 2000000.0 | 500000.0 | N/A | | v3 | 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640 | USDC/WETH | 500 | 1000000.0 | 123456789 | 5000.0 | | v4 | 0x1234567890abcdef1234567890abcdef12345678 | USDC/WETH | 1000 | 500000.0 | 987654321 | 2500.0 |
Get Specific Pool/Pair by Version and ID:
def get_pool_data(version: str, pool_id: str) -> str:Description: Queries a specific Uniswap pool/pair by version (
v2,v3, orv4) and ID.Parameters:
version(str): Uniswap version (v2,v3, orv4).pool_id(str): Ethereum address of the pool or pair (e.g.,0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc).
Output: Markdown text with details: Version, ID, Pair, Token0 Address, Token1 Address, Fee Tier, Volume USD, Liquidity/ReserveUSD, Fees USD.
Example:
Prompt:
Get Uniswap V2 pool data by ID 0xb4e16d0168e52d35cacd2c6185b44281ec28c9dcOutput:
**Uniswap V2 Pair Details** - **Version**: v2 - **ID**: 0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc - **Pair**: USDC/WETH - **Token0 Address**: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 - **Token1 Address**: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 - **Fee Tier**: 3000 (0.3%) - **Volume USD**: 2000000.0 - **Liquidity/ReserveUSD**: 500000.0 - **Fees USD**: N/A
License
This project is licensed under the MIT License. See the LICENSE file for details.
Available Tools
5 toolsget_pool_dataA
Query a specific Uniswap pool/pair by version (v2, v3, v4) and ID and return as markdown text.
Parameters:
version (str): The Uniswap version to query ('v2', 'v3', or 'v4').
pool_id (str): The Ethereum address of the pool or pair to query (e.g., '0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc').
ctx (Context): The API context for logging and error handling.
Returns:
A markdown-formatted string containing details of the pool/pair, including Version, ID, Pair, Token0 Address,
Token1 Address, Fee Tier, Volume USD, Liquidity/ReserveUSD, and Fees USD.
| Name | Required | Description | Default |
|---|---|---|---|
| pool_id | Yes | ||
| version | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the action (query), output format (markdown text), and specific data fields returned, but doesn't mention error handling, rate limits, authentication requirements, or whether this is a read-only operation. It provides basic behavioral context but lacks important operational details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly structured and concise. The first sentence states the core purpose, followed by clear parameter documentation and return value description. Every sentence adds essential information with zero waste, making it easy to scan and understand.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 2 parameters, no annotations, and no output schema, the description provides good completeness. It explains what the tool does, documents parameters thoroughly, and describes the return format and content. However, it doesn't address potential errors, authentication, or rate limiting, which would be helpful given the lack of annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage and 2 parameters, the description provides excellent parameter semantics. It clearly explains both parameters: 'version' with its allowed values ('v2', 'v3', or 'v4') and 'pool_id' with an example Ethereum address. The description fully compensates for the schema's lack of documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Query a specific Uniswap pool/pair'), the resource ('by version and ID'), and the output format ('return as markdown text'). It distinguishes from sibling tools like 'get_token_pools' which appear to list pools for tokens rather than query specific pools by ID and version.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool ('Query a specific Uniswap pool/pair by version and ID'), but doesn't explicitly state when not to use it or name alternatives. It implies usage for retrieving detailed pool data rather than listing pools, but lacks explicit exclusions or comparisons to sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_token_poolsA
Query all Uniswap V2, V3, and V4 pools/pairs for a specific token and return as a formatted markdown table.
Parameters:
token_address (str): The Ethereum address of the token to query (e.g., '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48').
ctx (Context): The API context for logging and error handling.
Returns:
A markdown-formatted string containing a table with columns: Version, ID, Pair, Fee Tier, Volume USD, Liquidity/ReserveUSD, Fees USD, sorted by Volume USD in descending order.
| Name | Required | Description | Default |
|---|---|---|---|
| token_address | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the tool's behavior by specifying it returns a formatted markdown table with sorted results, which adds useful context beyond basic querying. However, it lacks details on error handling, rate limits, or data freshness, which are important for a tool interacting with blockchain data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core purpose, followed by parameter details and return format in a structured manner. Every sentence adds value without redundancy, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (querying multiple blockchain versions) and lack of annotations or output schema, the description is fairly complete. It explains the purpose, parameters, and return format in detail. However, it could improve by mentioning potential limitations like network dependencies or default behaviors, but it covers the essentials well.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the input schema, which has 0% coverage. It explains the 'token_address' parameter with an example and clarifies the 'ctx' parameter's purpose for logging and error handling, compensating well for the schema's lack of descriptions. This provides clear semantics for both parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Query all Uniswap V2, V3, and V4 pools/pairs for a specific token') and the resource ('token'), distinguishing it from siblings by specifying it covers all versions (V2-V4) rather than individual versions like the sibling tools. The verb 'query' is precise and the scope is well-defined.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by specifying it's for querying pools for a token across multiple Uniswap versions, but it does not explicitly state when to use this tool versus the sibling tools (e.g., get_token_pools_v2, v3, v4) or provide alternatives. However, the clear scope (all versions) offers some implicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_token_pools_v2A
Query all Uniswap V2 pairs for a specific token and return as a formatted markdown table.
Parameters:
token_address (str): The Ethereum address of the token to query (e.g., '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48').
ctx (Context): The API context for logging and error handling.
Returns:
A markdown-formatted string containing a table with columns: Version, ID, Pair, Volume USD, ReserveUSD.
| Name | Required | Description | Default |
|---|---|---|---|
| token_address | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool queries data and returns a formatted markdown table, which indicates a read-only operation without mutation. However, it lacks details on behavioral traits such as error handling, rate limits, or authentication needs, leaving gaps in transparency for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core purpose, followed by clear parameter and return value sections. Every sentence adds value without redundancy, making it efficient and well-structured for quick understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (querying Uniswap pairs) and no annotations or output schema, the description is mostly complete: it explains the purpose, parameters, and return format. However, it lacks details on potential errors, data freshness, or limitations, which could be useful for full contextual understanding in a financial data context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds significant meaning beyond the input schema by explaining the token_address parameter with an example (e.g., Ethereum address format) and clarifying the ctx parameter for logging and error handling, even though ctx is not in the schema. This fully compensates for the lack of schema documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('Query all Uniswap V2 pairs for a specific token') and resource ('Uniswap V2 pairs'), distinguishing it from sibling tools like get_token_pools_v3 and get_token_pools_v4 by specifying the V2 version. It also mentions the output format ('formatted markdown table'), making the purpose explicit and differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by specifying 'for a specific token' and the V2 version, which helps differentiate it from siblings like get_pool_data or other versions. However, it does not explicitly state when to use this tool versus alternatives (e.g., no direct comparison or exclusion criteria), so it provides clear context but lacks explicit guidance on alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_token_pools_v3A
Query all Uniswap V3 pools for a specific token and return as a formatted markdown table.
Parameters:
token_address (str): The Ethereum address of the token to query (e.g., '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48').
ctx (Context): The API context for logging and error handling.
Returns:
A markdown-formatted string containing a table with columns: Version, ID, Pair, Fee Tier, Volume USD, Liquidity.
| Name | Required | Description | Default |
|---|---|---|---|
| token_address | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the output format (markdown table) and columns, which is useful behavioral context. However, it does not mention potential limitations like rate limits, error handling, or data freshness, leaving gaps for a query tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear purpose statement, parameter details, and return information in three concise sections. Every sentence adds value, and it is front-loaded with the main action, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (querying pools with one parameter) and no annotations or output schema, the description is mostly complete: it covers purpose, parameters, and return format. However, it lacks details on behavioral aspects like error cases or performance, slightly reducing completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that token_address is an 'Ethereum address' with an example, and clarifies the purpose of the ctx parameter for 'logging and error handling', fully compensating for the schema's lack of documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Query all Uniswap V3 pools for a specific token') and the output format ('return as a formatted markdown table'), distinguishing it from sibling tools like get_token_pools_v2 and get_token_pools_v4 by specifying the V3 version. The verb 'query' and resource 'Uniswap V3 pools' are precise.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for querying Uniswap V3 pools, but does not explicitly state when to use this tool versus alternatives like get_token_pools_v2 or get_token_pools_v4. It provides context (V3 pools) but lacks explicit guidance on exclusions or comparisons with siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_token_pools_v4A
Query all Uniswap V4 pools for a specific token and return as a formatted markdown table.
Parameters:
token_address (str): The Ethereum address of the token to query (e.g., '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48').
ctx (Context): The API context for logging and error handling.
Returns:
A markdown-formatted string containing a table with columns: Version, ID, Pair, Fee Tier, Volume USD, Liquidity.
| Name | Required | Description | Default |
|---|---|---|---|
| token_address | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the tool's behavior by describing the query action and output format (markdown table with specific columns). However, it lacks details on potential errors, rate limits, authentication needs, or whether this is a read-only operation. The mention of 'ctx' parameter for 'logging and error handling' hints at some behavioral aspects but is vague.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded with the core purpose in the first sentence. Each subsequent section (Parameters, Returns) adds necessary details without redundancy. The text is appropriately sized, with no wasted sentences, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (querying blockchain data with one parameter) and no annotations or output schema, the description is mostly complete. It covers purpose, parameters, and return format in detail. However, it could improve by addressing behavioral aspects like error handling or performance, which are relevant for a tool interacting with external APIs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the input schema, which has 0% coverage. It fully documents the 'token_address' parameter with its purpose, data type, and an example, and explains the 'ctx' parameter (not in the schema) for context handling. This compensates for the low schema coverage and provides clear parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Query all Uniswap V4 pools for a specific token') and the output format ('return as a formatted markdown table'). It distinguishes from sibling tools by specifying V4 version, unlike generic 'get_token_pools' or version-specific siblings like 'get_token_pools_v2' and 'get_token_pools_v3'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by specifying 'Uniswap V4 pools' and 'for a specific token', which suggests when to use this tool (for V4 pools with a token address). However, it does not explicitly state when to choose this over alternatives like 'get_token_pools_v2' or 'get_token_pools_v3', nor does it mention any exclusions or prerequisites beyond the token address parameter.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v1.0.0- First observed
get_pool_data - First observed
get_token_pools - First observed
get_token_pools_v2 - First observed
get_token_pools_v3 - First observed
get_token_pools_v4
TDQS
There is significant overlap between get_token_pools and the version-specific tools (get_token_pools_v2/v3/v4), as they all retrieve pools for a token with similar outputs. However, get_pool_data is clearly distinct for querying a specific pool by ID. The descriptions help clarify that get_token_pools aggregates across versions while others are version-specific, but agents might still be confused about when to use which.
The naming follows a consistent snake_case verb_noun pattern throughout (e.g., get_pool_data, get_token_pools). The only deviation is the addition of version suffixes (v2, v3, v4) for some tools, which is logical but slightly breaks the pure verb_noun convention. Overall, the naming is predictable and readable.
With 5 tools, the count is well-scoped for querying Uniswap pools, covering specific pool data and token-based queries across versions. It's slightly lean but reasonable, as each tool serves a purpose. A few more tools for broader operations (e.g., list_all_pools) could enhance it, but it's not a significant gap.
The toolset covers querying pools by ID and by token across Uniswap versions, which is a focused domain. However, there are notable gaps: no tools for creating, updating, or deleting pools (if applicable), and no broader operations like listing all pools or searching by other criteria. This limits agents to read-only queries, which may be sufficient but feels incomplete for full pool management.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for Fuse Network: balances, tokens, staking, DeFi data, swaps and on-chain transactions.
MCP server giving AI agents one-connection access to crypto & DeFi data: DeFi protocol TVL, stableco
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server implementation that enables access to DexScreener API data, providing real-time information on DEX pairs, token profiles, and market statistics across multiple blockchains.722-
- AlicenseBqualityDmaintenanceAn MCP server that tracks newly created liquidity pools on Uniswap across nine blockchain networks.110MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that delivers real-time token prices from Uniswap V3 across multiple chains.3MIT
- AlicenseAqualityDmaintenanceAn MCP server that tracks and analyzes DEX liquidity pools to power intelligent DeFi agents and automated strategies.12MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/kukapay/uniswap-pools-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server