Balldontlie

io.balldontlie由 balldontlie.io 發布官方發布者v1.1.0更新於 Oct 27, 2026

Provides access to live sports data and analytics from BALLDONTLIE: The Sports API

已驗證Streamable HTTP可網頁執行開發者工具資料與分析

概覽

AI 產生的概覽

遠端 MCP 伺服器,包裝 BALLDONTLIE 運動 API,讓助理查詢 27 個聯盟與賽事的即時運動資料與分析。

可以做什麼
  • 查詢 NBA、NFL、MLB、NHL、英超、F1、PGA、MMA 及電競等聯盟的球隊、球員、比賽與統計資料
  • 呼叫依 OpenAPI 規格產生的各聯盟專用端點(共 529 個工具)
  • 透過 account_get_me 讀取帳戶資訊,該工具不會回傳 API 金鑰欄位
  • 在部署啟用後,可使用帳戶工具進行註冊、輪換 API 金鑰、變更訂閱及取得帳務入口連結
適用情境
當助理需要 BALLDONTLIE 涵蓋聯盟的結構化運動資料(比分、名單、賽程或統計),且你已有或打算申請 BALLDONTLIE API 金鑰時適用。
執行需求
遠端 streamable HTTP 端點 mcp.balldontlie.io,不需本機套件。每個請求(包含初始化與工具列表)都需以 Authorization bearer 標頭傳送 BALLDONTLIE API 金鑰。
安裝前請注意
API 金鑰是憑證,經由 Authorization 標頭傳遞,請避免出現在共享對話紀錄中。可建立憑證、變更帳務狀態或回傳代管帳務工作階段連結的帳戶工具預設關閉,僅由部署端以開關啟用,啟用後這些值可能進入對話。工具呼叫會把 Authorization 標頭轉送至上游 BALLDONTLIE API。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Balldontlie,將其新增到工作區。
  2. 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.balldontlie%2Fmcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "balldontlie": {
      "type": "http",
      "url": "https://mcp.balldontlie.io/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

BALLDONTLIE MCP Server

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 529 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.

Authentication

Every MCP request requires a BALLDONTLIE API key:

http
Authorization: Bearer YOUR_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.

Sensitive Account tools

The complete Account API surface is registered, but the following tools are disabled by default:

  • account_signup
  • account_rotate_api_key
  • account_change_subscription
  • account_cancel_subscription
  • account_create_checkout
  • account_get_billing_portal

They 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.

MCP request example

bash
curl https://mcp.balldontlie.io/mcp \  -H 'Content-Type: application/json' \  -H 'Authorization: Bearer YOUR_API_KEY' \  -d '{    "jsonrpc": "2.0",    "id": 1,    "method": "tools/call",    "params": {      "name": "nba_get_teams",      "arguments": {}    }  }'

Use tools/list to retrieve the current catalog, input schemas, and MCP read-only/destructive annotations.

Development

bash
npm cinpm run check:openapinpm testnpm run build

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.

Updating from the API source

  1. Copy balldontlie-2/marketing/public/openapi.yml to openapi.yml.
  2. Copy every balldontlie-2/marketing/public/openapi/*.yml file into openapi/.
  3. Update scripts/openapi-source.json to the source API commit.
  4. Run npm run generate:openapi.
  5. Run 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.

Configuration

VariableDefaultPurpose
PORT3000HTTP port
BACKEND_API_URLhttps://api.balldontlie.ioBALLDONTLIE API base URL
API_TIMEOUT30000Upstream timeout in milliseconds
ENABLE_DEBUGfalseLogs only method, query-free path, and query-field count
ENABLE_SENSITIVE_ACCOUNT_TOOLSfalseEnables sensitive Account tools only when exactly true
TRUST_PROXY_HOPS1 in production, 0 otherwiseValidated trusted proxy hop count; only 0 or 1 is accepted
ENABLE_TRACINGfalseEnables 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.

來源:README.md,提交 861c019

工具

0
該伺服器需要 API 金鑰等憑證,因此 SourceWeft 無法在沒有憑證的情況下讀取其工具,也未收錄。

版本歷史

1
  1. v1.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Balldontlie 整合