MCP Gemini MCP Server
MCP server for Google Gemini AI - text, image, video, research, and more
MCP Gemini scores 36 (Limited), licensed AGPL-3.0 and written in Python. It installs as a local process. It declares 39 tools. Filed under Design. GitHub shows 0 stars. Package registries report about 135 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Limited trust
36 of 100 from six public signals. Nobody can buy a point.
- OSI-style license: agpl-3.0.
License, quality and maintenance
License: Grade C
AGPL-3.0 is a strong copyleft license: derived works must use the same license.
How license is gradedQuality: Grade A
85/100 for listing completeness. Lost points: 19 of 39 tools barely described, short summary.
How quality is graded
Where the 36 comes from
0 + 6 + 3 + 10 + 10 + 7 = 36. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 0 of 30 points.How recently the repository saw a commit or release.
Maintenance: 6 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 3 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 10 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "crunchtools-mcp-gemini": { "command": "uvx", "args": [ "mcp-gemini-crunchtools" ] } }}
Environment variables
This server does not declare environment variables.
Tools39Tool docs quality grade D
All capabilitiesAnalyze code for security, performance, bugs
Analyze PDFs, DOCX, TXT, etc.
Analyze and describe local image files
Analyze text for sentiment, tone, content
Analyze one or more URLs
Generate creative ideas on a topic
Check research operation status
Check video generation status
Compare two URLs
Continue editing in an active session
Count tokens in content
Create content cache for repeated queries
About
MCP Gemini CrunchTools
A secure MCP (Model Context Protocol) server for Google Gemini AI - text, image, video, research, and more.
Overview
This MCP server is designed to be:
- Secure by default - STRIDE threat model (see SECURITY.md), Pydantic input validation, and the API key held as a
SecretStrto prevent accidental logging - No third-party services - Runs locally via stdio, your API key never leaves your machine
- Cross-platform - Works on Linux, macOS, and Windows
- Automatically updated - GitHub Actions monitor for CVEs and update dependencies
- Containerized - Available at
quay.io/crunchtools/mcp-geminibuilt on Hummingbird Python base image
Naming Convention
| Component | Name |
|---|---|
| GitHub repo | crunchtools/mcp-gemini |
| Container | quay.io/crunchtools/mcp-gemini |
| Python package (PyPI) | mcp-gemini-crunchtools |
| CLI command | mcp-gemini-crunchtools |
| Module import | mcp_gemini_crunchtools |
Why Hummingbird?
The container image is built on the Hummingbird Python base image from Project Hummingbird, which provides:
- Minimal CVE exposure - Hummingbird images are built with a minimal package set, dramatically reducing the attack surface compared to general-purpose images
- Regular updates - Security patches are applied promptly, keeping CVE counts low
- Optimized for Python - Pre-configured Python environment with uv package manager for fast, reproducible builds
- Production-ready - Designed for production workloads with proper signal handling and non-root user defaults
This means your MCP server runs in a hardened environment with fewer vulnerabilities than typical Python container images.
Features
Query Tools (5 tools)
gemini_query- Query Gemini with optional Google Search groundinggemini_brainstorm- Generate creative ideas on a topicgemini_analyze_code- Analyze code for security, performance, bugsgemini_analyze_text- Analyze text for sentiment, tone, contentgemini_summarize- Summarize content in various formats
Image Generation (4 tools)
gemini_generate_image- Generate images from text prompts (native Gemini)gemini_generate_image_with_input- Edit/modify existing imagesgemini_image_prompt- Craft effective image generation promptsgemini_imagen_generate- Generate images using Google Imagen 4 models
Image Editing (4 tools)
gemini_start_image_edit- Start a multi-turn image editing sessiongemini_continue_image_edit- Continue editing in an active sessiongemini_end_image_edit- End an image editing sessiongemini_list_image_sessions- List all active editing sessions
Image Analysis (1 tool)
gemini_analyze_image- Analyze and describe local image files
Search Tools (1 tool)
gemini_search- Web search using Gemini with Google Search grounding
Document Tools (3 tools)
gemini_analyze_document- Analyze PDFs, DOCX, TXT, etc.gemini_summarize_pdf- Summarize PDF documentsgemini_extract_tables- Extract tables from documents
URL Tools (3 tools)
gemini_analyze_url- Analyze one or more URLsgemini_compare_urls- Compare two URLsgemini_extract_from_url- Extract specific data from a URL
Video Tools (2 tools)
gemini_generate_video- Generate videos using Veogemini_check_video- Check video generation status
YouTube Tools (2 tools)
gemini_youtube- Analyze YouTube videosgemini_youtube_summary- Summarize YouTube videos
Voice Tools (3 tools)
gemini_speak- Convert text to speechgemini_dialogue- Generate multi-voice dialogue audiogemini_list_voices- List available voices
Research Tools (3 tools)
gemini_deep_research- Perform multi-step web researchgemini_check_research- Check research operation statusgemini_research_followup- Ask follow-up questions
Cache Tools (4 tools)
gemini_create_cache- Create content cache for repeated queriesgemini_query_cache- Query cached contentgemini_list_caches- List all active cachesgemini_delete_cache- Delete a cache
Structured Output Tools (2 tools)
gemini_structured- Get structured JSON outputgemini_extract- Extract structured data from text
Token Tools (1 tool)
gemini_count_tokens- Count tokens in content
Code Execution Tools (1 tool)
gemini_run_code- Execute Python code via Gemini
Total: 39 tools
Installation
With uvx (Recommended)
uvx mcp-gemini-crunchtools
With pip
pip install mcp-gemini-crunchtools
With Container
# Create a shared output directory (required before first run)
mkdir -p ~/.local/share/mcp-uploads-downloads
podman run -v ~/.local/share/mcp-uploads-downloads:/output:z \
-e GEMINI_API_KEY=your_key \
-e GEMINI_OUTPUT_DIR=/output \
quay.io/crunchtools/mcp-gemini
SELinux note: Use
:z(lowercase, shared) instead of:Z(uppercase, private). MCP servers run as long-lived stdio processes. With:Z, files copied into the directory after container start won't have the container's private MCS label and will be invisible inside the container. The:zflag sets a sharedcontainer_file_tcontext that all containers and the host can read/write.Tip: Use the same shared directory (
~/.local/share/mcp-uploads-downloads/) across multiple MCP container servers (e.g., mcp-gemini and mcp-wordpress) so generated images are immediately available for WordPress upload without copying.
Configuration
Creating a Google Gemini API Key
-
Navigate to Google AI Studio
- Go to https://aistudio.google.com/apikey
- Sign in with your Google account
-
Create API Key
- Click "Get API key" or "Create API key"
- Select a Google Cloud project or create a new one
- Click "Create API key in new project" (or select existing project)
-
Copy Your API Key
- IMPORTANT: Copy the API key immediately - store it securely!
- The key starts with
AI...(e.g.,AIzaSy...)
Add to Claude Code
claude mcp add mcp-gemini-crunchtools \
--env GEMINI_API_KEY=your_api_key_here \
-- uvx mcp-gemini-crunchtools
Or for the container version:
# Create a shared output directory (required before first run)
mkdir -p ~/.local/share/mcp-uploads-downloads
claude mcp add mcp-gemini-crunchtools \
--env GEMINI_API_KEY=your_api_key_here \
--env GEMINI_OUTPUT_DIR=/output \
-- podman run -i --rm \
-v ~/.local/share/mcp-uploads-downloads:/output:z \
-e GEMINI_API_KEY \
-e GEMINI_OUTPUT_DIR=/output \
quay.io/crunchtools/mcp-gemini
Keep the API key out of config files (GEMINI_API_KEY_FILE)
--env GEMINI_API_KEY=... stores the key in plaintext in Claude Code's config,
and -e GEMINI_API_KEY exposes it in podman inspect. Instead, store the key in
a file and pass only its path. GEMINI_API_KEY takes precedence; the file is
read only when it is unset.
mkdir -p ~/.config/mcp-gemini && chmod 700 ~/.config/mcp-gemini
( umask 077; read -rsp "Gemini API key: " key && printf '%s' "$key" > ~/.config/mcp-gemini/api-key; rc=$?; unset key; exit $rc )
claude mcp add mcp-gemini-crunchtools \
--env GEMINI_API_KEY_FILE=$HOME/.config/mcp-gemini/api-key \
-- uvx mcp-gemini-crunchtools
# Containers: mount as a read-only secret
podman run -i --rm \
-v ~/.config/mcp-gemini/api-key:/run/secrets/api-key:ro,z \
-e GEMINI_API_KEY_FILE=/run/secrets/api-key \
quay.io/crunchtools/mcp-gemini
Optional: Set Output Directory (non-container)
For generated images, audio, and videos when running without a container:
claude mcp add mcp-gemini-crunchtools \
--env GEMINI_API_KEY=your_api_key_here \
--env GEMINI_OUTPUT_DIR=$HOME/.local/share/mcp-uploads-downloads \
-- uvx mcp-gemini-crunchtools
Usage Examples
Query with Google Search
User: What are the latest developments in quantum computing?
Assistant: [calls gemini_query with use_google_search=true]
Generate an Image
User: Generate a photorealistic image of a sunset over mountains
Assistant: [calls gemini_generate_image with prompt and style]
Analyze a PDF Document
User: Analyze this research paper at /path/to/paper.pdf
Assistant: [calls gemini_analyze_document with file_path]
Summarize a YouTube Video
User: Summarize this YouTube video: https://youtube.com/watch?v=...
Assistant: [calls gemini_youtube_summary with url]
Deep Research
User: Research the environmental impact of electric vehicles
Assistant: [calls gemini_deep_research then gemini_check_research]
Code Analysis
User: Analyze this Python code for security issues
Assistant: [calls gemini_analyze_code with focus="security"]
Security
This server was designed with security as a primary concern. See SECURITY.md for:
- Threat model and attack vectors
- Defense in depth architecture
- API key handling best practices
- Input validation rules
- Audit logging
Key Security Features
-
API Key Protection
- Stored as SecretStr (never accidentally logged)
- Environment variable only (never in files or args)
- Sanitized from all error messages
-
Input Validation
- Pydantic models for all inputs
- File path validation
- URL validation
- Strict format validation
-
API Hardening
- Hardcoded API base URL (prevents SSRF)
- TLS certificate validation
- Request timeouts
- Response size limits
-
Automated CVE Scanning
- GitHub Actions scan dependencies weekly
- Automatic PRs for security updates
- Dependabot alerts enabled
Development
Setup
git clone https://github.com/crunchtools/mcp-gemini.git
cd mcp-gemini
uv sync
Run Tests
uv run pytest
Lint and Type Check
uv run ruff check src tests
uv run mypy src
Build Container
podman build -t mcp-gemini .
License
AGPL-3.0-or-later
Contributing
Contributions welcome! Please read SECURITY.md before submitting security-related changes.
Links
Frequently asked questions
What is MCP Gemini MCP Server?
MCP server for Google Gemini AI - text, image, video, research, and more
How do I install MCP Gemini MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. MCP Gemini MCP Server runs locally from the PyPI package mcp-gemini-crunchtools with the command uvx mcp-gemini-crunchtools.
Is MCP Gemini MCP Server free and open source?
Yes. MCP Gemini MCP Server is released under the AGPL-3.0 license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does MCP Gemini MCP Server support remote (HTTP) connections?
No remote endpoint is listed for MCP Gemini MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does MCP Gemini MCP Server provide?
MCP Gemini MCP Server provides 39 tools, including gemini_analyze_code, gemini_analyze_document, gemini_analyze_image, and gemini_analyze_text. See the full tool list for descriptions and parameters.
How is MCP Gemini MCP Server's trust score calculated?
MCP Gemini MCP Server scores 36 out of 100 (Limited). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.