balldontlie
An MCP Server implementation that integrates the Balldontlie API, to provide information about players, teams and games for the NBA, NFL and MLB
claude mcp add --transport stdio mikechao-balldontlie-mcp npx -y balldontlie-mcp \ --env BALLDONTLIE_API_KEY="YOUR API KEY HERE"
How to use
This MCP server integrates the Balldontlie API to provide data about players, teams, and games across NBA, NFL, and MLB. It exposes a set of tools you can query through your preferred LLMs or automation workflows to retrieve teams, players, games, and specific game details. The available tools are get_teams, get_players, get_games, and get_game. For example, you can fetch all NBA teams, search for players by name, or obtain game schedules for a given date range. The server can be invoked via npx balldontlie-mcp (often with an API key provided as an environment variable) and returns structured results you can feed into your prompts or applications. You can also use prompts like schedule_generator to generate interactive schedules for Claude Desktop. Overall, it enables building conversational or analytic flows that reference current data from the Balldontlie API within your Claude or other LLM-based assistants.
How to install
Prerequisites:
- Node.js and npm installed on your machine to use npx with the MCP package.
- An Balldontlie API key (free tier acceptable).
Installation steps:
-
Ensure Node.js is installed. Verify with: node -v npm -v
-
Install and run the MCP server via npx (no local installation required):
npx -y balldontlie-mcp
- If you need to specify the API key via environment variable, set it in your shell before launching or include it in the mcp_config as shown in the example:
export BALLDONTLIE_API_KEY=your-api-key-here
npx -y balldontlie-mcp
- Alternatively, install via Smithery as described in the README to integrate with Claude Desktop:
npx -y @smithery/cli install balldontlie-mcp --client claude
- For Claude Desktop usage, configure claude_desktop_config.json as shown in the README (balldontlie with command npx and args [-y, balldontlie-mcp]).
Additional notes
Tips and caveats:
- Ensure the BALLDONTLIE_API_KEY (note the potential misspelling in docs) or BALLOY key is set as an environment variable where required. The example uses BALLDONTLIE_API_KEY in the config; double-check which env var name your deployment expects.
- The MCP exposes four main tools: get_teams, get_players, get_games, and get_game. Use the inputs described in the README to filter results by league (NBA, NFL, MLB) and to paginate with cursor where applicable.
- If you run into rate limits from Balldontlie, consider caching results or batching requests where possible.
- The schedule_generator prompt can help you generate an interactive schedule for Claude Desktop via Claude’s integration; keep in mind this requires Claude Desktop context and proper prompt formatting.
- This MCP server is described as MIT licensed; you may modify and redistribute per the license terms.
- If you need to switch to a different deployment (e.g., Docker, Python uv, etc.), you can adapt the mcp_config accordingly but this README uses the Node/npx path by default.
Related MCP Servers
mcp-for-beginners
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
mcp-arr
MCP server for *arr media management suite
crawlbase
Crawlbase MCP Server connects AI agents and LLMs with real-time web data. It powers Claude, Cursor, and Windsurf integrations with battle-tested web scraping, JavaScript rendering, and anti-bot protection enabling structured, live data inside your AI workflows.
mongodb
MongoDB MCP Server
SureChEMBL
A comprehensive Model Context Protocol (MCP) server for accessing the SureChEMBL chemical patent database.