MCP server for BALLDONTLIE API
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Remote Model Context Protocol server for the BALLDONTLIE sports API. The tool catalog is generated from the vendored public OpenAPI specifications so endpoint methods, paths, parameters, and constraints stay aligned with the API source.
The current generated surface contains 505 tools from 27 specifications: Account, ATP, Bundesliga, college baseball, Counter-Strike, Dota 2, EPL, F1, FIFA World Cup, La Liga, Ligue 1, League of Legends, MLB, MLS, MMA, NBA, NCAAB, NCAAF, NCAAW, NFL, NHL, PGA, Serie A, UCL, Valorant, WNBA, and WTA. /health reports the authoritative runtime count and deployed revision.
Every MCP request requires a BALLDONTLIE API key:
Initialization, tool listing, authenticated documentation, and API operations that are public outside the MCP validate the supplied key before proceeding. Other tool calls forward only the Authorization header to the corresponding authenticated BALLDONTLIE endpoint.
Public service metadata is limited to /health and /.well-known/mcp-config. /api/docs requires a valid API key.
The complete Account API surface is registered, but the following tools are disabled by default:
account_signupaccount_rotate_api_keyaccount_change_subscriptionaccount_cancel_subscriptionaccount_create_checkoutaccount_get_billing_portalThey can create credentials, change billing state, or return sensitive hosted billing-session URLs. A deployment must set ENABLE_SENSITIVE_ACCOUNT_TOOLS=true exactly to enable them. Enabling the flag means those values may intentionally enter the authenticated caller's MCP transcript. Other spellings, casing, or whitespace fail closed.
account_get_me remains available but always omits the api_key response field.
Use tools/list to retrieve the current catalog, input schemas, and MCP read-only/destructive annotations.
The tests independently compare every generated operation and input against all vendored specifications. They also cover legacy tool-name compatibility, exact array query serialization, path/body dispatch, credential-safe errors and logs, API-key validation limits, and Account safety controls. Tests never call a live Account mutation.
balldontlie-2/marketing/public/openapi.yml to openapi.yml.balldontlie-2/marketing/public/openapi/*.yml file into openapi/.scripts/openapi-source.json to the source API commit.npm run generate:openapi.npm test and npm run build.Generated src/tools/*.ts, src/schemas/*.ts, and registry files are checked in and must not be edited manually. Runtime does not parse YAML and has no production YAML-parser dependency.
| Variable | Default | Purpose |
|---|---|---|
PORT | 3000 | HTTP port |
BACKEND_API_URL | https://api.balldontlie.io | BALLDONTLIE API base URL |
API_TIMEOUT | 30000 | Upstream timeout in milliseconds |
ENABLE_DEBUG | false | Logs only method, query-free path, and query-field count |
ENABLE_SENSITIVE_ACCOUNT_TOOLS | false | Enables sensitive Account tools only when exactly true |
TRUST_PROXY_HOPS | 1 in production, 0 otherwise | Validated trusted proxy hop count; only 0 or 1 is accepted |
ENABLE_TRACING | false | Enables Datadog tracing when an agent host is configured |
Authorization values, query values, request bodies, raw upstream errors, API-key responses, and hosted billing-session URLs are excluded from server logs and tracing tags.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-183)<a href="https://allmcps.com/mcp/mcp-183"><img src="https://allmcps.com/api/badge/mcp-183?style=directory" alt="Mcp on AllMCPs" /></a>