home / mcp / balldontlie mcp server
Provides access to BALLDONTLIE sports data via an MCP server with API key forwarding and full tooling across multiple leagues.
Configuration
View docs{
"mcpServers": {
"balldontlie-api-mcp": {
"url": "https://mcp.balldontlie.io/mcp",
"headers": {
"PORT": "3000",
"NODE_ENV": "development",
"LOG_LEVEL": "info",
"API_TIMEOUT": "30000",
"ENABLE_DEBUG": "false",
"DD_AGENT_HOST": "localhost",
"ENABLE_TRACING": "false",
"BACKEND_API_URL": "https://api.balldontlie.io",
"BALLOUT_API_KEY": "YOUR_API_KEY_PLACEHOLDER",
"SERVICE_VERSION": "1.0.0",
"DD_PROFILING_ENABLED": "false"
}
}
}
}You can access BALLDONTLIE sports data through this MCP server, enabling you to query NBA, NFL, MLB, soccer leagues, and more via a unified, authenticated interface. It forwards your API key securely to the BALLDONTLIE backend and provides cursor-based pagination, robust error handling, and full TypeScript support for strong typing and IntelliSense in your client applications.
You will connect your MCP client to the BALLDONTLIE MCP server to retrieve data such as teams, players, games, standings, and betting odds from a wide range of sports. The server forwards your API key to the backend, so you can access endpoints with the same permissions you have on BALLDONTLIE. Use your MCP client to request information like current standings, player season stats, team rosters, upcoming games, and odds.
Prerequisites: you need Node.js installed on your machine to run the MCP server locally. You also need an active BALLDONTLIE API key to access the remote data source.
Step 1: Install the MCP server package globally or in your project (examples assume a local project setup).
npm install @balldontlie/mcp-serverStep 2: Start with the hosted remote server (recommended for quick setup). This uses the BALLDONTLIE MCP endpoint and forwards your API key.
{
"mcpServers": {
"balldontlie-api": {
"url": "https://mcp.balldontlie.io/mcp",
"transport": "http",
"headers": {
"Authorization": "<YOUR_BALLDONTLIE_API_KEY>"
}
}
}
}If you prefer to run from source, clone the repository, install dependencies, build, and start the local server.
git clone https://github.com/balldontlie-api/mcp-server.git
cd mcp-server
npm install
npm run build
npm startStep 3: Point your MCP client at the local server. The client should connect to the local endpoint provided by the server and include your API key in the Authorization header.
{
"mcpServers": {
"balldontlie-api": {
"url": "http://localhost:3000/mcp",
"transport": "http",
"headers": {
"Authorization": "<YOUR_BALLDONTLIE_API_KEY>"
}
}
}
}Once connected, your MCP client can request all available tools. Typical queries include standings, player season stats, team rosters, and game schedules across multiple sports.
The server forwards Authorization headers to the BALLDONTLIE API. Use a strong API key and never share it publicly. If you encounter authentication issues, verify that your API key is correctly set in the Authorization header.
If you see authentication or rate limit errors, ensure your API key is valid and that you are not exceeding the rate limits of BALLDONTLIE. Check that the MCP server is running and that the client is configured to point to the correct URL and port.
The MCP server exposes a comprehensive set of endpoints across many sports, including teams, players, games, statistics, standings, injuries, betting odds, and more. The exact tool list is extensive and covers NBA, NFL, MLB, EPL, NHL, WNBA, NCAAF, NCAAB, MMA, CS2, League of Legends, Dota 2, FIFA World Cup 2026, La Liga, Serie A, UEFA Champions League, Bundesliga, and Ligue 1.
Environment variables shown in the examples include enabling debug and tracing options, as well as a service version. You can adjust logging with the provided variables to suit your deployment.
To contribute or customize the MCP server, follow the build and development steps to run in development mode, which typically involves building the project and running a development server. Use the standard npm scripts for building and starting the service.
Get all NBA teams with optional filters for division and conference.
Get a specific NBA team by its id.
Get NBA players with filters such as search terms, team IDs, and pagination.
Get details for a specific NBA game by its id.
Get NBA team standings for a given season, conference, or division.
Get all NFL teams with optional division and conference filters.
Get a specific NFL team by its id.
Get NFL players with filters like search terms, team IDs, position, and pagination.
Get NFL games with dates, seasons, weeks, and pagination.
Get all MLB teams with filters for division and league.
Get a specific MLB team by its id.
Get MLB players with filters including search terms, team IDs, and pagination.
Get all EPL teams with pagination support.
Get a specific EPL team by its id.
Get WNBA players with filters for search terms and pagination.
Get a specific WNBA game by its id.