Mlb Stats logo

Mlb Stats

MLB Stats API MCP — official MLB statistics

Install Mlb Stats

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mlb-stats": {
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-mlb-stats"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Automated check passed— started and listed 10 tools correctly (7d ago).

Overview

Tools10

What Mlb Stats lets your agent do. Expand a tool for its parameters.

Verified live~1.6k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

8/8 checks healthy over the last 51d

What it can do

From the 10 tools this server returned when we ran it.

Read-only tools · 10
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age161 days
Maintainers1

Observed 2026-10-21 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 3d ago via OSV.dev · @pipeworx/mcp-mlb-stats (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads437Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed10Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

@pipeworx/mlb-stats

MLB Stats API MCP — official MLB statistics: teams, standings, daily schedule and scores, rosters, player bios, season stats, per-game logs, batter-vs-pitcher splits, probable pitchers with posted lineups, and full box scores. No auth.

Part of Pipeworx — an MCP gateway connecting AI agents to 1882+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.

Tools

  • mlb_teams() — every MLB team with id, abbreviation, league, division, venue
  • mlb_standings(season?, league_id?) — division standings; defaults to the current season
  • mlb_schedule(date?) — games, scores, status and venue for a date (default today), with gamePk
  • mlb_roster(team_id) — active roster
  • mlb_player(person_id) — biographical profile
  • mlb_player_stats(player, season?, group?) — season hitting and/or pitching totals; player is a name or id
  • mlb_player_game_log(player, season?, group?, last?) — per-game lines, newest first (default last 15); pitchers default to the pitching log
  • mlb_matchup(batter, pitcher, season?) — batter-vs-pitcher history split by season
  • mlb_probable_pitchers(date?, team?) — probable starters and, once posted, the batting order for each game
  • mlb_boxscore(game_pk) — every batter's and pitcher's line plus team totals for one game

Player and team arguments accept names ("Yordan Alvarez", "Astros", "HOU") or numeric ids.

Data source

https://statsapi.mlb.com/api/v1/ — public, used by MLB.com itself. Lineups appear 2-4 hours before first pitch; probable pitchers as soon as MLB names them.

Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

config.json
{
  "mcpServers": {
    "mlb-stats": {
      "url": "https://gateway.pipeworx.io/mlb-stats/mcp"
    }
  }
}

What this endpoint actually serves

tools/list at https://gateway.pipeworx.io/mlb-stats/mcp returns the tools in the table above plus the shared Pipeworx meta-tools — ask_pipeworx, discover_tools, search_within, remember/recall and the rest of the gateway-wide set. So the tool count you see is larger than this table: a single-pack endpoint currently lists roughly 30 shared tools alongside the pack's own. The connection's initialize response states its exact scope, and is the authoritative answer for a given day.

This is deliberate, not multiplexing by accident. The meta-tools are what let a scoped connection answer a question this pack does not cover — via ask_pipeworx, which routes across the whole catalog — without you adding a second MCP server. There is currently no way to mount a pack endpoint without them; if the extra schemas cost you more context than the routing is worth, connect to the full gateway once rather than to several pack endpoints.

Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:

config.json
{
  "mcpServers": {
    "pipeworx": {
      "url": "https://gateway.pipeworx.io/mcp"
    }
  }
}

Both URLs reach the same gateway and the same 1882+ data sources. The only difference is which pack's tools are listed directly; ask_pipeworx reaches all of them from either one.

No MCP client? Call it over HTTP

Terminal
curl -X POST https://gateway.pipeworx.io/v1/tools/mlb_teams \
  -H 'Content-Type: application/json' \
  -d '{}'

No account needed for the first calls. Inspect any tool: GET https://gateway.pipeworx.io/v1/tools/mlb_teams. Find one: POST https://gateway.pipeworx.io/v1/tools/search_packs with {"query":"..."}.

Standalone (no gateway account)

This package also runs as a local stdio MCP server — no Pipeworx account, no gateway round-trip:

config.json
{
  "mcpServers": {
    "mlb-stats": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-mlb-stats"]
    }
  }
}

Or run it directly to confirm it starts:

Terminal
npx -y @pipeworx/mcp-mlb-stats

It speaks MCP over stdin/stdout and answers initialize/tools/list/tools/call for only this pack's tools — none of the shared meta-tools the gateway connection above adds. Same source, same tools, no ask_pipeworx routing.

Using with ask_pipeworx

Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:

Code
ask_pipeworx({ question: "your question about Mlb Stats data" })

The gateway picks the right tool and fills the arguments automatically.

More

License

MIT

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mlb Stats

Mlb Stats is an MCP server that provides access to official MLB statistics through tools for teams, standings, schedules and scores, rosters, player bios, season stats, game logs, batter-versus-pitcher matchups, probable pitchers, posted lineups, and box scores. It uses MLB’s public Stats API and requires no authentication.

You can retrieve teams, division standings, daily schedules and scores, active rosters, player biographies, season hitting and pitching totals, per-game logs, batter-versus-pitcher history, probable starters, posted batting orders, and complete game box scores.

Use names or numeric IDs for player and team arguments. Team tools accept names such as “Astros” or abbreviations such as “HOU,” while player tools accept a player name or ID.

Connect an MCP client to https://gateway.pipeworx.io/mlb-stats/mcp, or run the standalone server with npx -y @pipeworx/mcp-mlb-stats. The gateway connection requires no authentication for initial calls, and the standalone package runs locally over MCP stdio.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMlb Stats AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mlb-stats?style=directory)](https://allmcps.com/mcp/mlb-stats)
HTML Embed
<a href="https://allmcps.com/mcp/mlb-stats"><img src="https://allmcps.com/api/badge/mlb-stats?style=directory" alt="Mlb Stats on AllMCPs" /></a>