home / mcp / gemini mcp server
Wraps Gemini CLI as an MCP server to analyze large inputs via Claude Code and Gemini CLI with easy local integration.
Configuration
View docs{
"mcpServers": {
"infolabai-gemini-cli-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/project",
"run",
"python",
"/path/to/your/project/gemini_mcp_server.py"
]
}
}
}Gemini MCP Server lets you invoke the Gemini CLI from an MCP client to analyze large files, directories, or URLs within Claude Code. It leverages Gemini’s extensive context window and provides a straightforward integration path for your local workflows.
You connect to the Gemini MCP Server from your MCP client by using the configured stdio server. The server exposes a tool named run_gemini that you call with a prompt for Gemini and a file_dir_url_path pointing to the target item. The server executes the Gemini CLI under the hood and returns Gemini’s output. Use this to summarize, analyze, or extract information from large inputs, while keeping your local Claude Code workflow intact.
Prerequisites you need before starting:
- Python 3.8+
- uv package manager
- Gemini CLI tool
Step by step commands
git clone https://github.com/InfolabAI/gemini-cli-mcp.git
cd gemini-cli-mcp
```
```bash
# Linux/macOS (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
```
```bash
# macOS Homebrew
brew install uv
```
```bash
# Windows PowerShell
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```
```bash
# 설치 확인
uv --version
```
```bash
uv syncTo enable the Gemini MCP Server in Claude Code, add the following MCP server configuration in your local environment. This example uses the uv runtime to execute a Python script that runs the Gemini CLI.
{
"mcpServers": {
"gemini": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/project",
"run",
"python",
"/path/to/your/project/gemini_mcp_server.py"
],
"env": {}
}
}
}Tool exposed by the MCP server that runs the Gemini CLI with a given prompt and path (file, directory, or URL) and returns the Gemini output.