Connects Claude to Google's Gemini File Search API for document storage and retrieval augmented generation. You get 12 tools covering the full lifecycle: create stores, upload text or PDFs with custom metadata and chunking configs, import existing Gemini files, track async operation status, and query documents with any Gemini model using metadata filters. Runs via npx in stdio mode for Claude Desktop and Cursor, or as an HTTP server on port 3000 for remote deployments. Requires a Gemini API key from AI Studio. Useful when you need Claude to build and query knowledge bases backed by Gemini's RAG infrastructure instead of rolling your own document pipeline.
MCP (Model Context Protocol) server for Google's Gemini File Search (RAG). Manage file search stores, upload documents, and query with RAG through 12 tools.
Works with Claude Desktop, Cursor, VS Code, and any MCP client.
Add to claude_desktop_config.json:
{
"mcpServers": {
"gemini-rag": {
"command": "npx",
"args": ["-y", "@node2flow/gemini-file-search-rag-mcp"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key"
}
}
}
}
Add to MCP settings:
{
"mcpServers": {
"gemini-rag": {
"command": "npx",
"args": ["-y", "@node2flow/gemini-file-search-rag-mcp"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key"
}
}
}
}
For remote deployment or shared access:
GEMINI_API_KEY=your_key npx @node2flow/gemini-file-search-rag-mcp --http
Server starts on port 3000 (configurable via PORT env var). MCP endpoint: http://localhost:3000/mcp
| Environment Variable | Required | Description |
|---|---|---|
GEMINI_API_KEY | Yes | Google Gemini API key (get one here) |
PORT | No | Port for HTTP server (default: 3000, only used with --http) |
| Tool | Description |
|---|---|
gemini_create_store | Create a new file search store |
gemini_list_stores | List all file search stores |
gemini_get_store | Get store details |
gemini_delete_store | Delete a store (with optional force) |
| Tool | Description |
|---|---|
gemini_upload_to_store | Upload content directly to a store (text, base64) |
gemini_import_file_to_store | Import an existing Gemini file into a store |
| Tool | Description |
|---|---|
gemini_get_operation | Check status of a store operation |
gemini_get_upload_operation | Check status of an upload operation |
| Tool | Description |
|---|---|
gemini_list_documents | List documents in a store |
gemini_get_document | Get document details |
gemini_delete_document | Delete a document from a store |
| Tool | Description |
|---|---|
gemini_rag_query | Query documents using RAG with Gemini models |
GEMINI_API_KEYgit clone https://github.com/node2flow-th/gemini-files-search-rag-mcp-community.git
cd gemini-files-search-rag-mcp-community
npm install
npm run build
# Run in stdio mode
GEMINI_API_KEY=your_key npm start
# Run in dev mode (hot reload)
GEMINI_API_KEY=your_key npm run dev
# Run in HTTP mode
GEMINI_API_KEY=your_key npm start -- --http
MIT License - see LICENSE
Copyright (c) 2026 Node2Flow
io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage
io.github.mikerawsonnz/llm-orchestration-agent
io.github.mikerawsonnz/authenticated-llm-agent
labforgedev/copilot-memory-mcp
csoai-org/agent-prompt-injection-firewall-mcp
io.github.mikerawsonnz/authenticated-multi-llm-agent