MCP server exposing 5 tools for historical-baseball.
This URL is a JSON-RPC 2.0 endpoint over HTTP. Issue POST requests with a JSON-RPC body. Browsers and search crawlers land here on GET.
POST https://gateway.pipeworx.io/historical-baseball/mcp
Content-Type: application/json
{"jsonrpc":"2.0","id":1,"method":"tools/list"}
baseball_player_history — Year-by-year MLB batting and/or pitching statistics for one player's whole career, from the SABR Lahman Baseball Database (1871-2025). Pass a player NAME ("Babe Ruth", "Walter Johnson") or an exact Lahman player_id (e.g. "ruthba01") -- a name is resolved by exact then fuzzy match; if more than one player matches, a list of candidates (with player_id, birth year, debut) is returned instead of a guess, so the caller can re-ask with the exact player_id. Returns every season the player appears in Batting.csv and/or Pitching.csv (most players have only one; a few, like Babe Ruth, have both). Each season row has team, league, games and the standard counting stats. Unknown or ambiguous names are refused with a clear error/candidate-list, never an empty success.baseball_team_season — One MLB team's full-season record and stats for one year, from the SABR Lahman Baseball Database (1871-2025): wins/losses, division/league/World Series result, runs scored and allowed, team batting and pitching totals, home park and attendance. Pass team as a 3-letter-ish code ("NYA", "BOS") or a common name ("Yankees", "Red Sox", "Dodgers") -- codes changed for some relocated/renamed franchises over the years (e.g. the Athletics' code changed for 2025), so an unrecognized code for that year is refused with a clear error rather than an empty success; try the franchise's name instead, or call with a nearby year to see what code that franchise used.baseball_game_log — Box-score-level summary of MLB game(s) played by one team on one date, from Retrosheet game logs (1871-2025): final score, game length, day/night, park, attendance, winning/losing/saving pitcher, managers, and each side's at-bats/hits/doubles/triples/homers/RBI/walks/strikeouts/errors. Covers regular season plus All-Star, Division Series, League Championship Series, Wild Card and World Series games (see game_type in the response: R/A/D/L/C/W). Pass date as "YYYY-MM-DD" or "YYYYMMDD" and team as a code ("NYA") or common name ("Yankees"). Returns an array because doubleheaders are two games on one date. This is a per-game SUMMARY, not a play-by-play log -- no pitch or at-bat level detail is stored. No games found for a valid date/team combination is reported as found:false with the reason, never an empty array treated as success.baseball_season_leaders — Top players in one MLB season for one statistic, from the SABR Lahman Baseball Database. Batting stats: HR, AVG, RBI, R, H, SB, BB, SO, 2B, 3B (AVG = hits/at-bats, qualified at a simple AB>=100 floor -- NOT MLB's official plate-appearance qualifying rule, so this can include players who would not qualify for an official batting title). Pitching stats: W, ERA, SO_P, SV, L, WHIP (SO_P = pitcher strikeouts, to avoid colliding with batting SO; ERA and WHIP are qualified at a simple IPouts>=100 i.e. ~33 innings floor, also not the official rule). Pass stat exactly as listed (case-sensitive). Optionally scope to one league ("AL" or "NL"; pre-1901 leagues like "NA", "AA", "UA", "PL" also appear in the data). limit caps how many rows come back (default 10, max 50). An unrecognized stat name is refused with the list of valid ones, never an empty success.baseball_coverage — What this pack actually has loaded right now: the Retrosheet game-log date range, how many games, the latest Lahman season year, and when it was last loaded. Call this if a query for a date or year you expect to exist comes back not-found, to rule out a coverage gap before assuming a typo.Code samples (curl / TypeScript / one-click client install), schemas, and the live playground are on the pack page:
https://pipeworx.io/packs/historical-baseball/
Pipeworx is an open MCP gateway connecting AI agents to live data. pipeworx.io