Skip to content
VS Code

gemini code context mcp for VS Code

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

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

client:VS Code transport:stdio runtime:npm

Install gemini code context mcp in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "gemini-credentials-profile",
      "description": "GEMINI_CREDENTIALS_PROFILE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gemini-api-key",
      "description": "GEMINI_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gemini-use-vertex",
      "description": "GEMINI_USE_VERTEX",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google-cloud-project",
      "description": "GOOGLE_CLOUD_PROJECT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gemini-daily-budget-usd",
      "description": "GEMINI_DAILY_BUDGET_USD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gemini-code-context-default-model",
      "description": "GEMINI_CODE_CONTEXT_DEFAULT_MODEL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gemini-code-context-cache-ttl-seconds",
      "description": "GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "gemini-code-context-log-level",
      "description": "GEMINI_CODE_CONTEXT_LOG_LEVEL",
      "password": true
    }
  ],
  "servers": {
    "gemini-code-context-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@qmediat.io/gemini-code-context-mcp"
      ],
      "env": {
        "GEMINI_CREDENTIALS_PROFILE": "${input:gemini-credentials-profile}",
        "GEMINI_API_KEY": "${input:gemini-api-key}",
        "GEMINI_USE_VERTEX": "${input:gemini-use-vertex}",
        "GOOGLE_CLOUD_PROJECT": "${input:google-cloud-project}",
        "GEMINI_DAILY_BUDGET_USD": "${input:gemini-daily-budget-usd}",
        "GEMINI_CODE_CONTEXT_DEFAULT_MODEL": "${input:gemini-code-context-default-model}",
        "GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS": "${input:gemini-code-context-cache-ttl-seconds}",
        "GEMINI_CODE_CONTEXT_LOG_LEVEL": "${input:gemini-code-context-log-level}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

gemini code context mcp in other clients