
ogoldberg/gemini-context-mcp-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Gemini의 훨씬 더 큰 컨텍스트 창을 활용한 Cursor용 MCP 서버
개요
강력한 MCP (Model Context Protocol) 서버 구현은 컨텍스트 관리 및 캐싱을위한 Gemini의 기능을 활용합니다. 이 서버는 Gemini의 2M 토큰 컨텍스트 창의 가치를 극대화하고 큰 컨텍스트의 효율적인 캐싱 도구를 제공합니다. - 레버리지 Gemini의 광범위한 컨텍스트 기능 - - 다중 상호 작용을 통해 대화 상태를 유지 - 메타데이터로 추가, 검색 및 컨텍스트 추가 - - semantic similarity를 사용하여 관련 컨텍스트 찾기 - 세션 및 컨텍스트가 자동으로 만료됩니다. - - 효율적으로 큰 시스템 프롬프트 및 지침 재사용 - - 자주 사용되는 컨텍스트에 대한 토큰 사용 비용을 절감 - - 캐시 만료 시간을 제어 - - - 만료 된 캐시는 자동으로 제거됩니다 - 노드.
개요(AI 번역)
강력한 MCP (Model Context Protocol) 서버 구현은 컨텍스트 관리 및 캐싱을위한 Gemini의 기능을 활용합니다. 이 서버는 Gemini의 2M 토큰 컨텍스트 창의 가치를 극대화하고 큰 컨텍스트의 효율적인 캐싱 도구를 제공합니다.
♨ 특징
Context 관리
- 최대 2M 토큰 컨텍스트 윈도우 지원 - Leverage Gemini의 광범위한 컨텍스트 기능
- **Session 기반 대화 ** - 여러 상호 작용을 통해 대화 상태를 유지
- Smart context tracking - 메타데이터로 추가, 검색 및 컨텍스트 추가 -Semantic search - semantic similarity를 사용하여 관련 맥락 찾기 -Automatic context cleanup - 세션 및 컨텍스트가 자동으로 만료됩니다.
API 캐싱
- ** 큰 신속한 캐싱 ** - 효율적으로 대형 시스템 프롬프트 및 지침을 재사용
- CostOptimize - 자주 사용되는 컨텍스트의 토큰 사용 비용을 절감
- TTL 관리 - 캐시 만료 시간 제어
- ** 자동 정리 ** - 자동 캐시가 자동으로 제거됩니다.
빠른 시작
# 필수품
- Node.js 18+ 설치
- Gemini API 키 (여기를 얻으십시오)
설치
기본 사용
MCP 클라이언트 통합
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
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
# 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 in the MCP documentation.
Quick Client Setup
Use our simplified client installation commands:
# Install and configure for Claude Desktop
npm run install:claude
# Install and configure for Cursor
npm run install:cursor
# Install and configure for VS Code
npm run install:vscode
Each command sets up the appropriate configuration files and provides instructions for completing the integration.
💻 Usage Examples
For Beginners
Directly using the server:
-
Start the server:
node dist/mcp-server.js -
Interact using the provided test scripts:
# Test basic context management node test-gemini-context.js # Test caching features node test-gemini-api-cache.js
Using in your Node.js application:
import { GeminiContextServer } from './src/gemini-context-server.js';
async function main() {
// Create server instance
const server = new GeminiContextServer();
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →