ogoldberg_gemini-context-mcp-server

ogoldberg_gemini-context-mcp-server

3.5

Gemini Context MCP Server is a powerful implementation leveraging Gemini's capabilities for context management and caching, maximizing the value of Gemini's 2M token context window.

The Gemini Context MCP Server is designed to efficiently manage and cache large contexts using Gemini's extensive capabilities. It supports a 2M token context window, allowing for session-based conversations and smart context tracking. The server also features semantic search and automatic context cleanup, ensuring that sessions and contexts expire automatically. Additionally, it offers API caching to optimize costs by reusing large system prompts and instructions, with TTL management and automatic cleanup of expired caches. This server is compatible with various MCP-compatible clients, making it versatile for different development environments.

Features

  • {'name': 'Context Management', 'description': 'Supports up to 2M token context window, session-based conversations, smart context tracking, semantic search, and automatic context cleanup.'}
  • {'name': 'API Caching', 'description': 'Efficiently reuses large system prompts, reduces token usage costs, manages TTL, and automatically cleans up expired caches.'}

MCP Tools

  • generate_text: Generate text with context.
  • get_context: Get current context for a session.
  • clear_context: Clear session context.
  • add_context: Add specific context entries.
  • search_context: Find relevant context semantically.
  • mcp_gemini_context_create_cache: Create a cache for large contexts.
  • mcp_gemini_context_generate_with_cache: Generate with cached context.
  • mcp_gemini_context_list_caches: List all available caches.
  • mcp_gemini_context_update_cache_ttl: Update cache TTL.
  • mcp_gemini_context_delete_cache: Delete a cache.

Usage with Different Platforms

Claude Desktop

bash
npm run install:claude

Cursor

bash
npm run install:cursor

VS Code

bash
npm run install:vscode