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 集成