# gemini-code-context-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/qmediat/gemini-code-context-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 1210  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/gemini-code-context-mcp

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

## Tools
Capabilities this server exposes over MCP:

- **ask** — A question about the whole workspace
- **ask_agentic** — A question about a workspace too large to send whole
- **code** — A coding task for Gemini
- **status** — Cache state, models, cost so far
- **reindex** — Scan the workspace again
- **clear** — Delete this workspace's cache

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "gemini-code-context-mcp": {
    "command": "npx",
    "args": ["-y","@qmediat.io/gemini-code-context-mcp"]
  }
}
```

## Documentation

## What gemini-code-context-mcp does

gemini-code-context-mcp connects MCP clients to Gemini models through either a Gemini API key or Vertex AI. Its main purpose is to let an agent ask questions about a complete code workspace without rebuilding the full context for every request. The workspace is scanned once and the resulting cache can be reused for subsequent questions.

The server is aimed at repository-level development work rather than isolated file prompts. It can answer broad questions about a codebase, handle coding tasks for Gemini, report cache and cost information, and manage the workspace index. Claude Code, Claude Desktop, and Cursor are listed as supported clients.

## How it works

After initialization, the server maintains a cache associated with the workspace. Repeated questions can use that cached context instead of sending the entire workspace again. The `status` tool exposes cache state, available models, and accumulated cost information.

For a workspace that is too large to provide as a whole, `ask_agentic` supplies an alternative question path. `reindex` scans the workspace again when its contents need to be refreshed. `clear` removes the cache for the workspace.

The supported model families listed for the project include Gemini 4 Carbon, Argon, and Hydrogen, along with Gemini 3.x and Gemini 2.5 Pro, Flash, and Flash-Lite. Model availability depends on the selected Gemini API or Vertex AI configuration.

## Setup and configuration

Node.js 22 or newer is required. Initialize the package with `npx`:

```bash
npx @qmediat.io/gemini-code-context-mcp init
```

The initialization command stores either a Gemini API key or a Vertex AI project. Add the server to Claude Code with a user-scoped MCP registration:

```bash
claude mcp add --scope user gemini-code-context -- npx -y @qmediat.io/gemini-code-context-mcp
```

Once configured, an MCP client can invoke a workspace question such as `gemini-code-context.ask` to summarize the codebase. The package is distributed under the MIT license.

## Tools and capabilities

- `ask`: Ask Gemini a question about the whole workspace.
- `ask_agentic`: Ask about a workspace that is too large to send in full.
- `code`: Submit a coding task to Gemini.
- `status`: Inspect cache state, models, and accumulated cost.
- `reindex`: Scan the workspace again.
- `clear`: Delete the workspace cache.

Together, these tools cover repository analysis, coding assistance, cache inspection, index refreshes, and cache removal.

## Limitations and notes

The server depends on Node.js 22 or newer and requires authentication through a Gemini API key or Vertex AI project. Its context reuse is workspace-based, so changes that need to be reflected in later questions may require `reindex`. Large workspaces should use `ask_agentic` rather than attempting to send the entire workspace in one request. Cost and cache state can be checked with `status` before deciding whether to continue using a configured model.

_Full upstream README: https://allmcps.com/mcp/gemini-code-context-mcp/readme_

