Atlas / MCP servers / ogoldberg / Gemini Context

Gemini ContextSAFE

mcp/ogoldberg/gemini-context

MCP server for Cursor that leverages Gemini's much larger context window to enhance the capabilities of the AI tools

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
12 7r · 3w · 2d
Transport
stdio
License
—
Stars
30
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

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

Installation

# Clone the repository
git clone https://github.com/ogoldberg/gemini-context-mcp-server
cd gemini-context-mcp-server

# Install dependencies
npm install

# Copy environment variables example
cp .env.example .env

# Add your Gemini API key to .env file
# GEMINI_API_KEY=your_api_key_here

Basic Usage

# Build the server
npm run build

# Start the server
node dist/mcp-server.js

MCP Client Integration

This MCP server can be integrated with various MCP-compatible clients:

  • Claude Desktop - Add as an MCP server in Claude settings
  • Cursor - Configure in Cursor's AI/MCP settings
  • VS Code - Use with MCP-compatible extensions

For detailed integration instructions with each client, see the [MCP Client Configuration Guide](README-MCP.md#-configuring-with-popu

Read from source at commit 16c6b5c8a911OBSERVED · 2026-10-08
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add gemini-context-mcp --env GEMINI_API_KEY=${GEMINI_API_KEY} --env GEMINI_INPUT_TOKEN_LIMIT=${GEMINI_INPUT_TOKEN_LIMIT} --env GEMINI_MAX_OUTPUT_TOKENS=${GEMINI_MAX_OUTPUT_TOKENS} --env MAX_TOKENS_PER_SESSION=${MAX_TOKENS_PER_SESSION} -- npx -y @utilities/[email protected]
claude-desktop
{
  "mcpServers": {
    "gemini-context-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@utilities/[email protected]"
      ],
      "env": {
        "GEMINI_API_KEY": "${GEMINI_API_KEY}",
        "GEMINI_INPUT_TOKEN_LIMIT": "${GEMINI_INPUT_TOKEN_LIMIT}",
        "GEMINI_MAX_OUTPUT_TOKENS": "${GEMINI_MAX_OUTPUT_TOKENS}",
        "MAX_TOKENS_PER_SESSION": "${MAX_TOKENS_PER_SESSION}"
      }
    }
  }
}
03

Exposed tools (12)

7 read · 3 write · 2 destructive. Blast radius: 2 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
add_contextwriteAdd a new entry to the context
clear_contextdestructiveClear the context for a session
discover_capabilitiesreadReturns a manifest describing all capabilities of this MCP server
generate_textreadGenerate text using Gemini with context management
get_contextreadRetrieve the current context for a session
get_tool_helpreadGet detailed help and examples for a specific tool
mcp_gemini_context_create_cachewriteCreate a cache for frequently used large contexts
mcp_gemini_context_delete_cachedestructiveDeletes a cache
mcp_gemini_context_generate_with_cachereadGenerate content using a cached context
mcp_gemini_context_list_cachesreadList all available caches
mcp_gemini_context_update_cache_ttlwriteUpdates a cache\
search_contextreadSearch for relevant context using semantic similarity
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (1 observation(s))
Network
declared (2 observation(s))
Shell
declared (2 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (5)

MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
clear_context, mcp_gemini_context_delete_cache
Why it matters. 2 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenance · inv.no_license · CWE-1104
Why it matters. no LICENSE file and no repo licence
Fix. add a licence
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@google/generative-ai, @modelcontextprotocol/sdk, commander, dotenv, lodash-es, zod, @jest/globals, @types/commander
Why it matters. 14 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWPrompt injection · prompt.credential_read · CWE-94, CWE-1427
instructions.md:3352
load_dotenv()  # load environment variables from .env
Why it matters. asks the agent to read credentials
LOWSupply chain · prompt.pipe_to_shell · CWE-829, CWE-1357
instructions.md:4741
curl -LsSf https://astral.sh/uv/install.sh | sh

Gates applied: no_behavioural_pass, no_license.

Audited 2026-10-08 · audit v0.4.1 · source sha 16c6b5c8a911full audit observations/trust-audit/mcp-server/ogoldberg__gemini-context.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-0816c6b5c8a911SAFEB89first audit
06

Questions

What is the Gemini Context MCP server?

MCP server for Cursor that leverages Gemini's much larger context window to enhance the capabilities of the AI tools

What tools does Gemini Context expose?

12 in total: 7 read-only, 3 that write, and 2 that can delete or overwrite (clear_context, mcp_gemini_context_delete_cache). Every one is listed on this page with its risk.

Is Gemini Context safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 2 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does Gemini Context need?

It reads GEMINI_API_KEY, GEMINI_INPUT_TOKEN_LIMIT, GEMINI_MAX_OUTPUT_TOKENS and MAX_TOKENS_PER_SESSION from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does Gemini Context run?

It speaks stdio, so it runs as a local process your client starts. It is published on npm as @utilities/gemini-context-mcp at 1.0.0.

How current is this page?

The grade is for one exact copy of the source (16c6b5c8a911), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement