Uses FastAPI framework to provide HTTP/SSE transport for remote MCP client access, enabling web-based interaction with BigBugAI tools
Utilizes Pydantic for typed schemas and data validation for tool input/output handling
Uses pytest framework for unit testing the MCP server functionality
Built as a Python-based MCP server providing BigBugAI cryptocurrency analysis tools
Employs Ruff for code linting and formatting to maintain code quality
BigBugAI MCP (Python + FastMCP)
Production-ready MCP server exposing BigBugAI tools with stdio transport for local MCP clients (Claude Desktop, Cursor) and optional HTTP/SSE transport (FastAPI + uvicorn) for remote access.
Auth via API key (env var)
Per-key rate limiting (moving window; configurable via env)
Typed Pydantic schemas for tool I/O
Clean error handling and JSON-stable outputs
Tests, ruff, and mypy configuration
Tools
get_trending_tokens(limit: int = 10) -> list[dict]GET
${BTUNIFIED_API}/api/tokens/newly-ingestedby defaultFalls back to
${BTUNIFIED_API}/v1/trending/tokensand a few other candidates if 404Override primary path with
BTUNIFIED_TRENDING_PATHNormalizes
{items: [...]} -> [...]
token_analysis_by_contract(chain: str, address: str) -> dictGET
${BTUNIFIED_API}/api/token-intel/{chain}/{address}/report
Requirements
Python 3.11+
Packages:
mcp[cli],httpx,pydantic,fastapi,uvicorn,limits,pytest,ruff,mypy
Environment variables
BIGBUGAI_MCP_API_KEY(required)BIGBUGAI_API_KEY/BIGBUGAI_API_TOKEN(optional; used for upstream HTTP calls if set. If not set, HTTP calls will fall back toBIGBUGAI_MCP_API_KEY.)BTUNIFIED_API(default:https://api.bigbug.ai)MCP_RATE_LIMIT(default:60/hour, rate string perlimits)
Install
Using uv (recommended):
Unix/macOS
Windows PowerShell
Alternatively, you can explicitly add packages (will update pyproject as needed):
Run (STDIO)
Windows PowerShell:
This mode is intended for local MCP clients (e.g., Claude Desktop, Cursor).
Note: Tools no longer require api_key in the payload. The server reads the API key
from the environment (BIGBUGAI_MCP_API_KEY) and applies rate limiting based on it.
Claude Desktop config
Create claude_desktop_config.json:
Run (HTTP)
Expected output:
MCP HTTP/SSE endpoints are mounted under /mcp. Depending on your FastMCP version, an SSE stream may be available at /mcp/sse.
Example cURL (SSE; may require -N to keep the connection open and is primarily for debugging):
Note: MCP over HTTP/SSE is designed for compatible clients; manual cURL interaction is limited.
Smoke scripts
Quick sanity checks for the tools (require an API key in env):
Trending
# uses BIGBUGAI_API_KEY/BIGBUGAI_API_TOKEN/BIGBUGAI_MCP_API_KEY from env uv run python scripts/smoke_trending.py -l 5Token analysis
# requires BIGBUGAI_MCP_API_KEY in env; optionally set BB_CHAIN/BB_ADDRESS $env:BIGBUGAI_MCP_API_KEY="your-secret" # PowerShell uv run python scripts/smoke_token_analysis.py
Testing and Quality
Project layout
Security
Rotate API keys regularly
Keep HTTP mode behind OAuth/reverse proxy if exposed publicly
Rate limits are per API key in a moving window strategy
See SECURITY.md for reporting vulnerabilities.
Extending
Add more tools for BigBugAI endpoints (portfolio manager, investment suggester, etc.).
Add new Pydantic request/response models in
src/bigbugai_mcp/models.pyAdd the tool function in
src/bigbugai_mcp/tools.pyDecorate with
@guardedand register inregister_tools()Write tests in
tests/
Contributing
Please see CONTRIBUTING.md for guidelines.
Code of Conduct
This project follows the Contributor Covenant.
License
MIT — see LICENSE.
This server cannot be installed