About
A Python MCP server that exposes MLB statistics from the MLB Stats API and pybaseball, providing structured access to statcast, fangraphs, and baseball‑reference data for MCP clients.
Capabilities
The MLB Stats MCP Server bridges the gap between baseball analytics and conversational AI by exposing a rich set of statistical data through the Model Context Protocol. It pulls information from the official MLB Stats API and the versatile library, which includes Statcast, Fangraphs, and Baseball‑Reference datasets. Developers can query player performance, team standings, advanced metrics, or generate visualizations—all without leaving the AI assistant’s environment. This unified interface eliminates the need to manage multiple API keys, data pipelines, or custom parsing logic, allowing teams and analysts to focus on insight generation rather than integration overhead.
At its core, the server offers a collection of MCP tools that mirror common baseball queries: “Get the latest batting averages for the American League,” “Show a pitch‑type distribution chart for a given pitcher,” or “Retrieve career WAR values from Fangraphs.” Each tool translates a natural‑language request into an HTTP call to the appropriate endpoint, processes the JSON response, and returns a structured payload. For visual data, the server generates Matplotlib plots on demand, encodes them as base64 strings, and hands them back to the client. This capability is especially useful for AI assistants that can embed images directly in responses, turning raw numbers into instantly interpretable graphics.
The server’s design emphasizes reliability and observability. Environment variables control logging levels and output destinations, while automated tests cover every tool’s happy path and error handling. Integration with Claude Desktop is straightforward—once the server is running, the assistant can invoke any tool by name and receive typed or visual results in real time. The Smithery installation command further streamlines deployment, ensuring that the MCP server is available as a first‑class plugin for the Claude ecosystem.
Use cases span from fantasy baseball analysts who need up‑to‑date projections, to sports journalists crafting data‑driven stories, to academic researchers conducting sabermetric studies. In each scenario, the MCP server removes latency and friction: an AI assistant can fetch the latest statcast data for a game, generate a pitch‑type heatmap, and embed it in an article or presentation—all within a single conversational turn. Developers benefit from the server’s modular toolset, clear API contracts, and seamless integration with existing AI workflows. The standout advantage is the server’s ability to deliver both raw statistical tables and ready‑made visualizations, empowering AI assistants to present insights in the most effective format for any audience.
Related Servers
MarkItDown MCP Server
Convert documents to Markdown for LLMs quickly and accurately
Context7 MCP
Real‑time, version‑specific code docs for LLMs
Playwright MCP
Browser automation via structured accessibility trees
BlenderMCP
Claude AI meets Blender for instant 3D creation
Pydantic AI
Build GenAI agents with Pydantic validation and observability
Chrome DevTools MCP
AI-powered Chrome automation and debugging
Weekly Views
Server Health
Information
Tags
Explore More Servers
Chainlink Feeds MCP Server
Real‑time Chainlink price data for AI agents
Buttplug MCP Server
LLM-controlled buttplug.io device manager
Agentset MCP
Fast, intelligent document‑based RAG integration
Solana MCP Server
Simple RPC endpoints for Solana blockchain interactions
iOS Simulator MCP Server
Control and inspect iOS simulators via Model Context Protocol
MCP Image Recognition Server
AI-powered image description and OCR with Anthropic & OpenAI vision