Skip to content
Claude Code

ask grok for Claude Code

io.github.lykhoyda/ask-grok

Consult Grok through xAI's metered API with exact model selection and no fallback

client:Claude Code transport:stdio runtime:npm

Install ask grok in Claude Code

run in your project directory

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

claude mcp add ask-grok -e XAI_API_KEY=<XAI_API_KEY> -e ASK_GROK_HARNESS=<ASK_GROK_HARNESS> -e ASK_GROK_MODEL=<ASK_GROK_MODEL> -e ASK_GROK_REASONING_EFFORT=<ASK_GROK_REASONING_EFFORT> -e ASK_GROK_MAX_OUTPUT_TOKENS=<ASK_GROK_MAX_OUTPUT_TOKENS> -e ASK_GROK_TIMEOUT_MS=<ASK_GROK_TIMEOUT_MS> -e GMCPT_LOG_LEVEL=<GMCPT_LOG_LEVEL> -- npx -y @ask-llm/grok-mcp

Adds it for this project only. Append --scope user to make it available everywhere. Claude Code docs

ask grok in other clients