PancakeSwap PoolSpy MCP Server is an MCP server used to track newly created liquidity pools on PancakeSwap, providing real-time data for DeFi analysts, traders, and developers.
Key Capabilities
- Real-time pool tracking: Get pools created within a specified time range (default: 5 minutes).
- Customizable queries: Adjust the time range (in seconds) and the number of pools returned (default: 100).
- Detailed metrics: Includes pool address, tokens, creation timestamp, block number, transaction count, trading volume (USD), and total value locked (USD).
Usage
Prerequisites
- Python 3.10+: Make sure Python is installed on the system.
- The Graph API Key: Get an API key from The Graph to access the PancakeSwap subgraph.
Installation
- Install via Smithery: Automatically install PancakeSwap PoolSpy for Claude Desktop using Smithery.
- Clone the repository:
git clone https://github.com/kukapay/pancakeswap-poolspy-mcp.gitThencd pancakeswap-poolspy-mcp - Install dependencies: Use uv to install the required Python packages:
uv add mcp[cli] httpx dotenv
Client Configuration
{ "mcpServers" : { "PancakeSwap-PoolSpy" : { "command" : " uv " , "args" : [ " --directory " , " path/to/pancakeswap-poolspy-mcp " , " run " , " main.py " ], "env" : { "THEGRAPH_API_KEY" : " your api key from The Graph " } } } }
Run the Server
Run the server in development mode to test locally: This will start the MCP Inspector, where you can interact with theget_new_pools_bsctool.
Tool Description
get_new_pools_bsc: Get a list of newly created PancakeSwap pools on BNB Smart Chain.
Parameters:
time_range_seconds(int): The time range (in seconds) for finding new pools. Default is 300 seconds (5 minutes).limit(int): The maximum number of pools to return. Default is 100 pools.
Returns: A formatted string listing pool details, or an error message if the query fails.
Example Output:
- Default (last 5 minutes, up to 100 pools):
get_new_pools_bsc()Newly Created Trading Pools (Last 5 Minutes, Limit: 100): Pool Address: 0x1234...5678 Tokens: WETH/USDC Created At: 2025-03-16 12:00:00 UTC Block Number: 12345678 Transaction Count: 10 Volume (USD): 1234.56 Total Value Locked (USD): 5678.90 Pool Address: 0x9abc...def0 Tokens: CAKE/BNB Created At: 2025-03-16 12:01:00 UTC Block Number: 12345679 Transaction Count: 5 Volume (USD): 789.12 Total Value Locked (USD): 3456.78 - Custom (last 10 minutes, up to 50 pools):
get_new_pools(600, 50)Newly Created Trading Pools (Last 10 Minutes, Limit: 50): [pool details...]
Example Prompts:
- "list newly created PancakeSwap pools from the last 1 hours."
- "Display PancakeSwap pools created within the last 2 minutes."
Use Cases
Suitable for DeFi analysts, traders, and developers to monitor new liquidity pools on PancakeSwap.
Limitations
- Requires a Python 3.10+ environment and a The Graph API key.
- Only supports PancakeSwap pools on BNB Smart Chain.
License
This project is licensed under the MIT License. For details, see the LICENSE file.