Gemini

v1.0.0Coding Agentsstable

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

gemini-mcp-servermcpai-integration
Share:
11,556
Stars
0
Downloads
0
Weekly
0/5

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

Codebase analysis with large context windows
Security audits and architecture review
Complete project overviews
LicenseNOASSERTION
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx gemini-mcp-server

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

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
1

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-server
2

Set 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-here
3

Run 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.sh
4

Or 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"
      }
    }
  }
}
5

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 enabled

Gemini 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.

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.

Quick Config Preview

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

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

Read the full setup guide →

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.

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