FastballAPI

io.github.noahowshPublished by GitHub account noahowshv1.1.6Updated Nov 6, 2026

MLB since 2015 plus college: pitches, plate appearances, box scores, odds by book. REST and MCP.

VerifiedStreamable HTTPWeb executableWeb Search & ScrapingFinanceData & Analytics

Overview

AI-generated overview

Hosted baseball data MCP server giving an assistant MLB and college stats, pitch-level data, odds and player prop lines, billed in credits.

What you can do
  • Look up teams, players, games, schedules, standings, injuries and team ratings
  • Read box scores, season stats, game logs, leaders and team offence/run prevention
  • Pull pitch-by-pitch and plate-appearance data, pitch mix and spray charts
  • Retrieve sportsbook moneylines, run lines, totals, line movement and player prop lines with results
When to use it
Useful when you want an assistant to answer baseball questions from real data: player and team performance, pitch-level analysis, historical odds, or how a player has done against his prop line. It suits analysts, fantasy and betting-research workflows rather than general web lookups.
Requirements
A remote Streamable HTTP endpoint; nothing to install. A FastballAPI API key is required to call tools, sent as the x-api-key header (or a key query parameter or bearer token). A free tier of 500 credits per month exists; paid plans and top-ups are available. A local stdio option runs via Node.js with FASTBALLAPI_API_KEY.
Before you install
Every tool call spends credits, from 1 to 10 per call, so usage can exhaust the free allowance or a paid balance. The API key is a secret and should not be shared. Odds and prop data are market information only; the server's own instructions forbid computing stakes, payouts or profit, recommending bets, or sending users to sportsbooks. Data is third-party and not affiliated with MLB or the NCAA.

Installation

In SourceWeft

  1. Open FastballAPI in the dashboard and add it to a workspace.
  2. Connect x-api-key credentials. They are stored privately and never shown on public pages.
  3. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.noahowsh%2Ffastballapi/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "fastballapi": {
      "type": "http",
      "url": "https://mcp.fastballapi.com/mcp",
      "headers": {
        "x-api-key": "<YOUR_API_KEY>"
      }
    }
  }
}

README

FastballAPI MCP server

[Smithery] [MCP Registry]

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

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]

Run it locally (stdio)

Most clients connect to https://mcp.fastballapi.com/mcp directly. For a client that launches a local process instead:

bash
git clone https://github.com/noahowsh/fastballapi-mcp.git && cd fastballapi-mcp && npm installFASTBALLAPI_API_KEY=your_key node index.js
json
{ "mcpServers": { "fastballapi": { "command": "node", "args": ["/path/to/fastballapi-mcp/index.js"], "env": { "FASTBALLAPI_API_KEY": "your_key" } } } }

It forwards to the hosted server with your key, so every tool and credit cost is the same.

Skills

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.

bash
git clone https://github.com/noahowsh/fastballapi-mcp.git

Or install them as a Claude Code plugin:

/plugin marketplace add noahowsh/fastballapi-mcp/plugin install fastballapi-skills@fastballapi

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.

Python

The official Python client is on PyPI: fastballapi.

bash
pip install fastballapiexport FASTBALLAPI_API_KEY=sk_live_...
python
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))

Typed errors for a bad key, no credits left, not found and rate limits, automatic retries, and to_dataframe for pandas.

Quick start

This is a hosted (remote) MCP server over Streamable HTTP. There is nothing to install.

Claude Code

bash
claude mcp add --transport http fastballapi "https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY"

Claude Desktop, Cursor and other clients

json
{  "mcpServers": {    "fastballapi": {      "url": "https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY"    }  }}

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

bash
curl -X POST https://mcp.fastballapi.com/v1/list_teams -H "x-api-key: YOUR_API_KEY"

Every tool is POST /v1/{tool} with a JSON body.

Examples

Runnable Python (standard library only) and Node 18+ (no dependencies) examples live in examples/:

bash
export FASTBALLAPI_API_KEY=your_keypython3 examples/python/quickstart.pynode examples/node/quickstart.mjs

See examples/README.md for details. Get a free key (500 credits a month, no card) at https://fastballapi.com/signup.

Tools (20)

