
alex-rimerman/statcast-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
このリポジトリは公開されており、ユーザーは野球のStatcast MCPの開発をプルダウンすることができます.
概要
MCP (Model Context Protocol) サーバでクエリを行なう。 プレイヤー、ゲーム、ステータス、リーダーボードなどに関するAIアシスタントに問い合わせてください。コーディングは必要ありません。 pybaseball 上に構築されたこのサーバーは、AI アシスタントが、データから直接アクセスできるようにします。 接続したら、AIアシスタントを自然に話してください。 - "Aaron Judgeが2024年7月に当たる方法?" - "Gerrit Cole's Pitch arsenal this Season" - "Whoは2024年に最高の出口速度を持っていたのですか?" - "NLは2023の終わりに立っていたのですか?" - "私に最も評価されていないヒッタ - "XBAを実際のBAに比較する" - "Yankeesの全ラインナップと5つのスターターの予想統計とその5つのスターター" - "(Basstatsto'sは今、すべての野球選手に期待されている) - " AIは、あなたの質問を正しいデータクエリに自動的に翻訳します.
概要(AI 翻訳)
MCP (Model Context Protocol) サーバーで、MLB Statcast データを plain English でクエリできます。 プレイヤー、ゲーム、ステータス、リーダーボードなどに関するAIアシスタントに問い合わせてください。コーディングは必要ありません。
pybaseball上に構築されたこのサーバーは、Baseball Savant、FanGraphs、Baseball Referenceからデータを直接アクセスできるAIアシスタントを提供します。
答えることができるのは?
接続したら、AIアシスタントを自然に話してください。
- 「アロン・ジャッジが2024年7月に当たるのは?」
- 「今シーズンのガーリットコールのピッチアセンシャルを見る」
- 「2024年の最高出口速度を持っていたの?」
- 「2023年末にNLが立っていたの?」
- 「最も評価されているヒッタを探し、実際のBAにxBAを比較する」
- ※「ヤンキース全ラインナップと5つのスターターが期待する統計」*(コンマ区切りの名前で
expected_stats_batchを使用) - 「今野球で一番速い選手は誰ですか?」
- 「7月4日、ヤンキーズ・レッド・ソックスのゲームからのすべてのピッチを表示」
AIは、あなたの質問を正しいデータクエリに自動的に翻訳します。
例: プロンプトと応答
Statcast MCP を使用するときに典型的な取引所が見えるものは次のとおりです。
プロンプト
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
Statcast MCP Server
A MCP (Model Context Protocol) server that lets you query MLB Statcast data using plain English. Ask your AI assistant about players, games, stats, leaderboards, and more — no coding required.
Built on pybaseball, this server gives AI assistants direct access to data from Baseball Savant, FanGraphs, and Baseball Reference.
What Can You Ask?
Once connected, just talk to your AI assistant naturally:
- “How did Aaron Judge hit in July 2024?”
- “Show me Gerrit Cole’s pitch arsenal this season”
- “Who had the highest exit velocity in 2024?”
- “What were the NL standings at the end of 2023?”
- “Find me the most undervalued hitters — compare xBA to actual BA”
- “Expected stats for the whole Yankees lineup and their five starters” (use
expected_stats_batchwith comma-separated names) - “Who are the fastest players in baseball right now?”
- “Show me every pitch from the Yankees-Red Sox game on July 4, 2024”
The AI translates your questions into the right data queries automatically.
Example: Prompt & Response
Here’s what a typical exchange looks like when you use the Statcast MCP:
Prompt
“What were Gerrit Cole’s arsenal statistics in 2023?”
Response
| Pitch Type | Usage | Pitches | PA | BA | SLG | Whiff% | K% | Run Val/100 |
|---|---|---|---|---|---|---|---|---|
| 4-Seam Fastball | 52.9% | 1,737 | 427 | .202 | .333 | 23.0% | 28.3% | +1.7 |
| Slider | 20.8% | 683 | 175 | .186 | .251 | 32.7% | 29.1% | +1.4 |
| Curveball | 12.1% | 396 | 97 | .215 | .269 | 24.4% | 27.8% | +1.4 |
| Cutter | 7.0% | 231 | 65 | .262 | .377 | 31.1% | 23.1% | +1.6 |
| Changeup | 7.1% | 233 | 54 | .235 | .510 | 28.6% | 13.0% | −1.3 |
His 4-seam fastball was his primary weapon (52.9% usage) with a .202 BA against and +1.7 run value per 100 pitches. The changeup was his only negative pitch (−1.3 run value).
Another prompt
“Who had the highest exit velocity in 2024?”
Response
The AI calls statcast_batter_exitvelo_barrels(year=2024) and returns the leaderboard — Aaron Judge led with a 97.0 mph average exit velocity and 21.8% barrel rate, followed by [other top hitters]…
Available Tools
| Tool | What It Does |
|---|---|
player_lookup |
Find any player’s ID, years active, and database links (default 10 rows; up to 5000 if many fuzzy matches) |
statcast_search |
Pitch-by-pitch data for a date range (optionally filtered by team); default 100 pitch rows, up to 5000 |
statcast_batter |
Every pitch a specific batter saw in a date range (default 100 rows, up to 5000) |
statcast_batter_pitch_arsenal |
Batting stats by pitch type (BA, SLG, wOBA vs fastballs, sliders, etc.) |
インストール
npx @modelcontextprotocol/inspector statcast-mcp設定
{
"mcpServers": {
"statcast": {
"command": "statcast-mcp"
}
}
}