Skip to main content
Glama

check_honeypot

Analyze token addresses on Ethereum, BSC, and Base to detect honeypot risks using honeypot.is API. Identify potential scams with detailed analysis results.

Instructions

Check if a token address is a honeypot using honeypot.is API

Supports tokens on Ethereum, Binance Smart Chain (BSC) and Base.

Args:
    address: Token address to check (e.g., 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)

Returns:
    Markdown string containing honeypot analysis results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes

Implementation Reference

  • main.py:29-68 (handler)
    The handler function for the 'check_honeypot' tool. It validates the address, fetches data from honeypot.is API using a helper function, extracts key fields like honeypot status, taxes, and formats the results as Markdown. Registered via @mcp.tool() decorator.
    @mcp.tool()
    async def check_honeypot(address: str, ctx: Context) -> str:
        """Check if a token address is a honeypot using honeypot.is API
    
        Supports tokens on Ethereum, Binance Smart Chain (BSC) and Base.
    
        Args:
            address: Token address to check (e.g., 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48)
    
        Returns:
            Markdown string containing honeypot analysis results
        """
        ctx.info(f"Checking honeypot status for address {address}")
    
        # Validate address format (basic check)
        if not address.startswith("0x") or len(address) != 42:
            raise ValueError("Invalid address format")
    
        data = await fetch_honeypot_data(address, ctx)
        
        # Extract relevant fields
        is_honeypot = data.get("honeypotResult", {}).get("isHoneypot", False)
        risk = data.get("summary", {}).get("risk", "unknown")
        token_name = data.get("token", {}).get("name", "Unknown")
        buy_tax = data.get("simulationResult", {}).get("buyTax", "N/A")
        sell_tax = data.get("simulationResult", {}).get("sellTax", "N/A")
        transfer_tax = data.get("simulationResult", {}).get("transferTax", "N/A")
        is_open_source = data.get("contractCode", {}).get("openSource", "Unknown")
    
        # Format as Markdown
        result = f"""# Honeypot Analysis for {token_name}
    - **Address**: {address}
    - **Is Honeypot**: {is_honeypot}
    - **Risk Level**: {risk}
    - **Buy Tax**: {buy_tax}
    - **Sell Tax**: {sell_tax}
    - **Transfer Tax**: {transfer_tax}
    - **Contract Code Open Source**: {is_open_source}
    """
        return result
  • main.py:17-28 (helper)
    Helper function that performs the HTTP request to the honeypot.is API to retrieve honeypot analysis data for a given token address.
    async def fetch_honeypot_data(address: str, ctx: Context) -> Dict[str, Any]:
        """Fetch data from honeypot.is API"""
        async with httpx.AsyncClient() as client:
            headers = {"X-API-KEY": API_KEY} if API_KEY else {}
            params = {"address": address}
            try:
                response = await client.get(HONEYPOT_API_URL, headers=headers, params=params)
                response.raise_for_status()
                return response.json()
            except httpx.HTTPStatusError as e:
                raise ValueError(f"API request failed: {str(e)}")
  • main.py:29-29 (registration)
    The @mcp.tool() decorator registers the check_honeypot function as an MCP tool.
    @mcp.tool()
Install Server

Other Tools

Related Tools

Latest Blog Posts

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/honeypot-detector-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server