start.gg MCP Server

io.github.tomo789由 GitHub 账号 tomo789 发布v0.1.0更新于 Oct 24, 2026

MCP server for the start.gg GraphQL API: tournaments, events, entrants, sets, standings, streams

已验证STDIO仅桌面效率与工作流数据与分析

概览

AI 生成的概览

面向 start.gg GraphQL API 的只读 MCP 服务器,让助手查询赛事、比赛项目、参赛者、对局、排名和直播流。

可以做什么
把 start.gg GraphQL API 封装为 16 个只读工具,覆盖游戏与赛事搜索、赛事与比赛项目详情、带种子的参赛者、排名、规范化对局、单局角色与舞台数据、选手、直播队列以及 start.gg 链接解析。输出经过规范化(例如对局包含轮次、解码后的状态、参赛者、比分和胜者),并在构建请求前用 Zod 校验输入。还提供滑动窗口限流、带退避的重试和短时效内存缓存。
适用场景
当助手需要回答关于 start.gg 上竞技游戏赛事的问题时使用:查找即将举行的赛事、查看参赛者与种子、回顾已完成对局和八强排名,或了解哪些直播流被分配到对局。它与具体游戏无关且只读,适合查询与汇报,而不是管理赛程。
运行要求
以 npm 包形式通过 stdio 在本地运行(npx startgg-mcp-server 或全局安装);需要 Node.js 22 或更高版本。需要通过 STARTGG_TOKEN 环境变量提供 start.gg API 令牌。可选变量:STARTGG_RATE_LIMIT、STARTGG_TIMEOUT_MS、STARTGG_CACHE 和 STARTGG_ENABLE_WRITES。需要访问 api.start.gg 的网络连接。
安装前请注意
STARTGG_TOKEN 是个人访问令牌,应像密码一样保管;它只从环境变量读取,并且只发送到 api.start.gg。所有工具均为只读,未实现任何写操作;STARTGG_ENABLE_WRITES 为预留项,仅记录一条提示。没有令牌时服务器仍会启动,但每次调用都会返回 AUTH_ERROR。请求会计入 start.gg 公布的速率限制。

安装

在 SourceWeft 中

  1. 打开 控制台中的 start.gg MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

startgg-mcp-server

A Model Context Protocol server for the start.gg GraphQL API. It lets MCP clients (Claude Code, Claude Desktop, and others) discover tournaments, inspect events, entrants, sets, standings, and streams for any game on start.gg using natural language.

What is this?

start.gg exposes a powerful but complex GraphQL API: entrants vs participants vs players, integer set states, complexity-limited pagination, epoch timestamps. This server wraps that API in a small set of MCP tools with:

  • Normalized output — sets come back as { round, state: "COMPLETED", entrant1: { gamerTag, seed }, score, winnerEntrantId, ... } instead of raw GraphQL nesting
  • URL resolution — paste a start.gg URL, get tournament/event ids back
  • Built-in rate limiting, retries, and caching tuned to start.gg's documented limits

The server is game-agnostic. Game-specific logic (e.g. Smash upset detection) belongs in applications built on top — see examples/smash-ultimate-watcher.

Features

  • 16 read-only tools covering discovery, tournaments, events, players, streams, and URL resolution
  • Input validation (Zod) on every tool — bad ids, oversized page sizes, and malformed URLs never reach the API
  • Sliding-window rate limiter (default 75 req/60s vs start.gg's 80), retries with exponential backoff, and Retry-After support
  • Short-TTL in-memory cache for metadata queries
  • Typed error codes: AUTH_ERROR, RATE_LIMITED, NOT_FOUND, INVALID_INPUT, STARTGG_GRAPHQL_ERROR, NETWORK_ERROR, INTERNAL_ERROR
  • GraphQL documents kept in graphql/ files, separate from code
  • The API token never appears in output, logs, or error messages
  • Compact JSON output (no pretty-printing) to keep tool results small

Requirements

  • Node.js >= 22
  • A start.gg API token

Getting a start.gg API token

  1. Log in to start.gg
  2. Open developer settings (Profile → Developer Settings)
  3. Create a personal access token and copy it

Treat the token like a password. This server reads it only from the STARTGG_TOKEN environment variable.

Installation

From npm (recommended)

bash
# run without installingnpx startgg-mcp-server
# or install globallynpm install -g startgg-mcp-server

Requires STARTGG_TOKEN in the environment; MCP clients normally launch it for you (see the next section).

From source

bash
git clone https://github.com/tomo789/startgg-mcp-server.gitcd startgg-mcp-servernpm installnpm run build

MCP client setup

Claude Code (CLI)

bash
claude mcp add startgg --env STARTGG_TOKEN=YOUR_TOKEN -- npx -y startgg-mcp-server

Running from a source checkout instead:

bash
claude mcp add startgg --env STARTGG_TOKEN=YOUR_TOKEN -- node /path/to/startgg-mcp-server/dist/cli.js

Claude Desktop

Add to claude_desktop_config.json:

json
{  "mcpServers": {    "startgg": {      "command": "npx",      "args": ["-y", "startgg-mcp-server"],      "env": {        "STARTGG_TOKEN": "YOUR_TOKEN"      }    }  }}

From a source checkout, use "command": "node" and "args": ["/path/to/startgg-mcp-server/dist/cli.js"] instead.

Any MCP client that supports stdio servers works the same way: run node dist/cli.js (or the startgg-mcp-server bin once installed via npm) with STARTGG_TOKEN set.

Available tools

Discovery

ToolPurpose
search_videogamesFind videogame ids by name (e.g. "Super Smash Bros. Ultimate" → 1386)
search_tournamentsGeneral tournament search: name, videogame, country/state, date range, upcoming/past, open registration
get_upcoming_tournamentsTournaments that haven't ended yet (includes in-progress), soonest first, with a days window
get_tournaments_by_videogameTournaments for one videogame id (upcoming / past / all)

Tournament

ToolPurpose
get_tournamentDetails, schedule, venue, events list, configured streams
get_tournament_eventsEvents (brackets) of a tournament, optionally filtered by videogame
get_tournament_entrantsTournament-level participants (attendees); per-event seeding lives in get_event_entrants
get_stream_queueStream queue: streams (with derived Twitch URLs) and the sets assigned to each

Event

ToolPurpose
get_eventEvent details including phases (Pools, Top 8, ...) with phase ids
get_event_entrantsEntrants with seed, players, DQ flag; pagination or fetchAll
get_event_standingsPlacements (use perPage: 8 for Top 8)
get_event_setsNormalized sets with stream; filter by state, phase, round, entrants, players, VOD; includeGames for per-game details
get_set_gamesPer-game stage / winner / character picks for one set; see coverage note

Player

ToolPurpose
get_playerPlayer by id: gamer tag, prefix, linked user
get_player_setsA player's recent sets across tournaments

Utility

ToolPurpose
resolve_startgg_urlstart.gg URL/slug → { type, tournamentId, eventId, slugs, names }

Tournament/event tools accept either a numeric id, a slug, or a full start.gg URL. Scheme-less URLs (start.gg/tournament/...) and <t>/event/<e> slugs are accepted too — you rarely need resolve_startgg_url explicitly, but it is there when you want the ids.

Normalized set shape

json
{  "id": 106877974,  "round": "Grand Final",  "roundNumber": 3,  "state": "COMPLETED",  "stateRaw": 3,  "completedAt": "2026-08-24T07:19:34.000Z",  "entrant1": {    "entrantId": 24480092,    "name": "LittleMacMain",    "seed": 5,    "players": [{ "playerId": 3655189, "gamerTag": "LittleMacMain", "prefix": "" }],    "score": 2  },  "entrant2": { "...": "same shape" },  "score": { "entrant1": 2, "entrant2": 3, "displayScore": "LittleMacMain 2 - RenSuø 3" },  "winnerEntrantId": 24481002,  "phase": { "id": 1994001, "name": "Bracket" },  "vodUrl": null}

Notes grounded in the live API:

  • roundNumber < 0 means losers bracket; round is the human-readable name
  • a score of -1 is start.gg's disqualification marker
  • unstarted "preview" sets have string ids like "preview_3430499_2_0"
  • state names are decoded from the integer stateRaw; both are always returned
  • entrant1/entrant2 use a players array, so doubles/teams work unchanged

Games and characters

get_set_games (and get_event_sets with includeGames: true) add per-game details when start.gg has them:

json
{  "orderNum": 1,  "winnerEntrantId": 24480092,  "stage": { "id": 484, "name": "Small Battlefield" },  "selections": [{ "entrantId": 24481002, "character": { "id": 1846, "name": "Kazuya" } }]}

derivedCharacters summarizes unique character names per entrant in first-appearance order across games. This is derived, not an API field.

Character and stage data only exists when the set was reported with it. In a 2026-09 sample, late rounds (Top 8 / streamed) had it on about 90% of completed sets; early pools about 5%. An empty games array means not reported, not that no games were played. Typical flow: get_event_sets (e.g. phaseIds for Top 8) → pick set ids → get_set_games. For many sets at once, get_event_sets with includeGames: true.

Examples

Things to ask an MCP client once connected:

text
Find upcoming Super Smash Bros. Ultimate tournaments this week.
Get the entrants and seeds for this start.gg tournament URL:https://www.start.gg/tournament/.../event/...
Show me completed sets from Top 8 of that event.
Which streams are assigned to sets at this tournament?
What were the biggest seed upsets in this event?

A standalone example application (videogame lookup → upcoming tournaments → sets → upset candidates by seed difference) lives in examples/smash-ultimate-watcher.

Environment variables

VariableRequiredDefaultPurpose
STARTGG_TOKENyes—start.gg API token
STARTGG_ENABLE_WRITESnofalseReserved. No write tools exist yet; the flag only logs a notice
STARTGG_RATE_LIMITno75Requests per 60s window (hard-capped at 80)
STARTGG_TIMEOUT_MSno30000Per-request HTTP timeout
STARTGG_CACHEnoonSet off to disable the in-memory cache

The API endpoint is deliberately not configurable through the environment: the token is only ever sent to api.start.gg. When using the client as a library (tests, tooling), inject apiUrl/fetchFn via the StartggClient constructor.

Out-of-range or non-numeric values for STARTGG_RATE_LIMIT / STARTGG_TIMEOUT_MS fall back to the default and log a warning on stderr.

Without STARTGG_TOKEN the server still starts and lists tools, but every call returns a clear AUTH_ERROR explaining how to fix it.

Security

  • The token is read from the environment only, sent only to api.start.gg, and never included in tool output, logs, or error messages
  • All tools are read-only; no mutations are implemented
  • .env files are git-ignored; use .env.example as a template
  • User-supplied input is schema-validated before any request is built

Rate limits

start.gg allows 80 requests per 60 seconds and at most 1000 objects per request. This server:

  • keeps a sliding-window budget below the request limit (default 75/60s)
  • retries 429 (honoring Retry-After) and transient 5xx errors with exponential backoff, at most 3 retries — GraphQL errors are never retried
  • caps perPage per tool so responses stay under the 1000-object complexity limit (sets are expensive: ~26+ objects each, hence perPage <= 30)
  • caps fetchAll at 5 pages per tool (output is meant for an LLM context, so it stays around 100 KB of compact JSON) and reports truncated: true when it stops early

Development

bash
npm run dev        # run from source (tsx)npm run build      # compile to dist/npm run typecheck  # tsc --noEmitnpm run lint       # eslintnpm run format     # prettier

GraphQL documents live in graphql/*.graphql (one file per domain, multiple named operations per file; requests select an operation via operationName). Schema facts verified against the live API are recorded in docs/startgg-api-notes.md — read it before adding fields.

Testing

bash
npm test                    # unit tests (fixtures/mocks only, no network)STARTGG_INTEGRATION=1 STARTGG_TOKEN=... npm test   # + 2 live API smoke testsSTARTGG_TOKEN=... node scripts/smoke.mjs           # full stdio end-to-end smoke (~10 live requests)

Unit tests cover the URL resolver, normalizers, input validation, pagination, GraphQL/HTTP error handling, the rate limiter, and the cache.

License

MIT

来源:README.md,提交 f991d32

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

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

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分