FastballAPI

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.

已验证Streamable HTTP可网页运行网页搜索与抓取金融数据与分析

概览

AI 生成的概览

托管式棒球数据 MCP 服务器,让助手查询 MLB 与大学棒球统计、逐球数据、赔率和球员盘口,按积分计费。

可以做什么
  • 查询球队、球员、比赛、赛程、排名、伤病和球队评分
  • 读取比赛技术统计、赛季数据、球员逐场记录、排行榜和球队攻防数据
  • 获取逐球与逐打席数据、球种组合和击球落点图
  • 检索各博彩公司的胜负盘、让分盘、大小分、盘口变化和球员盘口及结果
适用场景
适合让助手基于真实数据回答棒球问题:球员与球队表现、逐球分析、历史赔率,或某球员对盘口的历史表现。面向数据分析、梦幻体育和赔率研究场景,而非通用网络查询。
运行要求
远程 Streamable HTTP 端点,无需安装。调用工具需要 FastballAPI API 密钥,通过 x-api-key 请求头(或密钥查询参数、bearer 令牌)传递。每月有 500 积分的免费额度,另有付费方案和充值。也可用 Node.js 本地运行,需设置 FASTBALLAPI_API_KEY。
安装前请注意
每次工具调用都会消耗积分,单次 1 至 10 积分,可能用尽免费额度或付费余额。API 密钥属于机密,不应外泄。赔率与盘口数据仅为市场信息,服务器自身说明禁止计算投注金额、赔付或收益,禁止推荐投注或引导用户前往博彩网站。数据来自第三方,与 MLB 和 NCAA 无关联。

安装

在 SourceWeft 中

  1. 打开 控制台中的 FastballAPI,将其添加到工作区。
  2. 连接 x-api-key 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.noahowsh%2Ffastballapi/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

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

来源:README.md,提交 212acf6

工具

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.

输入参数leagueseason

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.

输入参数todatefromteamlimitleagueoffsetseasonstatusseason_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.

输入参数daysteamleague

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.

输入参数leaguegame_id必填

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.

输入参数leagueseason

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.

输入参数dateteam

search_players

Search players

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

输入参数name必填limitleague

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.

输入参数leagueplayer_id必填

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.

输入参数limitleagueoffsetseasonplayer_id必填season_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.

输入参数stat必填limitleaguemin_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.

输入参数teamleagueseason

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.

输入参数rispteamlimitinningleagueoffsetresultseasongame_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.

输入参数limitoffsetseasongame_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.

输入参数seasonpitcher_id必填

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.

输入参数teamseasonbatter_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.

输入参数dateleaguegame_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.

输入参数leaguegame_id必填providerall_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.

输入参数leagueseason

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.

输入参数marketgame_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.

输入参数limitmarket必填to_datebookmakerfrom_dateplayer_id必填

版本历史

2
  1. v1.1.6最新Oct 16, 2026
  2. v1.1.4Oct 11, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分