Skip to content

docs(grok): raise startup_timeout_sec before the first npx run (closes #144) - #146

Merged
VickyXAI merged 1 commit into
mainfrom
docs/grok-install-timeout
Sep 9, 2026
Merged

VickyXAI merged 1 commit into
mainfrom
docs/grok-install-timeout

Conversation

@VickyXAI

@VickyXAI VickyXAI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Closes #144, reported by @0xCheetah1.

The problem

Grok waits startup_timeout_sec for an MCP server to answer and defaults to 30. A cold npx -y @blockrun/mcp@latest has to download this package and its fifteen direct dependencies before the server can say anything, so a first-time user is running a race nobody told them about. Lose it and grok mcp doctor blockrun reports server timed out (no response within 30s) while the UI shows blockrun [unavailable] — an install that works, is still downloading, and is indistinguishable from broken.

What I verified before writing it down

  • The config key and the default. xAI's MCP docs confirm ~/.grok/config.toml, the [mcp_servers.<name>] table, and startup_timeout_sec = 30 as the default. They document the npx-first-run timeout case themselves.
  • The timing, on my own machine. Cold with an empty npm cache: 16.6s. Warm, same cache: 8.8s. The reporter measured 42-46s cold on a shared box.

That spread is the finding, so the docs give the range and the cause rather than one machine's number. Under 30s here, over it there — which is exactly why a user hits it intermittently and concludes the package is broken.

What changed

Docs only, in three places:

  • README — a Grok row in the client table, and a note under it with the config.toml fix, the npm install -g alternative, and the fact that only the first run pays this cost (npx caches by exact spec).
  • skills/blockrun-setup — the same guidance where someone installing actually reads, plus grok mcp add blockrun, blockrun unavailable and mcp server timed out as triggers.
  • skills/blockrun-debug — a symptom row that says plainly that nothing was charged, because the server never started, and gives the one-line check that separates "still downloading" from "actually broken": run npx -y @blockrun/mcp@latest in a terminal and see if it answers an initialize line.

One thing I added beyond the report

The trap is not Grok-specific. Any client with a startup timeout can lose the same race against our dependency tree, so the note says so and names the first check. Grok is where it bites hardest because its default is the tightest we know of.

Docs only: 636 tests and typecheck unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RNqnahSKcBqQemPn5TaMLg

…working install reads as broken

Closes #144, reported by @0xCheetah1.

Grok waits startup_timeout_sec for an MCP server to answer and defaults to 30
(confirmed against xAI's own MCP docs, which document the same npx-first-run
case). A cold `npx -y @blockrun/mcp@latest` has to download this package and its
fifteen direct dependencies before the server can say anything, so it is a race
the user does not know they are running. Lose it and `grok mcp doctor` reports
`server timed out (no response within 30s)` while the UI shows
`blockrun [unavailable]` — an install that works, is still downloading, and is
indistinguishable from broken.

Measured rather than repeated: 16.6s cold with an empty npm cache on a fast
connection, 8.8s warm; the reporter measured 42-46s cold on a shared box. The
range IS the finding, so the docs give the range and the cause instead of one
machine's number.

Grok gets a row in the README client table, a note under it with the config.toml
fix and the global-install alternative, the same in skills/blockrun-setup, and a
symptom row in skills/blockrun-debug that says plainly that nothing was charged
because the server never started. The note also says the trap is not
Grok-specific: any client with a startup timeout can lose the same race, and the
first check is whether `npx -y @blockrun/mcp@latest` answers in a terminal.

Docs only; 636 tests and typecheck unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RNqnahSKcBqQemPn5TaMLg
@VickyXAI
VickyXAI merged commit 6d4afd4 into main Sep 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Grok MCP install timeout workaround

1 participant