Gemini MCP Tool

v1.1.4Developer Toolsstable

A Model Context Protocol server that enables AI assistants to interact with Google Gemini CLI, allowing them to leverage Gemini's large token window for analyzing files and codebases using natural language commands.

aiclaudeclicodebase-analysisfile-analysis
Share:
2,221
Stars
0
Downloads
0
Weekly
0/5

What is Gemini MCP Tool?

Gemini MCP Tool is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol server that enables ai assistants to interact with google gemini cli, allowing them to leverage gemini's large token window for analyzing files and codebases using natural langu...

A Model Context Protocol server that enables AI assistants to interact with Google Gemini CLI, allowing them to leverage Gemini's large token window for analyzing files and codebases using natural language commands.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • ask-gemini
  • ping
  • Help
  • brainstorm
  • fetch-chunk

Use Cases

Codebase analysis with Gemini
Leverage large token window for file analysis
jamubc

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.1.4
UpdatedMay 22, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y gemini-mcp-tool

Manual Installation

npx -y gemini-mcp-tool

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Gemini MCP Tool

Gemini MCP Tool is a Model Context Protocol server that bridges Claude and other AI assistants to Google Gemini's CLI, giving them access to Gemini's 1M+ token context window for large-scale file and codebase analysis. When Claude needs to reason over an entire repository, multiple large files, or data that would exceed its own context, it delegates the query to Gemini via this server and receives a synthesized answer back. The server exposes tools including ask-gemini (with @-syntax file references), a sandbox executor for safe code testing, and a connection ping — all driven by natural language prompts.

Prerequisites

  • Node.js v16.0.0 or higher
  • Google Gemini CLI installed and authenticated (gemini CLI available in PATH)
  • A Google account with Gemini API access enabled
  • An MCP-compatible client such as Claude Desktop or Claude Code
1

Install and authenticate the Google Gemini CLI

The MCP server delegates to the gemini CLI binary, so it must be installed and authenticated before the server will work. Follow Google's official Gemini CLI setup to sign in.

npm install -g @google/gemini-cli
gemini auth login
2

Add the MCP server to Claude Code

Use the claude mcp add command to register gemini-mcp-tool so it starts automatically via npx whenever Claude Code launches.

claude mcp add gemini-cli -- npx -y gemini-mcp-tool
3

Or add it manually to the Claude Desktop config file

Open the Claude Desktop configuration file and add the gemini-cli server entry. On macOS the file is at ~/Library/Application Support/Claude/claude_desktop_config.json.

4

Restart your MCP client

After updating the configuration, restart Claude Desktop or reload your Claude Code session so it discovers and connects to the new MCP server.

5

Verify the connection with a ping

Ask Claude to ping the Gemini MCP server to confirm the tool is reachable and the Gemini CLI is responding correctly.

Gemini MCP Tool Examples

Client configuration

Add this block to your Claude Desktop claude_desktop_config.json. The server runs via npx with no additional environment variables required beyond a working gemini CLI authentication.

{
  "mcpServers": {
    "gemini-cli": {
      "command": "npx",
      "args": ["-y", "gemini-mcp-tool"]
    }
  }
}

Prompts to try

Use @ syntax in your prompts to reference specific files or entire directories for Gemini to analyze with its large context window.

- "Use Gemini to analyze @src/ and summarize what each module does."
- "Ask Gemini to review @package.json and @package-lock.json for outdated or vulnerable dependencies."
- "Use the Gemini sandbox to write and run a Python script that parses this CSV data."
- "Have Gemini compare @old-api.ts and @new-api.ts and list breaking changes."
- "Ping Gemini to make sure the MCP connection is working."

Troubleshooting Gemini MCP Tool

ask-gemini tool fails with 'gemini: command not found'

The server shells out to the gemini CLI binary. Run `which gemini` to confirm it's in PATH. If not, install it with `npm install -g @google/gemini-cli` and ensure your npm global bin directory is on your PATH.

Gemini returns authentication errors or 401 responses

Re-authenticate the Gemini CLI with `gemini auth login`. Tokens expire periodically and the MCP server uses the same credential store as the CLI.

Large file analysis times out

The default model is gemini-2.5-pro which handles large contexts but may be slower on very large codebases. Try breaking the analysis into subdirectories using @subdir/ instead of @. for the whole repo.

Frequently Asked Questions about Gemini MCP Tool

What is Gemini MCP Tool?

Gemini MCP Tool is a Model Context Protocol (MCP) server that model context protocol server that enables ai assistants to interact with google gemini cli, allowing them to leverage gemini's large token window for analyzing files and codebases using natural language commands. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Gemini MCP Tool?

Install via npm with the command: npx -y gemini-mcp-tool. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Gemini MCP Tool?

Gemini MCP Tool works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Gemini MCP Tool free to use?

Yes, Gemini MCP Tool is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "gemini-mcp-tool": { "command": "npx", "args": ["-y", "gemini-mcp-tool"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Gemini MCP Tool?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides