
Sports Hub
io.github.lacausecrypto由 GitHub 帳號 lacausecrypto 發布v1.4.1更新於 Oct 27, 2026
42 sports API providers, 410 tools: scores, stats, odds, esports, chess, motorsport & more.
概覽
把 42 個體育資料來源整合成一個 MCP 伺服器,為助理提供 410 個工具,涵蓋比分、數據、賠率、電競、西洋棋與賽車。
- 可以做什麼
- 查詢 70 多種運動的即時比分、排名、賽程、技術統計與球隊球員資料
- 從多個賠率來源取得投注賠率與盤口
- 查詢電競賽事與 Dota 2 分析,以及西洋棋棋手資料、排行榜與每日謎題
- 讀取 F1、MotoGP、Formula E 與 NASCAR 的賽事結果與即時遙測
- 以資源形式瀏覽資料來源與預設目錄,並執行今日賽事、賠率比較等預設工作流程
- 適用情境
- 適合想用一個本機伺服器回答體育問題(賽程、賽果、排名、賠率或電競資料),而不必分別串接多個體育 API 的情況。預設的免費組合不需註冊即可使用,方便先試用再新增金鑰。
- 執行需求
- 透過 npx 或全域 npm 安裝,以 stdio 在本機執行,需要 Node.js 18+ 與 npm。選用的免費 API 金鑰以環境變數提供,例如 API_SPORTS_KEY、PANDASCORE_TOKEN 與 THE_ODDS_API_KEY;SPORTS_HUB_PROVIDERS 用來選擇載入哪些資料來源。需要能連線上游體育 API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Sports Hub,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Sports Hub MCP Server
[npm version] [npm downloads] [CI] [License]
[42 Providers] [410 Tools] [MCP Registry]
[macOS] [Linux] [Windows] [Node.js] [TypeScript]
A unified MCP server that aggregates 42 sports API providers into a single service. 410 tools covering scores, stats, odds, esports, college sports, chess, motorsport, boxing, AFL, and more across 70+ sports.
Each provider works independently. You only need API keys for the providers you use. Missing keys don't block startup — tools return an error when called without their key.
Works with: [Claude] [ChatGPT] [Cursor] [Windsurf] [Zed] [Continue] [Cline]
Demo
NBA scores, Premier League odds, Tennis H2H — all from a single MCP server.
Compatibility
Platforms
MCP Clients
Uses the stdio transport from the MCP SDK. Works with any LLM (Claude, GPT, Gemini, Llama, Mistral, etc.).
Requirements: Node.js 18+, npm.
Providers (42)
Works instantly — no API key, no signup (19 providers, ~165 tools)
These providers work out of the box. Just build and run.
Tip: Use
SPORTS_HUB_PROVIDERS=freeto load only these 19 providers (~165 tools).
Free tier with API key — signup required, no credit card (23 providers, ~245 tools)
Registration takes 1-2 minutes. All keys are free.
Providers with missing keys don't block the server — they just return an error when called. Register keys incrementally as you need them.
Installation
Quick (npx — no install)
npm global
From source
MCP Registry
This server is published on the official MCP Registry as io.github.lacausecrypto/sports-hub. MCP clients that support the registry can discover and install it automatically.
Transport Modes
Stdio (default — Claude Desktop, Cursor, etc.)
HTTP/SSE (remote clients, web apps, custom integrations)
Endpoints:
POST /mcp— MCP protocol (Streamable HTTP with SSE)GET /health— Health check ({"status":"ok","providers":19,"sessions":0,"mode":"session"})
Supports CORS and multi-client session management via the mcp-session-id header. Default port: 3000.
Each client gets its own session, created on initialize and addressed afterwards by its session id. Building a session costs ~90 ms for the 165-tool free preset, paid once per client rather than per request. Idle sessions are reaped.
SPORTS_HUB_STATELESS=1 suits several replicas behind a load balancer with no sticky routing. It pays the build cost on every call, so prefer sessions for a single instance.
⚠ Security: HTTP mode binds to
127.0.0.1(loopback) by default. SettingSPORTS_HUB_HOST=0.0.0.0exposes an unauthenticated MCP endpoint to your whole network — anyone who can reach it can use your configured API keys. DNS-rebinding protection only blocks browser-origin attacks, not direct clients. Only expose it behind a reverse proxy with auth/TLS.SPORTS_HUB_CORS_ORIGINSmust list explicit origins (a literal*is rejected).
Hosted (Smithery)
A Dockerfile and smithery.yaml are included for container hosting on Smithery. The hosted endpoint serves the keyless free preset, so clients connect with zero setup. The deploy sets SPORTS_HUB_DNS_REBINDING_PROTECTION=0 because Smithery's proxy forwards a non-localhost Host header.
SPORTS_HUB_DNS_REBINDING_PROTECTION=0disables the Host/Origin check (it is on by default). Only set it when the server runs behind a trusted proxy that owns routing — never for a server directly reachable by browsers on localhost.
Configuration
Environment Variables
Only set keys for providers you want:
Windows (PowerShell):
Windows (cmd):
Response size and the fields parameter
Sports APIs return very wide objects, and every byte a tool returns is spent from the model's context window. A single espn_get_scoreboard-style team listing is ~300 KB of JSON, of which the part anyone wants is under 3 KB.
Every tool accepts an optional fields parameter: a comma-separated list of key names to keep, matched at any depth. Branches that match nothing are dropped, and a matched key keeps its whole value.
If fields matches nothing, the tool says so and lists the top-level keys it did see, rather than returning an empty object.
Responses are also capped. Above the limit, the longest lists in the payload are shortened until it fits (so the JSON still parses) and a note reports how many items were dropped.
Claude Desktop
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
Windows path: "args": ["C:/Users/you/mcp-sports-hub/dist/index.js"]
Only include env vars for providers you need. Omit env entirely for free-only providers.
Claude Code (CLI)
Or in .claude/settings.json:
Provider Filtering
By default, only the free preset is loaded (19 providers, ~165 tools — no API keys needed). Use SPORTS_HUB_PROVIDERS to change what's loaded:
Presets
Cache
All GET responses are cached in memory for 60 seconds by default. This protects against duplicate calls and rate limit waste. Configure with:
The cache key includes a digest of the request's auth headers, so two API keys never read each other's entries. Concurrent identical requests are collapsed into a single upstream call, and a 404/410 is remembered briefly (SPORTS_HUB_NEGATIVE_CACHE_TTL, default 30s) so a wrong ID can't be re-fetched in a loop.
Rate limits and retries
429 and 5xx responses are retried with exponential backoff, honouring Retry-After when the upstream sends one. Client errors (4xx other than 408/425/429) and timeouts are not retried.
In Claude Desktop config:
Tool Naming
All tools follow {provider}_{action}:
MCP Resources & Prompts
Beyond tools, the server exposes:
Resources (readable catalogs, no API call):
sportshub://providers— the full provider catalog (prefix, name, coverage, required key)sportshub://presets— all presets and the providers they loadsportshub://provider/{key}— details for one provider (with key autocompletion)
Prompts (curated slash-command workflows over the 410 tools):
whats-on-today·compare-odds {event}·motorsport-weekend {series}·league-standings {league}·team-deep-dive {team}·f1-race {season} {round}
All tools are annotated readOnly / idempotent so clients can skip confirmation prompts.
Architecture
Each provider exports register(server). Keys are checked at call time, not startup.
Contributing
- Fork the repository
- Create
src/providers/my-api.tsexportingregister(server: McpServer) - Prefix tool names:
myapi_get_something - Import + call in
src/index.ts npm run buildto verify- Submit a PR
License
MIT
來源:README.md,提交 5ecd395
工具
0版本歷史
2- v1.4.1最新Oct 14, 2026
- v1.3.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分