- Home
- MCP servers
- Gemini RAG
Gemini RAG
- typescript
6
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"masseater-gemini-rag-mcp": {
"command": "npx",
"args": [
"-y",
"@r_masseater/gemini-rag-mcp"
],
"env": {
"PORT": "3000",
"DEBUG": "false",
"LOG_LEVEL": "info",
"GEMINI_MODEL": "gemini-2.5-pro",
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY",
"STORE_DISPLAY_NAME": "YOUR_STORE_DISPLAY_NAME"
}
}
}
}You can run a Gemini File Search–backed RAG MCP server locally to create and query knowledge bases from uploaded documents. It exposes a simple MCP interface so your AI applications can store, search, and retrieve information from your documents using Gemini’s File Search capability, with a focus on type-safe development and easy transport via stdio or HTTP.
How to use
You connect an MCP client to the server and use the available endpoints to upload documents or text content and then query your knowledge base to retrieve relevant information. Upload files or text to build your knowledge base, then run queries to fetch results that are augmented with retrieved documents. You can select Gemini models via configuration, and you have options to run the MCP server over stdio (default) or HTTP transport. When you configure the client, use the MCP URL or the local stdio channel as your entry point, and pass your API key and store name as environment values to enable document indexing and search.
Recommended workflow: create a new knowledge base by uploading documents, then perform queries against that knowledge base to obtain context-rich responses. Adjust the Gemini model as needed to balance speed and accuracy, and monitor the server logs to ensure healthy operation in production.
How to install
Prerequisites you need before installing this MCP server are: Node.js version 22.10.0 or higher and pnpm version 10.19.0 or higher. You also need a Google API key with Gemini API access.
Install steps you should follow to get started are:
# Install dependencies for the project
pnpm install
# Start in development mode with stdio transport (default)
pnpm run dev
# Start with HTTP transport (hot reload)
pnpm run dev:http
Configuration and startup snippet
Configure the MCP server as shown in the following example. This config is intended for integration with an MCP client (such as Claude Desktop). It runs the server locally via stdio using npx and passes the required environment variables to enable Google Gemini File Search-based knowledge bases.
{
"mcpServers": {
"gemini_rag": {
"command": "npx",
"args": ["-y", "@r_masseater/gemini-rag-mcp"],
"env": {
"GOOGLE_API_KEY": "your_google_api_key_here",
"STORE_DISPLAY_NAME": "your_store_name"
}
}
}
}
Available tools
upload_file
Upload a document file to the knowledge base so it can be indexed and searched by queries.
upload_content
Upload plain text content directly to the knowledge base for indexing and retrieval.
query
Query the knowledge base using retrieval-augmented generation to obtain context-rich answers.