mikechao/balldontlie-mcp logo

mikechao/balldontlie-mcp

Free

集成 balldontlie API,提供 NBA、NFL 和 MLB 的球员、球队和比赛信息。

FreeFree tier
Type
Open Source

About mikechao/balldontlie-mcp

Balldontlie MCP Server is an open-source Model Context Protocol (MCP) server that integrates the Balldontlie API to provide structured information about players, teams, and games for the NBA, NFL, and MLB. It exposes four main tools: get_teams to retrieve teams by league, get_players to search players with optional filters (firstName, lastName, pagination), get_games to list games by league, date range, and team IDs with pagination, and get_game to fetch details of a specific game by ID. Additionally, it includes a prompt schedule_generator that generates an interactive schedule for a given league and date range in Claude Desktop. The server is easy to deploy via npx, Smithery, or a DXT file, and requires a free Balldontlie API key. It is built with TypeScript and follows the MCP specification for seamless integration with AI assistants like Claude.

Key Features

Provides structured data for players, teams, and games across NBA, NFL, and MLB
Tools: get_teams, get_players, get_games, get_game with pagination and filtering
Prompt: schedule_generator creates interactive schedule in Claude Desktop
Supports search by player name (firstName, lastName) and game lookup by ID
Filter games by date range and team IDs
Easy installation via npx, Smithery, or DXT file for Claude Desktop
Open source under MIT license (implied by LICENSE file)

Pros & Cons

Pros
  • Open source and free to use (requires free API key)
  • Covers three major US sports leagues: NBA, NFL, MLB
  • Simple setup via widely used MCP client configurations
  • Supports pagination for large datasets
  • Includes a predefined prompt for easier interaction
Cons
  • Requires external Balldontlie API key; API may have rate limits or usage caps on free plan
  • Data quality and freshness depend on the Balldontlie API, not the server itself
  • Limited to the sports leagues supported by Balldontlie (NBA, NFL, MLB only)
  • No built-in caching or offline support; depends on network availability

Best For

Ask AI assistants for today's baseball games or schedulesSearch for NFL players by last nameLook up specific NBA game details by IDGenerate interactive sports schedules within Claude DesktopIntegrate sports data into MCP-compatible applications

FAQ

Which sports leagues are supported?
The server supports the NBA (National Basketball Association), NFL (National Football League), and MLB (Major League Baseball).
Do I need an API key to use this server?
Yes, you must sign up for a free account at Balldontlie.io and obtain an API key. The free plan is sufficient for this MCP server.
How do I install this MCP server?
You can install it via npx with the command 'npx -y balldontlie-mcp' and configure your API key in the environment variable BALLDONTLIE_API_KEY. Alternatively, use Smithery or a DXT file for Claude Desktop.
What tools are available?
The server provides four tools: get_teams, get_players, get_games, and get_game. It also includes a prompt called schedule_generator.
Can I filter players by name?
Yes, get_players accepts optional parameters 'firstName' and 'lastName' to search for specific players.