PancakeSwap PoolSpy

by kukapay

5 stars
168 downloads
Not rated
GitHub

About

Tracks newly created PancakeSwap liquidity pools in real-time, providing detailed metrics like token pairs, transaction counts, volume, and TVL for DeFi traders and analysts on BNB Smart Chain.

Details

Author
kukapay
Repository
kukapay/pancakeswap-poolspy-mcp
GitHub stars
5
Downloads
168
License
MIT License
Categories
Other, Finance, AI, Design, Developer Tools, Media, Infrastructure, Frontend
Tags
#visualization, #analytics

- Real-Time Pool Tracking: Fetches 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, volume (USD), and total value locked (USD).

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name PancakeSwap PoolSpy
    Command (node, npx, python, etc.) uv
    Arguments
    • Argument 1 --directory
    • Argument 2 path/to/pancakeswap-poolspy-mcp
    • Argument 3 run
    • Argument 4 main.py
    Environment
    • THEGRAPH_API_KEY your api key from The Graph

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

To install PancakeSwap PoolSpy for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @kukapay/pancakeswap-poolspy-mcp --client claude

1. Clone the Repository:

   git clone https://github.com/kukapay/pancakeswap-poolspy-mcp.git
cd pancakeswap-poolspy-mcp

2. Install Dependencies:
Install the required Python packages using uv:

   uv add mcp[cli] httpx dotenv

3. 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 in development mode to test it locally:

mcp dev main.py

This launches the MCP Inspector, where you can interact with the get_new_pools_bsc tool.

get_new_pools_bsc

Fetches a list of newly created PancakeSwap pools on BNB Smart Chain. Parameters: time_range_seconds (int, default 300), limit (int, default 100). Returns a formatted string listing pool details or an error message if the query fails.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "pancakeswap poolspy": {
            "env": {
                "THEGRAPH_API_KEY": "your api key from The Graph"
            },
            "args": [
                "--directory",
                "path/to/pancakeswap-poolspy-mcp",
                "run",
                "main.py"
            ],
            "command": "uv"
        }
    }
}

Linux

{
    "env": {
        "THEGRAPH_API_KEY": "your api key from The Graph"
    },
    "args": [
        "--directory",
        "path/to/pancakeswap-poolspy-mcp",
        "run",
        "main.py"
    ],
    "command": "uv"
}

Macos

{
    "env": {
        "THEGRAPH_API_KEY": "your api key from The Graph"
    },
    "args": [
        "--directory",
        "path/to/pancakeswap-poolspy-mcp",
        "run",
        "main.py"
    ],
    "command": "uv"
}

Windows

{
    "env": {
        "THEGRAPH_API_KEY": "your api key from The Graph"
    },
    "args": [
        "--directory",
        "path/to/pancakeswap-poolspy-mcp",
        "run",
        "main.py"
    ],
    "command": "uv"
}

PancakeSwap PoolSpy MCP Server

An MCP server that tracks newly created liquidity pools on Pancake Swap, providing real-time data for DeFi analysts, traders, and developers.

License
Python
smithery badge

Features

- Real-Time Pool Tracking: Fetches 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, volume (USD), and total value locked (USD).

Prerequisites

- Python 3.10+: Ensure Python is installed on your system.
- The Graph API Key: Obtain an API key from The Graph to access the PancakeSwap subgraph.

Installation

Installing via Smithery

To install PancakeSwap PoolSpy for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @kukapay/pancakeswap-poolspy-mcp --client claude

1. Clone the Repository:

   git clone https://github.com/kukapay/pancakeswap-poolspy-mcp.git
cd pancakeswap-poolspy-mcp

2. Install Dependencies:
Install the required Python packages using uv:

   uv add mcp[cli] httpx dotenv

3. 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"
}
}
}
}

Usage

Running the Server

Run the server in development mode to test it locally:

mcp dev main.py

This launches the MCP Inspector, where you can interact with the get_new_pools_bsc tool.

Available Tool

get_new_pools_bsc(time_range_seconds: int = 300, limit: int = 100)

Fetches a list of newly created PancakeSwap pools on BNB Smart Chain.

- Parameters:
- time_range_seconds (int): Time range in seconds to look back for new pools. Default is 300 seconds (5 minutes).
- limit (int): 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 Outputs:
- 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."

License

This project is licensed under the MIT License. See the LICENSE file for details.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.