docs(grok): raise startup_timeout_sec before the first npx run (closes #144) - #146
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #144, reported by @0xCheetah1.
The problem
Grok waits
startup_timeout_secfor an MCP server to answer and defaults to 30. A coldnpx -y @blockrun/mcp@latesthas 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 andgrok mcp doctor blockrunreportsserver timed out (no response within 30s)while the UI showsblockrun [unavailable]— an install that works, is still downloading, and is indistinguishable from broken.What I verified before writing it down
~/.grok/config.toml, the[mcp_servers.<name>]table, andstartup_timeout_sec = 30as the default. They document the npx-first-run timeout case themselves.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:
config.tomlfix, thenpm install -galternative, 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, plusgrok mcp add blockrun,blockrun unavailableandmcp server timed outas 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": runnpx -y @blockrun/mcp@latestin a terminal and see if it answers aninitializeline.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