Gemini MCP Tool
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.
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
Maintainer
Works with
Installation
NPM
npx -y gemini-mcp-toolManual Installation
npx -y gemini-mcp-toolConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 loginAdd 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-toolOr 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.
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.
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.
Gemini MCP Tool Alternatives — Similar Developer Tools Servers
Looking for alternatives to Gemini MCP Tool? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Gemini MCP Tool in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.