IG

infolabai/gemini-cli-mcp

Developer tools

This page was translated automatically. Technical details may differ from the original. View the original

30 stars 1 forks Quality 56 Trend 11MIT

It is a tool that allows Gemini AI to be used as an MCP server in Claude Code.

Overview

It is a tool that allows Gemini AI to be used as an MCP server in Claude Code. 1. : Utilize Gemini's massive context window to analyze large files and directories at once 2. : Save on Claude Code token usage while leveraging Claude Code's powerful features using the free Gemini CLI 3. : Easily integrate into existing Claude Code workflows This server operates using locally installed gemini CLI tools. - Python 3.8+ - uv Package Manager - Gemini CLI CLI Tool UV must be installed at the system level (operating independently of the Python virtual environment): - - Handles large amounts of information for files, directories, and URLs using Gemini - Input: - prompt (string): Prompt to send to Gemini - file_dir_url_path (string): The path to the file, directory, or URL to analyze - working_directory (string): Task directory (required) For Linux, add the following settings to the ~/.claude.json file: : Change /path/to/your/project/ to the path of the downloaded git project.

Overview (machine translated)

English Version

It is a tool that allows Gemini AI to be used as an MCP server in Claude Code.

Key Benefits

  1. Large File Analysis: Utilize Gemini’s massive context window to analyze large files and directories at once
  2. Token Savings: Use the free Gemini CLI to save on Claude Code’s token usage while leveraging its powerful unique features
  3. Easy Integration: Easily integrated into existing Claude Code workflows

This server operates using the locally installed gemini CLI tool.

Prerequisites

  • Python 3.8+
  • UV Package Manager
  • Gemini CLI CLI Tool

Quick Start

1. Storage clone

  • UV installation

UV must be installed at the system level (operating independently of the Python virtual environment):

  • Installation of dependencies:

Tools

  • run_gemini
  • Handle large amounts of information from files, directories, and URLs using Gemini
  • Input:
  • prompt (string): Prompt to send to Gemini
  • file_dir_url_path (string): The path to the file, directory, or URL to analyze
  • working_directory (string): Task directory (required)

Configuration

To use with Claude Code, add the MCP server settings:

For Linux, add the following settings to the ~/.claude.json file:

Note: Change /path/to/your/project/ to the path of the downloaded git project.

Development

  • Run directly on the server (after running, it should be stopped)

  • Testing

  • Debugging

Since the MCP server communicates via stdio, debugging can be difficult. We recommend using MCP Inspector.

  • Points to note

When using subprocess.run, you must use the shell=True option. This is to execute commands through the shell in the MCP server environment. Without this option, you may enter a waiting state when executing Gemini CLI commands.

This page was translated automatically. Technical details may differ from the original.

Install

This server does not publish a one-line install command.

Open the repository installation guide New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "gemini": { "command": "uv", "args": [ "--directory", "/path/to/your/project", "run", "python", "/path/to/your/project/gemini_mcp_server.py" ], "env": {} } } }