balldontlie-mcp
The balldontlie-mcp server integrates the Balldontlie API to provide sports data for NBA, NFL, and MLB leagues. With this server, you can:
Retrieve lists of teams for a specified league
Fetch player lists with optional filters for name and pagination
Obtain game lists with filters for dates, teams, seasons, and pagination
Access specific game details using game ID and league
Generate interactive league schedules within Claude Desktop for a given date range
Enables access to MLB information through the Balldontlie API, allowing retrieval of team data, player profiles, and game statistics including specific games or games filtered by dates and teams.
Provides access to NBA information through the Balldontlie API, allowing retrieval of team data, player profiles, and game statistics including specific games or games filtered by dates and teams.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@balldontlie-mcpshow me today's NBA games"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Balldontlie MCP Server
An MCP Server implementation that integrates the Balldontlie API, to provide information about players, teams and games for the NBA, NFL and MLB.
Tools
get_teams
Gets the list of team from one of the following leagues NBA (National Basketball Association), MLB (Major League Baseball), NFL (National Football League)
Inputs:
league(enum ['NBA', 'NFL', 'MLB']): The sports league to get teams for
get_players
Gets the list of players from one of the following leagues NBA (National Basketball Association), MLB (Major League Baseball), NFL (National Football League)
Inputs:
league(enum ['NBA', 'NFL', 'MLB']): The sports league to get players forfirstName(string, optional): The first name of the player to search forlastName(string, optional): The last name of the player to search forcursor(number, optional): Cursor for pagination
get_games
Gets the list of games from one of the following leagues NBA (National Basketball Association), MLB (Major League Baseball), NFL (National Football League)
Inputs:
league(enum ['NBA', 'NFL', 'MLB']): The sports league to get games fordates(string[], optional): Get games for specific dates, format: YYYY-MM-DDteamIds(string[], optional): Get games for specific gamescursor(number, optional): Cursor for pagination
get_game
Get a specific game from one of the following leagues NBA (National Basketball Association), MLB (Major League Baseball), NFL (National Football League)
Inputs:
league(enum ['NBA', 'NFL', 'MLB']): The sports league to get the game forgameId(number): The id of the game from the get_games tool
Related MCP server: mlb-api-mcp
Prompts
schedule_generator
Given a league (NBA, MLB, NFL), a starting date and ending date generates an interactive schedule in Claude Desktop.

