loaditout.ai
BrowseRequestsSubmitBlogXPrivacyDisclaimer
loaditout.ai
SkillsMCP ServersPacksSubmitRequestsBlog

mlb-mcp

MCP Tool

etweisberg/mlb-mcp

MCP server for advanced baseball analytics (statcast, fangraphs, baseball reference, mlb stats API) with client demo

Install

$ npx loaditout add etweisberg/mlb-mcp

About

MLB Stats MCP Server

[](https://github.com/etweisberg/baseball/mcp-baseball-stats/workflows/test.yml) [](https://github.com/etweisberg/mcp-baseball-stats/actions/workflows/pre-commit.yml) [](https://smithery.ai/server/@etweisberg/mlb-mcp)

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.

Project Structure
  • mlb_stats_mcp/ - Main package directory
  • server.py - Core MCP server implementation
  • tools/ - MCP tool implementations
  • mlb_statsapi_tools.py - MLB StatsAPI tool definitions
  • statcast_tools.py - Statcast data tool definitions
  • pybaseball_plotting_tools.py - Additional pybaseball tools provided for generating matplotlib plots and returning base64 encoded images
  • pybaseball_supp_tools.py - Supplemental pybaseball functions for interfacing with fangraphs, baseball reference, and other data sources
  • utils/ - Utility modules
  • logging_config.py - Logging configuration
  • images.py - functions related to handling plot images
  • tests/ - Test suite for verifying server functionality
  • pyproject.toml - Project configuration and dependencies
  • .pre-commit-config.yaml - Pre-commit hooks configuration
  • .github/ - GitHub Actions workflows
Tools
Setup
  1. Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Create and activate a virtual environment:
uv venv
source .venv/bin/activate  # On Unix/macOS
# or
.

Tags

baseball-analyticsbaseball-databaseball-statisticsfangraphsmcp

Reviews

Loading reviews...

Quality Signals

Quality Score3800
17
Stars
0
Installs
Last updated202 days ago
Security: AREADME
New
mcp-client
mcp-server
mlb-stats-api
statcast
smithery

Safety

Risk Levelmedium
Data Access
read
Network Accessnone

Details

Sourcesmithery
Last commit8/26/2025
View on GitHub→

Embed Badge

[![Loaditout](https://loaditout.ai/api/badge/etweisberg/mlb-mcp)](https://loaditout.ai/skills/etweisberg/mlb-mcp)