Gemini Code Context MCP logo

Gemini Code Context MCP

Caches a workspace for Gemini-powered code questions, coding tasks, status checks, reindexing, and cache cleanup through MCP.

Install Gemini Code Context MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "gemini-code-context-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@qmediat.io/gemini-code-context-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

gemini-code-context-mcp gives Claude Code and other MCP clients a persistent Gemini-backed view of an entire workspace. It scans a workspace once, reuses the cached context for later questions, and offers an agentic path for workspaces too large to send whole. Use it for codebase-level questions, Gemini coding tasks, cache inspection, and explicit reindexing or cleanup; repeated queries are described as roughly 8x faster and 4x cheaper.

Use cases

  • Ask Gemini to summarize an entire codebase
  • Submit repository-level coding tasks
  • Inspect cached context and accumulated model cost
  • Refresh or remove a workspace cache

Key features

  • Persistent per-workspace context caching
  • Whole-codebase questions through Gemini
  • Agentic questions for oversized workspaces
  • Gemini coding-task tool
  • Cache, model, and cost status reporting
  • Workspace reindexing and cache deletion

Tools6

What Gemini Code Context MCP lets your agent do. Expand a tool for its parameters.

Self-reported~58 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/16 checks healthy over the last 77d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · @qmediat.io/gemini-code-context-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads1.2kPackage downloads in the last 30 days.
Last commit6d agoMost recent push to the default branch.
Tools exposed6Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Gemini Code Context MCP works

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:

Terminal
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:

Terminal
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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Gemini Code Context MCP

gemini-code-context-mcp is an MCP server that connects Claude Code, Claude Desktop, or Cursor to Gemini through a Gemini API key or Vertex AI. Its main tools ask questions about a workspace, handle oversized workspaces agentically, submit coding tasks, report cache status, reindex files, and clear cached context.

Run the package's initialization command, then register it with your MCP client. Use `npx @qmediat.io/gemini-code-context-mcp init` to store a Gemini API key or Vertex AI project, followed by the documented `claude mcp add` command for Claude Code.

Yes, Cursor is listed as a supported client. Configure the server with the package's initialization step and add it to Cursor using its MCP server configuration.

Use the `ask_agentic` tool for a workspace too large to send in full. For ordinary repository questions, `ask` uses the workspace context cache created by the server's scan.

Use `reindex` to scan the workspace again or `clear` to delete that workspace's cache. Use `status` to inspect cache state, configured models, and cost accumulated so far.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGemini Code Context MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/gemini-code-context-mcp?style=directory)](https://allmcps.com/mcp/gemini-code-context-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/gemini-code-context-mcp"><img src="https://allmcps.com/api/badge/gemini-code-context-mcp?style=directory" alt="Gemini Code Context MCP on AllMCPs" /></a>