mcpField
F
FastballAPI

FastballAPI

Remote
github.com/noahowshGames & Entertainment0Updated 1w ago
Repository

About FastballAPI

FastballAPI is a REST and hosted MCP server for MLB and covered NCAA Division I baseball data. It serves analysts and baseball applications with pitch-level records, plate appearances, sportsbook odds, and player props.

Key features

  1. 01Pitch-by-pitch data and pitch mix
  2. 02Plate appearances and batted balls
  3. 03Box scores, standings, and ratings
  4. 04Sportsbook odds and line movement
  5. 05MLB player props and history

Use cases

  1. 01Measure pitch usage and whiff rates
  2. 02Analyze plate appearances by situation
  3. 03Compare sportsbook lines
  4. 04Review player prop results over time

MCP support

A hosted MCP server over Streamable HTTP exposes baseball data tools to MCP clients. A local stdio process can also forward requests to the hosted server.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://mcp.fastballapi.com/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

All endpoints
Streamable HTTPhttps://mcp.fastballapi.com/mcpAuth required

Tools

20
ParameterTypeRequiredDescription
leagueenumNoLeague. Defaults to mlb. One of: mlb, ncaabase.mlb | ncaabase
seasonnumber|stringNoSeason (a year, e.g. 2025; default: the latest).

Details

From the project 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:

git clone https://github.com/noahowsh/fastballapi-mcp.git && cd fastballapi-mcp && npm install
FASTBALLAPI_API_KEY=your_key node index.js
{ "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.

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.

pip install fastballapi
export 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))

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

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

Claude Desktop, Cursor and other clients

{
  "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

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

export FASTBALLAPI_API_KEY=your_key
python3 examples/python/quickstart.py
node 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:

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

export FASTBALLAPI_API_KEY=your_key

Codex sends it as a bearer token.

Use with Gemini CLI

export FASTBALLAPI_API_KEY=your_key
gemini 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.