- Home
- MCP servers
- balldontlie
balldontlie
- javascript
23
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mikechao-balldontlie-mcp": {
"command": "npx",
"args": [
"-y",
"balldontlie-mcp"
],
"env": {
"BALLDONTLIE_API_KEY": "YOUR API KEY HERE"
}
}
}
}You can query Balldontlie data through this MCP Server to retrieve information about players, teams, and games across NBA, NFL, and MLB. It exposes a simple set of tools you can call from your MCP client to get structured results quickly and reliably.
How to use
Once you have the Balldontlie MCP Server running, you can ask your MCP client for the following capabilities: get teams for a specific league, search for players (optionally by first and/or last name with pagination), fetch games by date or team, and retrieve a single game by its ID. Use these tools to build queries like “show me NBA teams” or “list all NFL players named Purdy” and then drill into game details as needed.
How to install
Prerequisites: you need Node.js and npm installed on your system. You also need an API key for Balldontlie if your environment requires authenticated access. The free Balldontlie plan is sufficient for this MCP Server.
# Install via Claude Desktop extension or using the provided MCP CLI example
# Example command to install the MCP via Smithery (explicit in the source flow)
npx -y @smithery/cli install @mikechao/balldontlie-mcp --client claude
Additional configuration and usage notes
Environment variables shown in the configuration include the API key required to access Balldontlie. Ensure you set BALLDONTLIE_API_KEY in your environment when starting the MCP server.
{
"mcp-servers": {
"balldontlie": {
"command": "npx",
"args": [
"-y",
"balldontlie-mcp"
],
"env": {
"BALLDONTLIE_API_KEY": "YOUR API KEY HERE"
}
}
}
}
Configuring with Claude Desktop
Add this to your Claude Desktop configuration to run the MCP server in stdio mode with the API key available as an environment variable.
{
"mcp-servers": {
"balldontlie": {
"command": "npx",
"args": ["-y", "balldontlie-mcp"],
"env": {
"BALLDONTLIE_API_KEY": "YOUR API KEY HERE"
}
}
}
}
Usage with LibreChat
If you prefer LibreChat, start the MCP server similarly and provide the API key via the environment. The configuration snippet below shows how to pass the key when launching.
mcpServers:
balldontlie:
command: sh
args:
- -c
- BALLDONTLIE_API_KEY=your-api-key-here npx -y balldontlie-mcp
Available tools
get_teams
Fetches a list of teams for a specified league (NBA, MLB, NFL).
get_players
Fetches a list of players for a specified league. Can filter by firstName and/or lastName and supports cursor-based pagination.
get_games
Fetches a list of games for a specified league. Optional filters include dates and teamIds, with pagination support.
get_game
Fetches a single game by its gameId within the specified league.
schedule_generator
Generates an interactive schedule for a given league over a date range when used with Claude Desktop