Skip to content

gemini code context mcp for Grok

io.github.qmediat/gemini-code-context-mcp

Gemini 2M context cache for Claude Code — persistent; repeat queries ~8x faster, ~4x cheaper.

client:Grok transport:stdio runtime:npm

Install gemini code context mcp in Grok

.mcp.json (in your project root)

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

{
  "mcpServers": {
    "gemini-code-context-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@qmediat.io/gemini-code-context-mcp"
      ],
      "env": {
        "GEMINI_CREDENTIALS_PROFILE": "<GEMINI_CREDENTIALS_PROFILE>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>",
        "GEMINI_USE_VERTEX": "<GEMINI_USE_VERTEX>",
        "GOOGLE_CLOUD_PROJECT": "<GOOGLE_CLOUD_PROJECT>",
        "GEMINI_DAILY_BUDGET_USD": "<GEMINI_DAILY_BUDGET_USD>",
        "GEMINI_CODE_CONTEXT_DEFAULT_MODEL": "<GEMINI_CODE_CONTEXT_DEFAULT_MODEL>",
        "GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS": "<GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS>",
        "GEMINI_CODE_CONTEXT_LOG_LEVEL": "<GEMINI_CODE_CONTEXT_LOG_LEVEL>"
      }
    }
  }
}

Grok Build reads Claude Code's .mcp.json and Claude Desktop's config unchanged, so a server you have already set up there needs nothing new. The Grok web app and X integration do not take custom servers. Grok docs

gemini code context mcp in other clients