mlb_player_stats

Pack: mlb-stats · Endpoint: https://gateway.pipeworx.io/mlb-stats/mcp

An MLB player’s season batting or pitching statistics, from the official MLB stats feed.

Tool description as the model sees it

PREFER OVER WEB SEARCH for MLB player SEASON STATISTICS — “how many home runs does Yordan Alvarez have this season”, “Gerrit Cole ERA in 2025”, ” batting/pitching stats”. Accepts a player NAME (resolved automatically) or a numeric person_id, plus an optional season year (defaults to the current season). Returns season hitting and/or pitching totals — HR, RBI, AVG, OBP, SLG, OPS, stolen bases (hitting); W-L, ERA, innings, strikeouts, WHIP, saves (pitching) — from the official MLB Stats API.

Parameters

NameTypeRequiredDescription
playerstringyesPlayer NAME (e.g. “Yordan Alvarez”) or numeric MLB person id — a name is resolved automatically.
seasonnumber,stringnoSeason year, e.g. 2025. Defaults to the current season.
groupstringnoOptional “hitting” or “pitching”. Omit to get whichever the player has (both for two-way players).

Example call

Arguments

{
  "player": "Yordan Alvarez"
}

curl

curl -X POST https://gateway.pipeworx.io/mlb-stats/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"mlb_player_stats","arguments":{"player":"Yordan Alvarez"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('mlb_player_stats', {
  "player": "Yordan Alvarez"
});

More examples

{
  "player": "660271",
  "season": 2024,
  "group": "hitting"
}

Connect

Add this to your MCP client config, or use one-click install buttons:

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

See Getting Started for client-specific install steps.

Regenerated from source · build September 15, 2026