What dependencies does the server require?
Python, `uv` (package manager), and libraries including `mcp[cli]`, `mlb-statsapi`, `httpx`, `pytest`, `pytest-asyncio`, and `matplotlib` (for plotting).
@etweisberg
Basic information
MCP server for advanced baseball analytics (statcast, fangraphs, baseball reference, mlb stats API)
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mlb-mcp": {
"command": "uv",
"args": [
"venv"
]
}
}
}Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
A Python project that implements a Model Context Protocol (MCP) server for accessing Major League Baseball statistics. It combines the MLB Stats API and the pybaseball library (Statcast, FanGraphs, Baseball Reference) to provide structured baseball data to MCP-compatible clients like Claude Desktop.
Install uv, create a virtual environment (uv venv), activate it, and install dependencies (uv pip install -e .). Set the ANTHROPIC_API_KEY environment variable and optionally configure logging. Then add the server to your MCP client (e.g., Claude Desktop) using the provided JSON configuration.
MLB_STATS_LOG_LEVEL, MLB_STATS_LOG_FILE).Python, `uv` (package manager), and libraries including `mcp[cli]`, `mlb-statsapi`, `httpx`, `pytest`, `pytest-asyncio`, and `matplotlib` (for plotting).
Run `uv venv && source .venv/bin/activate && uv pip install -e .` in the project directory. Alternatively, install via Smithery with `npx -y @smithery/cli install @etweisberg/mlb-mcp --client claude`.
Add an entry to `claude_desktop_config.json` with the `command` set to your `uv` path, `args` pointing to `python -m mlb_stats_mcp.server`, and `env` for logging and API key.
Set the environment variables `MLB_STATS_LOG_LEVEL` (e.g., DEBUG, INFO) and `MLB_STATS_LOG_FILE` (path to log file). If the log file is not set, logs go to stdout.
The server provides tools for the MLB Stats API, Statcast data, and supplemental `pybaseball` functions for FanGraphs and Baseball Reference statistics.
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
Painless E2E Automation for Mobile and Web

Connect your AI assistant to your own YOUB endurance training account. Read recorded activities with full analysis, planned sessions, race goals, wellness (HRV, sleep, resting HR) and your athletic profile. Create or mov
A search tool helps dev to solve the naming things problem.
Comments