Sample queries
With this MCP Server installed you can ask Claude or other LLM questions like the following.
Show me today's baseball games.
Can you find football players with the last name Purdy?
How many NBA players have the last name Ming?Configuration
Getting an API Key
Sign up for account at Balldontlie.io
The free plan is enough for this MCP Server
Installing using Desktop Extension (DXT)
Download the
dxtfile from the ReleasesOpen it with Claude Desktop or Go to File -> Settings -> Extensions and drag the .DXT file to the window to install it
Installing via Smithery
To install balldontlie-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @mikechao/balldontlie-mcp --client claudeUsage with Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcp-servers": {
"balldontlie": {
"command": "npx",
"args": [
"-y",
"balldontlie-mcp"
],
"env": {
"BALLDONTLIE_API_KEY": "YOUR API KEY HERE"
}
}
}
}Usage with LibreChat
mcpServers:
balldontlie:
command: sh
args:
- -c
- BALLDONTLIE_API_KEY=your-api-key-here npx -y balldontlie-mcpLicense
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Disclaimer
This library is not officially associated with balldontlie.io. It is a third-party implementation of the balldontlie api with a MCP Server.
Hosted deployment
A hosted deployment is available on Fronteir AI.
Available Tools
4 toolsget_gameB
Get a specific game from one of the following leagues NBA (National Basketball Association), MLB (Major League Baseball), NFL (National Football League)
| Name | Required | Description | Default |
|---|---|---|---|
| league | Yes | ||
| gameId | Yes | Game ID to get the game for, the value should be Game ID from previous call of get_games tool |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description lacks details on behavior like read-only status, authentication, or potential side effects, leaving agents uninformed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, well-structured sentence with no redundant information, efficiently conveying the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is too sparse, omitting return values, usage constraints, and other context needed for proper invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Only one of two parameters (gameId) has a description in the schema; the description does not add meaningful info beyond enumerating leagues and referencing the game ID source.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves a specific game from NBA, MLB, or NFL leagues, distinguishing it from siblings like get_games (list) and other tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implicitly, the tool is for fetching a single game, but no explicit guidance on when not to use it or alternatives is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_gamesB
Gets the list of games from one of the following leagues NBA (National Basketball Association), MLB (Major League Baseball), NFL (National Football League)
| Name | Required | Description | Default |
|---|---|---|---|
| league | Yes | ||
| dates | No | Get games for a range of dates, format: YYYY-MM-DD, optional | |
| seasons | No | Get games for a specific season, format: YYYY, optional | |
| teamIds | No | Get games for specific team IDs, optional | |
| cursor | No | Cursor for pagination, the value should be next_cursor from previous call of get_games tool, optional |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description only states read operation but omits pagination behavior (despite cursor param), auth requirements, rate limits, or what happens with no results. No annotations to supplement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single efficient sentence with no fluff. Could be restructured to front-load list nature.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema and description does not mention return format. With 5 params, moderate complexity, description should hint at response structure or pagination.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 80% so parameters mostly documented. Description adds no extra meaning beyond listing leagues. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clear verb+resource: 'Gets the list of games' from specific leagues. Siblings get_game (singular), get_players, get_teams are distinct, so no confusion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs siblings (e.g., use get_game for a single game). Also no indication of when to use dates vs seasons or cursor.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_playersA
Gets the list of players from one of the following leagues NBA (National Basketball Association), MLB (Major League Baseball), NFL (National Football League)
| Name | Required | Description | Default |
|---|---|---|---|
| league | Yes | ||
| firstName | No | First name of the player to search for, optional | |
| lastName | No | Last name of the player to search for, optional | |
| cursor | No | Cursor for pagination, the value should be next_cursor from previous call of get_players tool, optional |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully inform about behavior. It only states a read operation without mentioning pagination (cursor parameter exists), rate limits, or other behavioral traits, leaving gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single clear sentence that efficiently communicates the tool's purpose without unnecessary verbosity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and lack of output schema, the description covers basic purpose but omits context about optional parameters and pagination cursor usage, leaving some completeness gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 75% (three of four parameters have descriptions), and the description adds no extra parameter information. Baseline of 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the verb 'Gets the list' and resource 'players', and explicitly lists the leagues (NBA, MLB, NFL), distinguishing it from siblings like get_game and get_teams.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving players by league but does not explicitly state when to use this tool over alternatives like get_game or get_teams, nor does it provide exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_teamsA
Gets the list of team from one of the following leagues NBA (National Basketball Association), MLB (Major League Baseball), NFL (National Football League)
| Name | Required | Description | Default |
|---|---|---|---|
| league | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It describes a straightforward read operation with no disclosure of authentication, rate limits, or result format. Minimal behavioral context beyond purpose.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence conveys all necessary information without redundancy. Front-loaded with action and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given simple structure (1 param, no output schema), description covers the core functionality. Could mention return structure (e.g., team names or IDs) but not essential for selection. Minor gap in completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has one param 'league' with enum but no description. Description adds meaning by listing the three league values and indicating they serve as selection criteria. Adds value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states verb 'gets' and resource 'teams', with specific leagues (NBA, MLB, NFL). Distinguishes from sibling tools (get_game, get_games, get_players) by focusing on team listing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Specifies the tool retrieves teams from listed leagues, but no guidance on when to use vs alternatives or when not to use. Implicitly clear but lacks explicit context for decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- Added
get_game - Added
get_games - Added
get_players - Added
get_teams
TDQS
Scored across 4 tools
Each tool targets a distinct resource: a single game, list of games, players, or teams. There is no overlap in functionality.
All tools follow a consistent verb_noun pattern with get_ prefix and snake_case. No deviations.
Four tools are well-scoped for a sports data server covering three leagues. Not too many or too few.
The server provides only read operations. Missing single-player and single-team retrieval, and no filtering or search capabilities are indicated in descriptions.
Maintenance
Related MCP Connectors
The official MCP Server for the Mux API
A simple MCP server built with FastMCP and python
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP Server that enables interaction with MLB scores and statistics via the SportsData.io MLB V3 Scores API, allowing users to access baseball data through natural language queries.-
- AlicenseBqualityBmaintenancePython MCP server that provides comprehensive access to MLB statistics and baseball data through a FastAPI-based interface. Acts as a bridge between AI applications and MLB data sources, enabling seamless integration of baseball statistics, game information, player data, and more.2458MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server for accessing college basketball statistics through the SportsData.io CBB v3 Stats API, enabling AI agents to retrieve and analyze college basketball data through natural language interactions.-
- AlicenseAqualityCmaintenanceMCP server for NBA live data and stats, providing read-only tools to query live scores, box scores, player info, standings, and more from NBA.com.1591MIT