# MLB Stats MCP for AI Agents AI Agent Connect

> MLB Stats MCP lets your AI agent pull real-time baseball data, including live play-by-play, detailed player statistics, and league standings. It turns your agent into a sports researcher or a live scoreboard.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_ThbeAzpXRgat5qMHEYh2g0pM6CSk0Z62oX8NbeUF/ai-agent-connect
- **Tags:** baseball, mlb, sports-data, real-time-stats, player-analytics

## Description

The MLB Stats MCP puts the entire Major League Baseball database into your AI client. Instead of jumping between different websites to check a boxscore or digging through spreadsheets to find a pitcher's strikeout rate, you can just ask your agent to do the heavy lifting. It handles the messy work of fetching real-time play-by-play data, pulling deep-dive stats for specific players, and organizing league standings. If you're trying to build a fantasy baseball lineup or write a deep-dive article on sabermetrics, this Connector gives your agent the eyes it needs to see the numbers as they happen. It's built to handle everything from high-level league structures down to individual venue details. You can quickly pull up a list of all teams and their affiliates or check the current standings for a specific division to see who's leading the pack. It even lets you grab historical data so you can compare past seasons with current performance. When you connect this to Vinkius, it becomes a core part of your toolkit, letting you move from analyzing game trends to drafting reports without ever leaving your chat window. Whether you're a developer needing a reliable data source for a hobby project or a sports fan who just wants to know the score of the current game, this tool provides the raw data you need without the fluff.

## Tools

### list_divisions
Get a list of all MLB divisions. This helps you understand the league's geographical structure.

### list_game_status
See valid codes for game states like Final or In Progress. Use this to filter active games.

### list_leagues
Pull a list of all professional leagues. It's the starting point for broad league queries.

### get_live_game_feed
Get real-time play-by-play and boxscores for active games. This is your go-to for live updates.

### get_person
Fetch detailed profiles for specific players. You can even include extra data like current team info.

### list_positions
See all valid player position codes. Use this to filter player searches by role.

### get_schedule
Pull game schedules for specific dates or ranges. It makes planning your viewing much easier.

### list_sports
List all sports levels including MLB and MiLB. This helps categorize your sports data.

### get_standings
Get current or historical league standings. You can filter by season and division.

### list_stat_types
See the valid strings for the stats parameter. This ensures your queries return the right data.

### get_stats
Pull statistical data for specific players or teams. Use this for deep-dive performance analysis.

### list_teams
Get information on MLB teams and their affiliates. You can filter by season or sport.

### list_venues
Get information on ballparks and venues. This is great for location-based research.

## Prompt Examples

**Prompt:** 
```
Who are the current leaders in the American League East standings?
```

**Response:** 
```
Here are the current standings for the **American League East**:

| Team | Wins | Losses | Win % |
| :--- | :--- | :--- | :--- |
| Baltimore Orioles | 101 | 61 | .625 |
| Tampa Bay Rays | 99 | 63 | .611 |
| Toronto Blue Jays | 89 | 73 | .548 |

The Orioles are currently leading the division.
```

**Prompt:** 
```
Can you give me the hitting stats for Shohei Ohtani from the 2023 season?
```

**Response:** 
```
In the 2023 season, **Shohei Ohtani** put up the following stats:

*   **Batting Average:** .304
*   **Home Runs:** 44
*   **RBIs:** 95
*   **OPS:** 1.066

Would you like to see his pitching stats for that same year?
```

**Prompt:** 
```
List all the teams in the MLB for this season.
```

**Response:** 
```
I've pulled the current list of MLB teams for you. Here are a few examples:

*   Arizona Diamondbacks (ID: 109)
*   Atlanta Braves (ID: 144)
*   Baltimore Orioles (ID: 110)
*   Cincinnati Reds (ID: 145)

I can provide the full list of all 30 teams if you'd like!
```

## Capabilities

### Track live play-by-play
Get real-time updates and boxscores for active games.

### Pull deep player stats
Retrieve detailed hitting, pitching, and fielding data for any player.

### Check league standings
View current or historical rankings across different divisions.

### Access team info
Get data on MLB teams and their various affiliates.

### View game schedules
Look up upcoming games for specific dates or time ranges.

### Identify venues
Get information on different ballparks and stadiums.

## Use Cases

### Fantasy Baseball Roster Management
A user asks their agent to find the top three hitters from the American League East who have the highest home run counts. The agent uses get_stats and get_standings to provide a ranked list.

### Sports Journalism Research
A writer needs to compare the 2023 season stats of two specific pitchers. The agent pulls the data using get_person and get_stats to create a comparison table.

### Live Game Score Tracking
A fan wants to know what's happening in the current game. The agent uses get_live_game_feed to provide a real-time play-by-play update and current boxscore.

### Sports App Development
A developer needs to populate a database with all MLB teams. The agent uses list_teams to grab a full list of teams and their IDs for the current season.

## Benefits

- Stop hunting through multiple tabs with get_live_game_feed to keep up with live scores and play-by-play.
- Get deep-dive hitting and pitching data instantly with get_stats for any specific player or team.
- Build more accurate fantasy rosters by pulling historical and current rankings with get_standings.
- Quickly identify all team IDs and affiliations using list_teams to organize your sports projects.
- Plan your viewing schedule for the week using get_schedule to see exactly when and where games happen.
- Identify specific player roles and positions easily with list_positions to refine your data queries.

## How It Works

The bottom line is you get direct access to professional baseball data without leaving your chat interface.

1. Subscribe to the MLB Stats MCP via the Vinkius marketplace.
2. Enter your 'PUBLIC' identifier or your specific API key in the configuration.
3. Ask your AI client to pull live scores, player stats, or team schedules.

## Frequently Asked Questions

**Can I use the MLB Stats MCP to get live scores?**
Yes, you can. The Connector can pull real-time play-by-play data and live boxscores for active games, so you can stay updated on the action as it happens.

**Does MLB Stats MCP include historical player data?**
It does. You can pull detailed profiles and historical statistics for players, which is great for comparing past performances with current stats.

**Can I use this for fantasy baseball research?**
Absolutely. It's a great way to quickly check standings, team affiliations, and deep-dive hitting or pitching stats to help manage your roster.

**Is the MLB Stats MCP good for sports developers?**
Yes, it's a solid choice for developers who need a way to pull professional baseball data into their own apps or projects without building a custom scraper.

**Does MLB Stats MCP cover minor league baseball?**
The Connector can list various sports levels, including MiLB, allowing you to access data beyond just the major leagues.

**Can I see specific ballpark information with MLB Stats MCP?**
Yes, the Connector includes tools to list and provide information on various ballparks and venues across the league.

**How can I get the play-by-play data for a game currently in progress?**
Use the `get_live_game_feed` tool with the specific `gamePk` (game ID). This provides the most detailed real-time feed, including play-by-play and boxscores.

**Can I retrieve historical statistics for a specific season?**
Yes! The `get_stats` and `get_standings` tools both accept a `season` parameter (e.g., 2023) to filter data for that specific year.

**How do I find the schedule for a specific team?**
You can use `get_schedule` with a date range. While the schedule tool returns all games, you can ask your AI agent to filter the results for a specific team name or ID found via `list_teams`.