document-sync-mcp
v0.1.7
Published
MCP Server for Gemini File Search
Maintainers
Readme
Gemini File Search MCP Server
This is a Model Context Protocol (MCP) server that allows AI agents to query your local project files using Google's Gemini File Search API.
It automatically detects your project configuration from the document-sync.json file created by the Gemini File Sync VS Code extension.
Prerequisites
- Node.js: Ensure Node.js is installed.
- Gemini API Key: You need a valid API Key from Google AI Studio.
- Project Configuration: You must have run the Gemini File Sync extension in your project at least once to generate the
document-sync.jsonfile in your project root.
Installation
You can install this server directly from npm:
npm install -g document-sync-mcpOr run it directly with npx:
npx document-sync-mcpRunning the Server
Environment Variables
GEMINI_API_KEY: Required. Your Google Gemini API Key.PROJECT_PATH: Optional. Absolute path to your project root. Use this if the server cannot finddocument-sync.jsonautomatically (e.g., when running from a different directory).
Manual Run
export GEMINI_API_KEY="your_api_key_here"
npx document-sync-mcpAdding to Claude Desktop
To use this server with Claude Desktop, add the following to your claude_desktop_config.json (usually located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"gemini-file-search": {
"command": "npx",
"args": [
"-y",
"document-sync-mcp"
],
"env": {
"GEMINI_API_KEY": "your_api_key_here"
}
}
}
}Adding to Cursor
- Open Cursor Settings.
- Navigate to Features > MCP.
- Click Add New MCP Server.
- Name:
gemini-file-search(or any name you prefer). - Type:
command. - Command:
npx -y document-sync-mcp - Environment Variables:
- Key:
GEMINI_API_KEY - Value:
your_api_key_here
- Key:
Available Tools
ask_project(query: string, projectName?: string): Ask a question about the current project.query: The question to ask.projectName: (Optional) The name of the project. If provided, the server uses this name to find files. If not provided, it attempts to finddocument-sync.jsonin the current or parent directories.
