MCP Gemini CrunchTools
Provides tools for querying Gemini, generating images, analyzing documents, videos, and URLs, performing web research, managing caches, and more via the Google Gemini API.
Provides tools to analyze and summarize YouTube videos.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Gemini CrunchToolsSummarize the key points from this PDF document"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 - Comprehensive threat modeling, input validation, and API key protection
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
Related MCP server: Gemini Research MCP Server
Naming Convention
Component | Name |
GitHub repo | |
Container |
|
Python package (PyPI) |
|
CLI command |
|
Module import |
|
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-crunchtoolsWith pip
pip install mcp-gemini-crunchtoolsWith 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-geminiSELinux 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
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-crunchtoolsOr 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-geminiOptional: 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-crunchtoolsUsage 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 syncRun Tests
uv run pytestLint and Type Check
uv run ruff check src tests
uv run mypy srcBuild 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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceA dedicated server that wraps Google's Gemini AI models in a Model Context Protocol (MCP) interface, allowing other LLMs and MCP-compatible systems to access Gemini's capabilities like content generation, function calling, chat, and file handling through standardized tools.162036MIT
- AlicenseAqualityBmaintenanceMCP server for AI-powered research using Gemini. Provides fast grounded web search, deep autonomous research, URL extraction, and session management.69MIT
- Alicense-qualityBmaintenanceMCP server for Google Gemini that does not require an API key, combining a CLI backend for Q\&A, research, and analysis with a web UI backend for image and video generation.132MIT
- AlicenseAqualityCmaintenanceMCP server for Google's Gemini API, enabling text, image, video, speech, embeddings, and deep research capabilities through a single tool set.10MIT
Related MCP Connectors
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
MCP server for Google Veo AI video generation
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/crunchtools/mcp-gemini'
If you have feedback or need assistance with the MCP directory API, please join our Discord server