
An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

A Model Context Protocol server that exposes MLB statistics data from the MLB Stats API, Statcast, FanGraphs, and Baseball Reference to MCP-compatible clients.
MLB Stats MCP Server is cataloged as an MCP server attributed to etweisberg. A Model Context Protocol server that exposes MLB statistics data from the MLB Stats API, Statcast, FanGraphs, and Baseball Reference to MCP-compatible clients. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MLB Stats MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It draws on the MLB Stats API and the pybaseball library for Statcast, FanGraphs, and Baseball Reference statistics.
Yes, running the module with the --http flag serves MCP at /mcp and listens on $PORT, defaulting to 8081.
README.md · c656d112bd48 · Fetched 2026-11-13 09:52:40 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A Python project that creates a Model Context Protocol (MCP) server for accessing MLB statistics data through the MLB Stats API and pybaseball library for statcast, fangraphs, and baseball reference statistics. This server provides structured API access to baseball statistics that can be used with MCP-compatible clients.
mlb_stats_mcp/ - Main package directory
server.py - Core MCP server implementationtools/ - MCP tool implementations
mlb_statsapi_tools.py - MLB StatsAPI tool definitionsstatcast_tools.py - Statcast data tool definitionspybaseball_plotting_tools.py - Additional pybaseball tools provided for generating matplotlib plots and returning base64 encoded imagespybaseball_supp_tools.py - Supplemental pybaseball functions for interfacing with fangraphs, baseball reference, and other data sourcesutils/ - Utility modules
logging_config.py - Logging configurationimages.py - functions related to handling plot imagestests/ - Test suite for verifying server functionalitypyproject.toml - Project configuration and dependencies.pre-commit-config.yaml - Pre-commit hooks configuration.github/ - GitHub Actions workflowscurl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
uv pip install -e .
To install MLB Stats Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @etweisberg/mlb-mcp --client claude
The project includes comprehensive pytest tests for the MCP server functionality:
uv run pytest -v
Tests verify all MLB StatsAPI tools work correctly with the MCP protocol, establishing connections, making API calls, and processing responses.
The project uses environment variables stored in .env to configure settings.
Use ANTHROPIC_API_KEY to enable MCP Server.
The MLB Stats MCP Server supports configurable logging via environment variables:
MLB_STATS_LOG_LEVEL - Sets the logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)MLB_STATS_LOG_FILE - Path to log file (if not set, logs to stderr)Logs go to stderr rather than stdout on purpose: under the stdio transport, stdout carries the JSON-RPC stream and anything else printed there corrupts it.
Run the server over HTTP with python -m mlb_stats_mcp.server --http, which
listens on $PORT (default 8081) and serves MCP at /mcp.
By default the server accepts any Host and any Origin, so a remote
deployment works out of the box. To restrict it, set either variable to a
comma-separated list:
MLB_STATS_ALLOWED_HOSTS - Host header values to accept. Setting this
turns on DNS rebinding protection; requests for any other host are rejected
with 421. Entries may end in :* to allow any port, e.g. localhost:*.MLB_STATS_ALLOWED_ORIGINS - Origin values to accept, used both for CORS
and, when MLB_STATS_ALLOWED_HOSTS is set, to reject other origins with
403. Requests without an Origin header are always allowed.Set both when locking down a deployment; naming hosts alone rejects every browser-based client.
To connect this MCP server to Claude Desktop, add a configuration to your claude_desktop_config.json file. Here's a template configuration:
"mcp-baseball-stats": {
"command": "{PATH_TO_UV}",
"args": [
"--directory",
"{PROJECT_DIRECTORY}",
"run",
"python",
"-m",
"mlb_stats_mcp.server"
],
"env": {
"MLB_STATS_LOG_FILE": "{LOG_FILE_PATH}",
"MLB_STATS_LOG_LEVEL": "DEBUG"
}
}
Replace the following placeholders:
{PATH_TO_UV}: Path to your uv installation (e.g., ~/.local/bin/uv){PROJECT_DIRECTORY}: Path to your project directory{LOG_FILE_PATH}: Path where you want to store the log filemcp[cli] - Machine-Learning Chat Protocol for tool definitionmlb-statsapi - Python wrapper for the MLB Stats APIhttpx - HTTP client for making API requestspytest and pytest-asyncio - Test frameworksuv - Fast Python package manager and installerThis project uses Ruff for linting and code formatting, with pre-commit hooks to ensure code quality.
pip install pre-commit
pre-commit install
Now, the linting checks will run automatically whenever you commit code. You can also run them manually:
pre-commit run --all-files
Linting rules are configured in the pyproject.toml file under the [tool.ruff] section. The project follows PEP 8 style guidelines with some customizations.
GitHub Actions workflows automatically run tests, linting, and pre-commit checks on all pull requests and pushes to the main branch.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MLB Stats MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mlb-mcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Runs a free Answer Engine Optimization and AI visibility report for a domain and returns a shareable report plus a structured summary.

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.