MCP.so
Sign In

Gemini Context MCP Server

@MCP-Mirror

About Gemini Context MCP Server

Mirror of

Basic information

Category

AI & Agents

Runtime

node

Transports

stdio

Publisher

MCP-Mirror

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "ogoldberg_gemini-context-mcp-server": {
      "command": "node",
      "args": [
        "dist/mcp-server.js"
      ]
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Gemini Context MCP Server?

An MCP server that leverages Gemini’s capabilities for context management and caching. It maximizes Gemini’s 2M token context window while providing tools for efficient reuse of large prompts and session-based conversation state.

How to use Gemini Context MCP Server?

Install via npm, configure a Gemini API key in a .env file, build with npm run build, then start with node dist/mcp-server.js. Integrate with MCP-compatible clients (Claude Desktop, Cursor, VS Code) using the included quick-setup commands or manual configuration. Use the provided MCP tools for context management and caching.

Key features of Gemini Context MCP Server

  • Up to 2M token context window support
  • Session-based conversations with automatic context cleanup
  • Semantic search for finding relevant context
  • Large prompt caching with TTL management
  • Cost optimization for frequently used contexts
  • Easy integration with Claude Desktop, Cursor, and VS Code

Use cases of Gemini Context MCP Server

  • Maintain long conversational histories without losing context
  • Cache large system prompts to reduce token costs
  • Build AI applications that need persistent session state
  • Enable cost-efficient technical support or documentation assistants

FAQ from Gemini Context MCP Server

How does context management work?

Sessions maintain conversational state across interactions. You can add, retrieve, search, and clear context entries, and unused sessions expire automatically.

What caching capabilities are provided?

The server supports creating named caches for large prompts with configurable TTL. You can generate responses from a cache, list caches, update their TTL, and delete them when no longer needed.

What are the runtime requirements?

Node.js 18+ is required, and a Gemini API key must be provided. The server runs locally and can be integrated with any MCP-compatible client.

How can I connect this server to Cursor or Claude Desktop?

Quick-setup commands (npm run install:claude, npm run install:cursor, npm run install:vscode) configure the server automatically. Manual integration is also supported via MCP configuration files.

Where does session and cache data live?

Sessions and caches are stored in memory and expire after a configurable timeout (default 120 minutes). Persistent storage and vector search are planned future improvements.

Comments

More AI & Agents MCP servers