Gemini Context MCP Server

by MCP-Mirror

322 downloads
Not rated
GitHub

About

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.

Details

Author
MCP-Mirror
Downloads
322
Categories
AI

- 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

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Gemini Context MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

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.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

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

Gemini Context MCP Server

A powerful MCP (Model Context Protocol) server implementation that leverages Gemini's capabilities for context management and caching. This server maximizes the value of Gemini's 2M token context window while providing tools for efficient caching of large contexts.

🚀 Features

Context Management

- Up to 2M token context window support - Leverage Gemini's extensive context capabilities - Session-based conversations - Maintain conversational state across multiple interactions - Smart context tracking - Add, retrieve, and search context with metadata - Semantic search - Find relevant context using semantic similarity - Automatic context cleanup - Sessions and context expire automatically

API Caching

- Large prompt caching - Efficiently reuse large system prompts and instructions - Cost optimization - Reduce token usage costs for frequently used contexts - TTL management - Control cache expiration times - Automatic cleanup - Expired caches are removed automatically

🏁 Quick Start

Prerequisites

- Node.js 18+ installed - Gemini API key (Get one here)

Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.