MLB Stats

Provides MLB schedules, results, team and player lookups via an MCP wrapper over MLB Stats API.
  • python

5

GitHub Stars

python

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mpizza-mcp_mlb_statsapi": {
      "command": "{YOUR_PYTHON_EXECUTABLE_PATH}/python",
      "args": [
        "-m",
        "mcp_mlb_statsapi"
      ]
    }
  }
}

You can access MLB statistics efficiently through an MCP server that wraps the MLB Stats API. This server gives you practical, structured data on game schedules, results, team and player information, all accessible within an MCP client workflow.

How to use

You use this MCP server by running it as a local or remote MCP endpoint and querying it through your MCP client. The server exposes core data points such as game schedules for date ranges, daily game results with scores and pitchers, and detailed team or player lookups. Once the server is running, you can request data through your MCP client to drive dashboards, analytics, or integrations that need MLB stats without managing separate API calls yourself.

How to install

Prerequisites you need before running the server:

  • Python 3.10 or newer

  • uv package manager

Additional setup and configuration

Two explicit runtime configurations are shown for running the MCP server locally. Choose the one that fits your environment.

{
  "mcpServers": {
    "mcp_mlb_statsapi": {
      "command": "{YOUR_PYTHON_EXECUTABLE_PATH}/python",
      "args": ["-m", "mcp_mlb_statsapi"]
    }
  }
}
{
  "mcpServers": {
    "mcp_mlb_statsapi": {
      "command": "{YOUR_UV_EXECUTABLE_PATH}/uv",
      "args": [
        "--directory",
        "{YOUR_PROJECT_PATH}/src/mcp_mlb_statsapi",
        "run",
        "mcp_mlb_statsapi"
      ]
    }
  }
}

Notes on installation and run flows

If you install from source code, you typically create a virtual environment, install dependencies, and run the server via UV. If you install via Python package index, you can start the server by invoking Python with the module name.

Available data capabilities (tools)

The MCP server provides several data access capabilities that you can use through your MCP client. These include:

Troubleshooting and tips

Ensure you are using a compatible Python version (3.10+), and that the uv tool is installed if you are running a local MCP, since uv is used to run the local server.

Available tools

Game Schedules

Fetch MLB game schedules for specified date ranges, with optional team filtering, to plan analytics and dashboards.

Game Results

Retrieve daily game results including scores, winning/losing teams, and winning pitcher for reporting and insights.

Team Results

Get detailed results for a specific team’s most recent game, including scoring plays and highlights.

Player Lookup

Lookup player IDs by last name or first name with fuzzy matching to enrich datasets.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
MLB Stats MCP Server - mpizza/mcp_mlb_statsapi | VeilStrat