gemini -tool
MCP server that enables AI assistants to interact with Google Gemini CLI, leveraging Gemini's massive token window for large file analysis and codebase understanding
claude mcp add --transport stdio jamubc-gemini-mcp-tool npx -y gemini-mcp-tool
How to use
Gemini MCP Tool is an MCP server that bridges Claude/AI assistants with the Google Gemini Command Line Interface. It enables large, token-efficient analysis by delegating heavy lifting to Gemini within the MCP workflow. The server exposes tools tailored for Gemini interactions, including asking Gemini for its perspective, sandboxed code testing, and quick help utilities. Use it to analyze large files or codebases, explain complex snippets, search for information, or generate insights directly inside Claude Code or other MCP clients.
Once the MCP server is running (via npx gemini-mcp-tool or a global install), you can interact with Gemini through the server’s tools: ask-gemini to request Gemini’s analysis or perspective on a prompt or file reference; sandbox to run code or commands in Gemini’s sandbox environment; Ping to verify connectivity; and Help to view CLI-like guidance. You can reference files using the @ syntax in prompts (e.g., @src/main.js) to have Gemini examine or explain specific parts of your project. The MCP tooling is designed to minimize token usage in your main prompt by letting Gemini handle heavy analysis within its own environment.
Typical usage flows include: configuring the MCP server in your Claude Desktop or MCP client with the npx-based command, then in Claude Code or other clients invoking analyze or the slash commands to prompt Gemini via the server. For workflows involving large codebases or datasets, use prompts that leverage the @file references to keep prompts concise while extending Gemini’s analysis window.
How to install
Prerequisites
- Node.js v16.0.0 or higher
- Access to the Gemini CLI (Google Gemini) and its authentication/configuration
Installation options Option A: Run without installing locally (recommended for quick use)
npx -y gemini-mcp-tool
Option B: Install globally and run via CLI when desired
npm install -g gemini-mcp-tool
# Run (depending on your MCP client workflow)
gemini-mcp-tool
Configuration (example for Claude Desktop)
- Add MCP server to Claude Desktop config using the npx approach:
{
"mcpServers": {
"gemini-cli": {
"command": "npx",
"args": ["-y", "gemini-mcp-tool"]
}
}
}
- If you install globally, configure as follows:
{
"mcpServers": {
"gemini-cli": {
"command": "gemini-mcp-tool"
}
}
}
Verify installation
- In Claude Code or your MCP client, run a test command such as invoking /ping or /help to ensure the server responds.
Additional notes
Tips and common issues:
- Ensure Node.js is installed and accessible in your PATH.
- The Gemini CLI must be installed and configured separately; the MCP tool acts as a bridge to Gemin i via MCP prompts.
- When using the npx setup, you don’t need a local install; the command downloads and runs the tool on demand.
- If you experience authentication or network issues with Gemini CLI, verify your Gemini credentials and network access from the environment running the MCP server.
- In Claude Desktop, after updating mcpServers, restart your terminal session or reload Claude to pick up the new configuration.
- You can reference files with the @ syntax to leverage Gemini’s analysis window effectively while keeping prompts concise.
Related MCP Servers
openapi
OpenAPI definitions, converters and LLM function calling schema composer.
Alph
Universal MCP Server Configuration Manager
mcp-config-manager
Manage MCP server configs across Claude, Gemini & other AI systems. Interactive CLI for server enable/disable, preset management & config sync.
docmole
Dig through any documentation with AI - MCP server for Claude, Cursor, and other AI assistants
phabricator
MCP server for Phabricator
obsidian
MCP server for Obsidian vault management - enables Claude and other AI assistants to read, write, search, and organize your notes