Gemini Code Context MCP Server
by qmediatio.github.qmediat/gemini-code-context-mcpv1.20.0
Codebase Q&A for Claude Code through Gemini's 1M-token window, with workspace scans and caching.
context tax
queued
security
queued
cold start
queued
freshness
Active3d ago
Install Gemini Code Context MCP server
Install in Claude Code
claude mcp add gemini-code-context -e GEMINI_API_KEY='<gemini-api-key>' -- npx -y @qmediat.io/gemini-code-context-mcpInstall in Cursor
{
"mcpServers": {
"gemini-code-context": {
"command": "npx",
"args": [
"-y",
"@qmediat.io/gemini-code-context-mcp"
],
"env": {
"GEMINI_API_KEY": "<gemini-api-key>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"gemini-code-context": {
"command": "npx",
"args": [
"-y",
"@qmediat.io/gemini-code-context-mcp"
],
"env": {
"GEMINI_API_KEY": "<gemini-api-key>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"gemini-code-context": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@qmediat.io/gemini-code-context-mcp"
],
"env": {
"GEMINI_API_KEY": "<gemini-api-key>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"gemini-code-context": {
"command": "npx",
"args": [
"-y",
"@qmediat.io/gemini-code-context-mcp"
],
"env": {
"GEMINI_API_KEY": "<gemini-api-key>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| GEMINI_CREDENTIALS_PROFILE | — | — | 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. |
| GEMINI_API_KEY | — | yes | 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. |
| GEMINI_USE_VERTEX | — | — | Set to `true` to use Vertex AI backend via Application Default Credentials. Requires GOOGLE_CLOUD_PROJECT. |
| GOOGLE_CLOUD_PROJECT | — | — | GCP project ID when using Vertex AI backend. Only read when GEMINI_USE_VERTEX=true. |
| GEMINI_DAILY_BUDGET_USD | — | — | 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`. |
| GEMINI_CODE_CONTEXT_DEFAULT_MODEL | — | — | 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. |
| GEMINI_CODE_CONTEXT_CACHING_MODE | — | — | `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. |
| GEMINI_CODE_CONTEXT_CACHE_TTL_SECONDS | — | — | 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. |
| GEMINI_CODE_CONTEXT_LOG_LEVEL | — | — | `debug` | `info` | `warn` | `error`. Default: `info`. |
Freshness
Active — last maintenance signal 3d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-07 · 3d ago · GitHub
Latest release
2026-10-06 · 4d ago · GitHub · v1.20.0
Package published
no data · npm/PyPI
Registry entry updated
2026-10-06 · 4d ago · official registry · v1.20.0
FAQ
›How do I install the Gemini Code Context MCP server in Claude Code?
Run: claude mcp add gemini-code-context -e GEMINI_API_KEY='<gemini-api-key>' -- npx -y @qmediat.io/gemini-code-context-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Gemini Code Context require an API key?
Yes. It expects GEMINI_API_KEY, of which 1 is a secret.
›Can I use Gemini Code Context as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Gemini Code Context in the official MCP registry?
Yes, as io.github.qmediat/gemini-code-context-mcp.
Alternatives to Gemini Code Context
Other ai & llm tools MCP servers.