ToolWhat it returns
list_teamsTeam ids, abbreviations and colours for a season
search_playersFind players by name
get_gamesGames with runs, hits and errors by season, date, range or team
get_scheduleUpcoming games with the median line across sportsbooks
get_standingsStandings from every final game, with run differential and Pythagorean record
get_injuriesThe latest injury report
get_ratingsOur team Elo ratings, ranked
get_gameOne game: every batting and pitching line, each book's line, win probability
get_playerSeason batting (AVG, OBP, SLG, OPS, RE24) and pitching (ERA, WHIP, K/9)
get_player_gamesA player's full batting and pitching game log
get_leadersSeason leaders among qualified batters and pitchers
get_team_statsRuns for and against, team batting and opponents' batting
get_pitch_mixA pitcher's arsenal: usage, velocity, whiff rate per pitch type
get_oddsEvery sportsbook's moneyline, run line and total for a game (5) or a day (10)
get_plate_appearancesPlate-appearance play-by-play with base-out state, batted ball, win probability, RE24
get_pitchesPitch-by-pitch: count, type, velocity, location, result
get_spray_chartWhere a batter or team hits the ball, by trajectory and field
get_line_movementSnapshots of each sportsbook's line before first pitch
get_player_propsPlayer prop lines by sportsbook, opening and closing
get_prop_historyA player's prop lines against the result, game by game

Leagues: mlb (default), ncaabase (NCAA Division I games we cover; pitch tools, spray charts and injuries are not offered for college).

Data

  • MLB games since 2015 with pitch-by-pitch data (every pitch from 2018; 2015 to 2017 have about 98 to 99% of each season's pitches)
  • Every plate appearance with base-out state, batted ball, win probability and RE24
  • Per-sportsbook moneylines, run lines and totals: 4 to 13 books per game from 2015 to 2023 (about 4 in 2015, 10 in 2016 and 2017, 7 to 8 in 2018 to 2020, 12 in 2021 to 2023), usually one book since 2024, plus opening and closing lines since July 2020 (a median of 7 books in 2021 to 2023 and 8 since 2024); pre-game line snapshots from launch: once a day, and every hour for games in the next two days
  • MLB player prop lines by sportsbook (hits, home runs, total bases, RBI, pitcher strikeouts, pitcher outs) from May 2023, with the result against each line (get_player_props, get_prop_history); none for college
  • NCAA Division I college baseball for the games we cover (not every Division I game)

Coverage by season, read live from the database: https://fastballapi.com/docs

Useful pages

Pricing

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

Attribution

Ratings and run values are ours. Not affiliated with MLB, the NCAA or any team.

License

MIT for the contents of this repository. Data terms as above.

Use with Codex

Add this repo as a Codex plugin marketplace, then install the plugin:

bash
codex plugin marketplace add noahowsh/fastballapi-mcp

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):

bash
export FASTBALLAPI_API_KEY=your_key

Codex sends it as a bearer token.

Use with Gemini CLI

bash
export FASTBALLAPI_API_KEY=your_keygemini extensions install https://github.com/noahowsh/fastballapi-mcp

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.

Source: README.md at commit 212acf6

Tools

20

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.

Parametersleagueseason

get_games

Games

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.

Parameterstodatefromteamlimitleagueoffsetseasonstatusseason_type

get_schedule

Schedule

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.

Parametersdaysteamleague

get_game

Game

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.

Parametersleaguegame_idrequired

get_standings

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.

Parametersleagueseason

get_injuries

Injuries

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.

Parametersdateteam

search_players

Search players

Use to find a player's id by name (partial names work). Costs 1 credit.

Parametersnamerequiredlimitleague

get_player

Player

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.

Parametersleagueplayer_idrequired

get_player_games

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.

Parameterslimitleagueoffsetseasonplayer_idrequiredseason_type

get_leaders

Leaders

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.

Parametersstatrequiredlimitleaguemin_ipmin_paseason

get_team_stats

Team 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.

Parametersteamleagueseason

get_plate_appearances

Plate 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.

Parametersrispteamlimitinningleagueoffsetresultseasongame_idbatter_idpitcher_idseason_type

get_pitches

Pitches

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.

Parameterslimitoffsetseasongame_idbatter_idpitch_typepitcher_id

get_pitch_mix

Pitch 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.

Parametersseasonpitcher_idrequired

get_spray_chart

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.

Parametersteamseasonbatter_idseason_typeinclude_balls

get_odds

Odds

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.

Parametersdateleaguegame_id

get_line_movement

Line 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.

Parametersleaguegame_idrequiredproviderall_snapshots

get_ratings

Ratings

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.

Parametersleagueseason

get_player_props

Player 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.

Parametersmarketgame_idto_datebookmakerfrom_dateplayer_idestimate_onlysnapshot_type

get_prop_history

Prop 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.

Parameterslimitmarketrequiredto_datebookmakerfrom_dateplayer_idrequired

Version history

2
  1. v1.1.6LatestOct 16, 2026
  2. v1.1.4Oct 11, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts