Gemini
Enables comprehensive codebase analysis using Google's Gemini CLI and its massive context window. Supports file/directory analysis, security audits, architecture analysis, feature verification, and complete project overviews for large codebases that
What is Gemini?
Gemini is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables comprehensive codebase analysis using google's gemini cli and its massive context window. supports file/directory analysis, security audits, architecture analysis, feature verification, and co...
Enables comprehensive codebase analysis using Google's Gemini CLI and its massive context window. Supports file/directory analysis, security audits, architecture analysis, feature verification, and complete project overviews for large codebases that
This server falls under the Coding Agents and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Enables comprehensive codebase analysis using Google's Gemin
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx gemini-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Gemini
The Gemini MCP Server (PAL MCP Server) bridges Claude Code, Gemini CLI, or Codex CLI with Google's Gemini models and their massive context windows to perform large-scale codebase analysis that exceeds what fits in a single model context. It exposes tools for architecture analysis, security audits, feature verification, and complete project overviews by delegating to Gemini's multi-million token context via the Gemini API. Developers working on large monorepos or legacy codebases use it to get instant architectural insights, dependency maps, and security findings without manually chunking files.
Prerequisites
- Python 3.10 or newer
- Git installed on your system
- uv package manager (install from https://docs.astral.sh/uv/getting-started/installation/)
- A Google Gemini API key (GEMINI_API_KEY) from https://aistudio.google.com/
- Claude Desktop, Claude Code, or another MCP-compatible client
Clone the repository
Clone the PAL MCP Server repository which powers the Gemini MCP integration.
git clone https://github.com/BeehiveInnovations/pal-mcp-server.git
cd pal-mcp-serverSet your Gemini API key
Export your Google Gemini API key as an environment variable. You can get a free key from Google AI Studio at https://aistudio.google.com/apikey.
export GEMINI_API_KEY=your-gemini-api-key-hereRun the automatic setup script
Run the included setup script which installs dependencies, configures the server, and auto-registers it with Claude Desktop, Claude Code, and Gemini CLI.
./run-server.shOr configure manually via uvx
Alternatively, add the server directly to your MCP client configuration using uvx to pull the package from GitHub. Set DISABLED_TOOLS to control which tools are active.
{
"mcpServers": {
"pal": {
"command": "bash",
"args": ["-c", "for p in $(which uvx 2>/dev/null) $HOME/.local/bin/uvx /opt/homebrew/bin/uvx /usr/local/bin/uvx uvx; do [ -x \"$p\" ] && exec \"$p\" --from git+https://github.com/BeehiveInnovations/pal-mcp-server.git pal-mcp-server; done; echo 'uvx not found' >&2; exit 1"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here",
"DISABLED_TOOLS": "analyze,refactor,testgen,secaudit,docgen,tracer",
"DEFAULT_MODEL": "auto"
}
}
}
}Enable codebase analysis tools
The analyze, secaudit, and related tools are disabled by default. Enable them by removing their names from the DISABLED_TOOLS environment variable in your config.
# In your .env file or MCP config env block:
DISABLED_TOOLS=refactor,testgen,docgen,tracer
# analyze and secaudit are now enabledGemini Examples
Client configuration
MCP configuration using uvx to run the PAL server with Gemini API access and codebase analysis tools enabled.
{
"mcpServers": {
"pal": {
"command": "bash",
"args": ["-c", "uvx --from git+https://github.com/BeehiveInnovations/pal-mcp-server.git pal-mcp-server"],
"env": {
"GEMINI_API_KEY": "your-gemini-api-key-here",
"DISABLED_TOOLS": "refactor,testgen,docgen,tracer",
"DEFAULT_MODEL": "auto"
}
}
}
}Prompts to try
Example prompts leveraging Gemini's large context window for codebase analysis and security auditing.
- "Use pal to analyze the entire src/ directory architecture with Gemini Pro"
- "Run a security audit on this codebase using the secaudit tool with gemini-pro"
- "Get a complete project overview of this monorepo and identify the main entry points"
- "Use pal to review this pull request diff with o3 and then verify the changes with Gemini"
- "Use the consensus tool to get opinions from multiple AI models on this API design"Troubleshooting Gemini
Server fails to start with 'uvx not found' error
Install uv by running 'curl -LsSf https://astral.sh/uv/install.sh | sh' and ensure ~/.local/bin is on your PATH. Then restart your terminal and try again.
Gemini API calls fail with authentication errors
Verify your GEMINI_API_KEY is set correctly. Get a key from https://aistudio.google.com/apikey. Make sure the key is passed in the env block of your MCP config, not just exported in your shell, since MCP clients may not inherit shell environment variables.
The analyze or secaudit tools are not available
These tools are disabled by default. Remove 'analyze' and 'secaudit' from the DISABLED_TOOLS environment variable in your MCP configuration and restart the server.
Frequently Asked Questions about Gemini
What is Gemini?
Gemini is a Model Context Protocol (MCP) server that enables comprehensive codebase analysis using google's gemini cli and its massive context window. supports file/directory analysis, security audits, architecture analysis, feature verification, and complete project overviews for large codebases that It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Gemini?
Follow the installation instructions on the Gemini GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Gemini?
Gemini works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Gemini free to use?
Yes, Gemini is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.
Gemini Alternatives — Similar Coding Agents Servers
Looking for alternatives to Gemini? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
Browse More Coding Agents MCP Servers
Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Gemini 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?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.