list_teams
List teams
Use to find team ids and abbreviations for a season (default: the latest). Every other tool takes a team as an id or abbreviation. Costs 1 credit.
leagueseason
io.github.noahowsh由 GitHub 帳號 noahowsh 發布v1.1.6更新於 Nov 6, 2026
MLB since 2015 plus college: pitches, plate appearances, box scores, odds by book. REST and MCP.
託管式棒球資料 MCP 伺服器,讓助理查詢 MLB 與大學棒球統計、逐球資料、賠率和球員盤口,以點數計費。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.noahowsh%2Ffastballapi/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"fastballapi": {
"type": "http",
"url": "https://mcp.fastballapi.com/mcp",
"headers": {
"x-api-key": "<YOUR_API_KEY>"
}
}
}
}The baseball data API. Pitch-by-pitch data with pitch type, velocity and location, every plate appearance with base-out state and the batted ball, box scores, standings, our own ratings and run values, sportsbook lines by book and MLB player prop lines. MLB since 2015 plus the NCAA Division I games we cover. REST API and MCP server. 500 free credits every month, no card.
Website: https://fastballapi.com · Docs: https://fastballapi.com/docs · Get a key: https://fastballapi.com/signup
Most clients connect to https://mcp.fastballapi.com/mcp directly. For a client that launches a local process instead:
It forwards to the hosted server with your key, so every tool and credit cost is the same.
This repo also ships 16 free Claude skills in skills/ that turn Claude into a baseball analyst: pitch mix and whiff rate, run value, spray charts, Pythagorean record, game previews, odds analysis, prop modeling (pitcher strikeouts, hits, total bases), edge detection and backtesting. Each skill names the FastballAPI tools it calls and what they cost.
Or install them as a Claude Code plugin:
Or with the skills CLI: npx skills add noahowsh/fastballapi-mcp.
Point Claude at the skills/ folder, connect the MCP server below, and ask. The dispatch skill routes a request to the right two or three skills. Full list: skills/README.md.
The official Python client is on PyPI: fastballapi.
Typed errors for a bad key, no credits left, not found and rate limits, automatic retries, and to_dataframe for pandas.
This is a hosted (remote) MCP server over Streamable HTTP. There is nothing to install.
Claude Code
Claude Desktop, Cursor and other clients
The key can also be sent as an x-api-key header or Authorization: Bearer. Connecting and listing tools works without a key; calling a tool needs one.
REST
Every tool is POST /v1/{tool} with a JSON body.
Runnable Python (standard library only) and Node 18+ (no dependencies) examples live in examples/:
examples/python/quickstart.py and examples/node/quickstart.mjs: schedule plus a headline call.examples/python/mlb_pitch_mix_and_props.py: A pitcher's arsenal (usage, velocity, whiff rate and ball rate per pitch type) followed by his strikeout prop lines against what he actually threw, game by game.See examples/README.md for details. Get a free key (500 credits a month, no card) at https://fastballapi.com/signup.
Leagues: mlb (default), ncaabase (NCAA Division I games we cover; pitch tools, spray charts and injuries are not offered for college).
get_player_props, get_prop_history); none for collegeCoverage by season, read live from the database: https://fastballapi.com/docs
500 free credits every month, no card. Plans: Starter $19/mo (10,000 credits), Pro $49/mo (30,000), Scale $149/mo (125,000). Wallet top-ups from $5, never expire. https://fastballapi.com/pricing
Ratings and run values are ours. Not affiliated with MLB, the NCAA or any team.
MIT for the contents of this repository. Data terms as above.
Add this repo as a Codex plugin marketplace, then install the plugin:
Then open the plugin directory in Codex and install fastballapi-skills from the fastballapi marketplace. The plugin bundles the skills in skills/ and the FastballAPI MCP server (https://mcp.fastballapi.com/mcp). Set your key first (free at https://fastballapi.com/signup):
Codex sends it as a bearer token.
The extension adds the FastballAPI MCP server (https://mcp.fastballapi.com/mcp) and sends the key in the x-api-key header. Get a free key (500 credits a month) at https://fastballapi.com/signup.
來源:README.md,提交 212acf6
List teams
Use to find team ids and abbreviations for a season (default: the latest). Every other tool takes a team as an id or abbreviation. Costs 1 credit.
leagueseasonGames
Use to list games with runs, hits and errors by season, date, date range or team, newest first. For upcoming games with lines use get_schedule; for one game's box score use get_game. Costs 2 credits.
todatefromteamlimitleagueoffsetseasonstatusseason_typeSchedule
Use for upcoming games (next 1-30 days, default 7) with the median line across posted sportsbooks: moneylines, run line and total. For every book's line use get_odds. Costs 2 credits. Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.
daysteamleagueGame
Use for one game in full: line score, every batter's and pitcher's line, each sportsbook's opening and closing line, and the win-probability range. For every plate appearance use get_plate_appearances. Costs 5 credits. Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.
leaguegame_id必填Standings
Use for a season's regular-season standings computed from every final game: record, home and away, last 10, runs scored and allowed, run differential and Pythagorean win percentage. Costs 2 credits.
leagueseasonInjuries
Use for the injury report: every listed player's status, injury and expected return, as captured on the latest day (or the latest on or before date). Costs 2 credits.
dateteamSearch players
Use to find a player's id by name (partial names work). Costs 1 credit.
name必填limitleaguePlayer
Use for a player's season-by-season batting (AVG, OBP, SLG, OPS, HR, K%, BB%, RE24, from every plate appearance) and pitching (ERA, WHIP, K/9, BB/9). Costs 5 credits.
leagueplayer_id必填Player games
Use for a player's game log: every game's batting line and pitching line, newest first, optionally one season. Costs 5 credits.
limitleagueoffsetseasonplayer_id必填season_typeLeaders
Use for a season's leaders among qualified players: batting avg, obp, slg, ops, hr, re24, bb_pct, k_pct (3.1 plate appearances per team game) or pitching era, whip, so, k_per_9, bb_per_9 (1 inning per team game). Costs 5 credits.
stat必填limitleaguemin_ipmin_paseasonTeam stats
Use for team offence and run prevention for a season: runs per game for and against, run differential, and batting and opponents' batting (AVG, OBP, SLG, OPS, K%, BB%, HR) from every plate appearance. Costs 5 credits.
teamleagueseasonPlate appearances
Use for plate-appearance play-by-play: a whole game in order, or a batter's, pitcher's or team's season, with the base-out state before, the result, the batted ball (trajectory and location), runs, the win probability after (2019 on) and our run value (RE24). Filter by result, inning or runners in scoring position. Costs 10 credits.
rispteamlimitinningleagueoffsetresultseasongame_idbatter_idpitcher_idseason_typePitches
Use for pitch-by-pitch data: every pitch of a game, or a pitcher's or batter's season, with the count, pitch type, velocity, location and result. Costs 10 credits.
limitoffsetseasongame_idbatter_idpitch_typepitcher_idPitch mix
Use for a pitcher's arsenal in a season: each pitch type's usage, average and top velocity, whiff rate per swing and ball rate. Costs 5 credits.
seasonpitcher_id必填Spray chart
Use for where a batter or team hits the ball: balls in play by trajectory (ground ball, line drive, fly ball, pop-up) and by field (left, center, right), with hit rates; include_balls adds each ball's location for drawing. Counts the regular season and postseason together unless season_type says otherwise (get_player's batting line is the regular season alone). Costs 10 credits.
teamseasonbatter_idseason_typeinclude_ballsOdds
Use for betting lines: each sportsbook's moneyline, run line and total for a game (opening and closing per book from July 2020; before that, each book's final pregame line only), with implied probabilities and, for finished games, whether the favourite won and the total went over against the median close. Pass game_id for one game (5 credits) or date for a day's games (10 credits). Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.
dateleaguegame_idLine movement
Use to see how a game's line moved before first pitch: our pre-game snapshots of each sportsbook's moneyline, run line and total (captured once a day, and every hour for games in the next four days). Costs 10 credits. Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.
leaguegame_id必填providerall_snapshotsRatings
Use for our team power ratings (Elo from every final game in our data), ranked, as of the end of a season or today. Costs 2 credits.
leagueseasonPlayer props
Use for player prop lines by sportsbook: over/under on hits, home runs, total bases, RBI, pitcher strikeouts and pitcher outs, from May 2023 (DraftKings, FanDuel, BetMGM, ESPN BET, Pinnacle and others). Pass game_id for every player's props in one game (10 credits), or player_id with from_date (and to_date) for one player across games (10 credits per game returned, up to 100). Returns the closing line by default (the last before the game starts) or the opening line, with each book's over and under prices. Outside football the archive mostly holds one pre-game capture per line, so the opening and closing lines are usually the same; the opening line differs only where a second capture was taken (live capture from October 2026, and wherever else it is held). Set estimate_only to get the price without being charged. Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.
marketgame_idto_datebookmakerfrom_dateplayer_idestimate_onlysnapshot_typeProp history
Use to see how a player did against his prop line over time: for one market (hits, home runs, total bases, RBI, pitcher strikeouts or pitcher outs), one row per game with the closing line (the median across books, or one book's), the opening line (the same as the close wherever only one capture was taken), the prices, what the player actually recorded from our box scores and the result against the line, plus the over rate. Costs 10 credits for up to 200 games. Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.
limitmarket必填to_datebookmakerfrom_dateplayer_id必填已滿足適用檢查項的 100%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
You: "What is Gerrit Cole's whiff rate by pitch type this season?"Claude: [calls get_pitch_mix]
You: "How often did Aaron Judge homer on a 3-2 count in 2025?"Claude: [calls get_plate_appearances]
You: "How often has Shohei Ohtani gone over his total bases line since 2023?"Claude: [calls get_prop_history]git clone https://github.com/noahowsh/fastballapi-mcp.git && cd fastballapi-mcp && npm installFASTBALLAPI_API_KEY=your_key node index.js{ "mcpServers": { "fastballapi": { "command": "node", "args": ["/path/to/fastballapi-mcp/index.js"], "env": { "FASTBALLAPI_API_KEY": "your_key" } } } }git clone https://github.com/noahowsh/fastballapi-mcp.git/plugin marketplace add noahowsh/fastballapi-mcp/plugin install fastballapi-skills@fastballapipip install fastballapiexport FASTBALLAPI_API_KEY=sk_live_...from fastballapi import Client, to_dataframe
client = Client()
props = client.get_player_props( game_id="401815991", market="batter_home_runs",)df = to_dataframe(props, key="props")print(df[["player_name", "bookmaker", "line", "over_odds", "under_odds"]].head(10))claude mcp add --transport http fastballapi "https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY"{ "mcpServers": { "fastballapi": { "url": "https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY" } }}curl -X POST https://mcp.fastballapi.com/v1/list_teams -H "x-api-key: YOUR_API_KEY"export FASTBALLAPI_API_KEY=your_keypython3 examples/python/quickstart.pynode examples/node/quickstart.mjscodex plugin marketplace add noahowsh/fastballapi-mcpexport FASTBALLAPI_API_KEY=your_keyexport FASTBALLAPI_API_KEY=your_keygemini extensions install https://github.com/noahowsh/fastballapi-mcp