Back to Browse

Gemini Code Context MCP Server

AI & MLLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Codebase Q&A for Claude Code through Gemini's 1M-token window, with workspace scans and caching.

About

Codebase Q&A for Claude Code through Gemini's 1M-token window, with workspace scans and caching.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (1 strong, 1 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.

3 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Profile name in ~/.config/qmediat/credentials (chmod 0600). Created by `npx @qmediat.io/gemini-code-context-mcp init`. Recommended; keeps your API key out of ~/.claude.json.Optional

Environment variable: GEMINI_CREDENTIALS_PROFILE

Fallback Tier 3 auth. Your Gemini API key. Emits a warning at startup recommending you move it to the credentials profile via the init command.Required

Environment variable: GEMINI_API_KEY

Set to `true` to use Vertex AI backend via Application Default Credentials. Requires GOOGLE_CLOUD_PROJECT.Optional

Environment variable: GEMINI_USE_VERTEX

GCP project ID when using Vertex AI backend. Only read when GEMINI_USE_VERTEX=true.Optional

Environment variable: GOOGLE_CLOUD_PROJECT

Hard daily USD cap enforced locally. Server refuses calls after the cap until UTC midnight. Unlimited if unset. Honoured by `ask`, `code`, and per-iteration by `ask_agentic`.Optional

Environment variable: GEMINI_DAILY_BUDGET_USD

Model alias (`latest-pro-thinking`, `latest-pro`, `latest-flash`, `latest-lite`, `latest-vision`) or literal model ID, read by ask, ask_agentic and code. Default: `latest-pro-thinking` (the thinking tier). code replaces a configured default that resolves but cannot reason or think with `latest-pro-thinking` and reports it as `configuredModelReplaced`; a default that does not resolve fails every tool.Optional

Environment variable: GEMINI_CODE_CONTEXT_DEFAULT_MODEL

`implicit` (default since v1.14.0: the workspace text is sent inline, Gemini's automatic prefix cache decides any discount) or `explicit` (Files API upload + Context Cache with Google's cached-input price). Per-call `cachingMode` wins.Optional

Environment variable: GEMINI_CODE_CONTEXT_CACHING_MODE

Context Cache TTL in seconds in explicit caching mode. Default: 3600 (1 hour). Hot workspaces (<10 min since last use) auto-refresh via background watcher.Optional

Environment variable: GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS

`debug` | `info` | `warn` | `error`. Default: `info`.Optional

Environment variable: GEMINI_CODE_CONTEXT_LOG_LEVEL

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-qmediat-gemini-code-context-mcp": {
      "env": {
        "GEMINI_API_KEY": "your-gemini-api-key-here",
        "GEMINI_USE_VERTEX": "your-gemini-use-vertex-here",
        "GOOGLE_CLOUD_PROJECT": "your-google-cloud-project-here",
        "GEMINI_DAILY_BUDGET_USD": "your-gemini-daily-budget-usd-here",
        "GEMINI_CREDENTIALS_PROFILE": "your-gemini-credentials-profile-here",
        "GEMINI_CODE_CONTEXT_LOG_LEVEL": "your-gemini-code-context-log-level-here",
        "GEMINI_CODE_CONTEXT_CACHING_MODE": "your-gemini-code-context-caching-mode-here",
        "GEMINI_CODE_CONTEXT_DEFAULT_MODEL": "your-gemini-code-context-default-model-here",
        "GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS": "your-gemini-code-context-cache-ttl-seconds-here"
      },
      "args": [
        "-y",
        "@qmediat.io/gemini-code-context-mcp"
      ],
      "command": "npx"
    }
  }
}

Reviews

No reviews yet

Be the first to review this server!