MLB SportRadar
About
Access MLB game data, standings, and player statistics using the SportRadar API.
Details
- Author
- robcerda
- Categories
- Database, Other, API
Jump to
4. Create and activate a virtual environment
# Create virtual environment uv venv # Activate virtual environment # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Option 1: Using uv (recommended) uv sync # Option 2: Using pip with requirements.txt pip install -r requirements.txt # Option 3: Install as editable package uv pip install -e .
Create a.envfile in the project root with your SportRadar API key:
Then add this server to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS):
{ "mcpServers": { "MLB SportRadar": { "command": "/Users/<USERNAME>/.local/share/uv/tools/mcp/bin/mcp", "args": ](https://developer.sportradar.com/)["run", "/full/path/to/mlb-sportradar-mcp/src/mlb_sportradar_mcp/server.py"] } } }
Important: Replace/full/path/to/with the actual absolute path to yourmlb-sportradar-mcpdirectory.
Restart Claude Desktop after saving the configuration.
Once configured, Claude Desktop will have access to these MLB SportRadar tools:
- get_daily_schedule: Get MLB schedule for a specific date or today
- get_game_summary: Get summary information for a specific game
- get_game_boxscore: Get detailed boxscore for a specific game
- get_game_play_by_play: Get detailed play-by-play data for a game
- get_game_pitch_metrics: Get pitch-level metrics and Statcast data
- get_standings: Get MLB standings for a specific year and league
- get_team_profile: Get detailed team information
- get_team_roster: Get current roster for a specific team
- get_team_hierarchy: Get complete MLB team hierarchy with divisions
- get_seasonal_statistics: Get seasonal statistics for a team
- get_player_profile: Get detailed player information
- get_player_seasonal_stats: Get seasonal statistics for a player
- get_seasonal_splits: Get player splits (home/away, vs lefty/righty, etc.)
- get_league_leaders: Get MLB league leaders in various categories
- get_injuries: Get current MLB injury report
- get_transactions: Get MLB transactions for a specific date
- get_draft_summary: Get MLB draft summary for a specific year
- "Show me today's MLB schedule"
- "Get the current AL standings"
- "What are the current batting leaders in MLB?"
- "Show me the injury report for MLB"
- "Get play-by-play data for game [game_id]"
- "Show me pitch metrics for the latest game"
- "Get player splits for [player_name]"
- "What transactions happened today in MLB?"
Install development dependencies and run the test suite with:
To start the server manually (useful when developing or testing), run:
Alternatively, you can run it directly with:
uv run python src/mlb_sportradar_mcp/server.py
If you want to usemcp runcommands, install the MCP CLI globally:
mcp run src/mlb_sportradar_mcp/server.py
This MCP server uses the SportRadar MLB API v8 endpoints:
- Schedule:/en/games/{year}/{month}/{day}/schedule.json
- Game Summary:/en/games/{game_id}/summary.json
- Game Boxscore:/en/games/{game_id}/boxscore.json
- Standings:/en/seasons/{year}/standings.json
- Player Profile:/en/players/{player_id}/profile.json
- Team Profile:/en/teams/{team_id}/profile.json
- League Leaders:/en/seasons/{year}/leaders.json
- Team Roster:/en/teams/{team_id}/roster.json
- Injuries:/en/injuries.json
Please be aware of SportRadar's API rate limits. The trial API typically has lower limits than production keys. Monitor your usage to avoid hitting rate limits.
Access college football statistics from the College Football Data API.
Access Formula 1 data, including race results, driver standings, and circuit information.
Access extensive Formula 1 statistics and information using the FastF1 library and OpenF1 API.
Provides football (soccer) data using the API-Football service.
The hockey data API. Stats, odds, and everything between.
41 sports API providers, 396 tools: scores, stats, odds, esports, chess, motorsport & more.
Provides club information and advanced player statistics for Euroleague and Eurocup basketball from the Euroleague API.
An MCP server for the NHL API, providing access to all documented endpoints.
Provides real-time football match information from the SoccerDataAPI using natural language.
Provides football (soccer) statistics and live match data using the API-Football service.
Model Context Protocol (MCP) server for connecting Claude with the SportRadar MLB API. It provides tools for accessing MLB game data, standings, player statistics, and more through the SportRadar API.
- Python 3.12 or higher
- Model Context Protocol (MCP) Python SDK
- httpx
- python-dotenv
- SportRadar API key
- Sign up atSportRadar Developer Portal
- Get your MLB API key (trial or production)
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/yourusername/mlb-sportradar-mcp.git cd mlb-sportradar-mcp
4. Create and activate a virtual environment
# Create virtual environment uv venv # Activate virtual environment # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Option 1: Using uv (recommended) uv sync # Option 2: Using pip with requirements.txt pip install -r requirements.txt # Option 3: Install as editable package uv pip install -e .
Create a.envfile in the project root with your SportRadar API key:
Then add this server to your Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS):
{ "mcpServers": { "MLB SportRadar": { "command": "/Users/<USERNAME>/.local/share/uv/tools/mcp/bin/mcp", "args": ["run", "/full/path/to/mlb-sportradar-mcp/src/mlb_sportradar_mcp/server.py"] } } }
Important: Replace/full/path/to/with the actual absolute path to yourmlb-sportradar-mcpdirectory.
Restart Claude Desktop after saving the configuration.
Once configured, Claude Desktop will have access to these MLB SportRadar tools:
- get_daily_schedule: Get MLB schedule for a specific date or today
- get_game_summary: Get summary information for a specific game
- get_game_boxscore: Get detailed boxscore for a specific game
- get_game_play_by_play: Get detailed play-by-play data for a game
- get_game_pitch_metrics: Get pitch-level metrics and Statcast data
- get_standings: Get MLB standings for a specific year and league
- get_team_profile: Get detailed team information
- get_team_roster: Get current roster for a specific team
- get_team_hierarchy: Get complete MLB team hierarchy with divisions
- get_seasonal_statistics: Get seasonal statistics for a team
- get_player_profile: Get detailed player information
- get_player_seasonal_stats: Get seasonal statistics for a player
- get_seasonal_splits: Get player splits (home/away, vs lefty/righty, etc.)
- get_league_leaders: Get MLB league leaders in various categories
- get_injuries: Get current MLB injury report
- get_transactions: Get MLB transactions for a specific date
- get_draft_summary: Get MLB draft summary for a specific year
- "Show me today's MLB schedule"
- "Get the current AL standings"
- "What are the current batting leaders in MLB?"
- "Show me the injury report for MLB"
- "Get play-by-play data for game [game_id]"
- "Show me pitch metrics for the latest game"
- "Get player splits for [player_name]"
- "What transactions happened today in MLB?"
Install development dependencies and run the test suite with:
To start the server manually (useful when developing or testing), run:
Alternatively, you can run it directly with:
uv run python src/mlb_sportradar_mcp/server.py
If you want to usemcp runcommands, install the MCP CLI globally:
mcp run src/mlb_sportradar_mcp/server.py
This MCP server uses the SportRadar MLB API v8 endpoints:
- Schedule:/en/games/{year}/{month}/{day}/schedule.json
- Game Summary:/en/games/{game_id}/summary.json
- Game Boxscore:/en/games/{game_id}/boxscore.json
- Standings:/en/seasons/{year}/standings.json
- Player Profile:/en/players/{player_id}/profile.json
- Team Profile:/en/teams/{team_id}/profile.json
- League Leaders:/en/seasons/{year}/leaders.json
- Team Roster:/en/teams/{team_id}/roster.json
- Injuries:/en/injuries.json
Please be aware of SportRadar's API rate limits. The trial API typically has lower limits than production keys. Monitor your usage to avoid hitting rate limits.
Access college football statistics from the College Football Data API.
Access Formula 1 data, including race results, driver standings, and circuit information.
Access extensive Formula 1 statistics and information using the FastF1 library and OpenF1 API.
Provides football (soccer) data using the API-Football service.
The hockey data API. Stats, odds, and everything between.
41 sports API providers, 396 tools: scores, stats, odds, esports, chess, motorsport & more.
Provides club information and advanced player statistics for Euroleague and Eurocup basketball from the Euroleague API.
An MCP server for the NHL API, providing access to all documented endpoints.
Provides real-time football match information from the SoccerDataAPI using natural language.
Provides football (soccer) statistics and live match data using the API-Football service.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





