Claude-to-Gemini MCP Server
This MCP server enables Claude to leverage Google Gemini's large context capabilities (up to 1M tokens) for comprehensive code analysis and AI assistance.
Core Capabilities:
• General AI Queries (ask_gemini): Handle complex prompts, architecture design, project-wide reviews, and large-scale context analysis with optional context injection for providing extensive codebases or multiple files
• Specialized Codebase Analysis (gemini_analyze_codebase): Perform deep reviews targeting specific areas:
Architecture patterns and design issues
Code duplications across the codebase
Security vulnerabilities and risks
Performance bottlenecks and optimization opportunities
General comprehensive analysis
• Multi-Model Support: Choose between Gemini 2.5 Flash (default, free, fast) for routine tasks or Gemini 2.5 Pro (paid, highest quality) for complex reasoning
Use Cases: Analyzing projects exceeding Claude's context window, getting second opinions on architectural decisions, performing specialized code quality audits, reviewing legacy codebases for refactoring, and designing systems with large-scale context awareness.
Enables Claude to delegate tasks to Google Gemini models for large-scale context analysis, codebase reviews, architecture analysis, security vulnerability detection, and performance optimization through two main functions: general AI assistance and specialized codebase analysis
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., "@Claude-to-Gemini MCP Serverask_gemini to analyze this large codebase for security vulnerabilities"
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.
Claude-to-Gemini MCP Server
An Agent-to-Agent integration project using Google Gemini as an MCP (Model Context Protocol) server in Claude Code.
🎯 Project Purpose
Claude Code: Main AI (general coding, debugging, file creation/modification)
Gemini: Sub AI (large-scale context analysis, codebase review, 6 types of specialized image generation)
Related MCP server: Claude Code Gemini MCP
✨ Key Features
1. ask_gemini - Text/Code Generation
Purpose: General Gemini calls, large context analysis
Model Selection:
flash(default): Gemini 2.5 Flash - Free, fastpro: Gemini 3.1 Pro - Latest model (released Feb 2026), highest performance
Context: Up to 1M tokens
2. gemini_analyze_codebase - Codebase Analysis
Purpose: Comprehensive analysis of the entire codebase
Analysis Types:
architecture: Architecture pattern analysisduplications: Duplicate code detectionsecurity: Security vulnerability scanperformance: Performance optimization opportunitiesgeneral: Comprehensive analysis
3. generate_logo - Logo/Icon Generation
Purpose: Creating logos, icons, and branding assets
Model: Nano Banana Pro (
gemini-3-pro-image-preview) - Specialized for professional asset creationParameters:
prompt: Logo description (English)brandName: Brand/text name to include (optional)style:minimal|modern|vintage|playful|corporatecolorScheme: Color palette (optional)
Features: Simple and scalable design, 1:1 ratio default
4. generate_illustration - Illustration/Artwork Generation
Purpose: Illustrations, artwork, characters, concept art
Model: Nano Banana 2 (
gemini-3.1-flash-image-preview) - Fast generation, freeParameters:
prompt: Illustration description (English)style:watercolor|cartoon|vector|oil_painting|sketch|anime|pixel_artmood:cheerful|dark|calm|dramatic(optional)aspectRatio:1:1|16:9|9:16|4:3|3:4numberOfImages: Number of images to generate (1-4)
5. generate_infographic - Infographic/Diagram Generation
Purpose: Infographics, diagrams, flowcharts, timelines
Model: Nano Banana Pro (
gemini-3-pro-image-preview) - Thinking mode + text rendering optimizationParameters:
prompt: Infographic topic/content (English)data: Data/information to visualize (optional)type:infographic|diagram|flowchart|timeline|comparison|statsaspectRatio:1:2(default) |1:4|1:1|16:9
Features: Easy-to-read text rendering, supports vertical long layouts
6. generate_photo - Realistic Photo Generation
Purpose: Photorealistic images, product mockups, advertising photos
Model: Imagen 4 (
imagen-4.0-generate-001) - Highest realistic quality, paidParameters:
prompt: Photo description (English)style:natural|studio|cinematic|aerial|macronumberOfImages: Number of images to generate (1-4)aspectRatio:1:1|16:9|9:16|4:3|3:4
Features: Up to 4K resolution, includes automatic SynthID watermark
7. generate_banner - Marketing Banner/SNS Image Generation
Purpose: Marketing banners, SNS images, thumbnails, posters
Model: Nano Banana Pro (
gemini-3-pro-image-preview) - Text + graphic combinationParameters:
prompt: Banner description (English)text: Text to include in the banner (optional)platform:facebook|instagram|twitter|youtube|linkedin|webaspectRatio: Automatic setting per platform
Features: Provides optimized size presets for each platform
8. edit_image - Image Editing/Modification
Purpose: Adding/deleting/modifying elements in existing images
Model: Nano Banana 2 (
gemini-3.1-flash-image-preview) - FreeParameters:
prompt: Editing instructions (English)imagePath: Path to the image file to editaction:modify|add|remove|style_transfer|enhance
Features: Interleaved editing, supports multi-turn conversational modifications
🛠 Tech Stack
Runtime: Node.js 18+
MCP SDK: @modelcontextprotocol/sdk
AI API: Google Gemini API (@google/generative-ai)
IDE: Claude Code (CLI + VSCode extension)
📦 Installation
1. Prerequisites
Node.js 18 or higher
Claude Pro/Max plan subscription
Google Gemini API key (ai.google.dev)
2. Clone the Project
git clone https://github.com/YOUR_USERNAME/claude-to-gemini.git
cd claude-to-gemini3. Install Dependencies
npm install4. Register MCP Server
claude mcp add gemini \
--env GEMINI_API_KEY=YOUR_API_KEY_HERE \
-- node /ABSOLUTE_PATH/claude-to-gemini/index.jsNote:
Replace
YOUR_API_KEY_HEREwith your actual Gemini API keyReplace
/ABSOLUTE_PATH/with the actual project path (e.g.,/Users/username/projects/claude-to-gemini/index.js)
5. Verification
claude mcp listOutput example:
gemini - node /Users/username/projects/claude-to-gemini/index.js🚀 Usage
Start Claude Code
claudeBasic Usage (Flash model, free)
ask_gemini 도구를 사용해서 "이 프로젝트 전체 구조를 분석해줘" 물어봐줘Pro Model Usage (Paid, high performance)
ask_gemini 도구를 사용해서 model을 "pro"로 설정하고 "복잡한 아키텍처 설계해줘" 물어봐줘Codebase Analysis
gemini_analyze_codebase 도구로 보안 취약점을 찾아줘Logo Generation
generate_logo 도구로 brandName을 "CafeKiosk"로, style을 "modern"으로 설정하고
"A minimalist coffee cup logo with geometric shapes" 로고 만들어줘Illustration Generation (Free)
generate_illustration 도구로 style을 "watercolor"로 설정하고
"A cozy cafe interior with warm lighting" 삽화 생성해줘Infographic Generation
generate_infographic 도구로 type을 "flowchart"로 설정하고
"User authentication flow: login, verify, 2FA, dashboard" 다이어그램 만들어줘Realistic Photo Generation (Paid - Imagen 4)
generate_photo 도구로 style을 "studio"로, numberOfImages를 4로 설정하고
"Professional food photography of a latte with beautiful latte art" 이미지 4개 생성해줘Marketing Banner Generation
generate_banner 도구로 platform을 "instagram"으로 설정하고
text를 "Grand Opening 50% OFF"로
"Bright modern cafe promotion banner with coffee beans" 배너 만들어줘Image Editing (Free)
edit_image 도구로 action을 "remove"로, imagePath를 "./photo.png"으로 설정하고
"Remove the background person and keep only the coffee cup" 편집해줘💡 Use Cases
Scenario 1: Designing New Project Architecture
ask_gemini 도구로 React + Express + PostgreSQL
전자상거래 앱의 전체 아키텍처를 설계해줘Scenario 2: Legacy Code Analysis
gemini_analyze_codebase 도구로
focus를 'duplications'로 설정해서 중복 코드를 찾아줘Scenario 3: Large-scale Refactoring
ask_gemini 도구로 이 프로젝트 전체를 읽고
모던한 아키텍처로 마이그레이션 계획을 세워줘📚 Practical Guide
How to use it in practice?
For more detailed practical usage, refer to the 📖 Practical Usage Guide (USECASES.md)!
Key Contents:
🔍 Junior Code Review (Daily morning routine)
🏗️ Large-scale Refactoring (1200-line migration)
🚀 Project Onboarding (Grasp core concepts within 1 hour)
🎨 Architecture Design (Monorepo structure)
🖼️ Specialized Image Generation (Logo, illustration, infographic, photo, banner, editing)
💡 Tips and Tricks (Cost optimization, model selection)
📊 Model Comparison
Text/Code Generation Models
Model | Context | Cost | Speed | Recommended Use |
Gemini 2.5 Flash | 1M tokens | Free | Fast | General analysis, most tasks |
Gemini 3.1 Pro | 1M tokens | Paid | Fast | Highest performance, complex reasoning |
Image Generation Models
Model | Tool | Purpose | Cost | Features |
Nano Banana Pro ( |
| Logo, infographic, banner | Paid | Professional asset creation, text rendering, thinking mode |
Nano Banana 2 ( |
| Illustration, image editing | Free | Fast generation, conversational editing, various styles |
Imagen 4 ( |
| Realistic photo, product mockup | Paid | Up to 4K, photorealistic, includes SynthID |
⚠️ Security Precautions
API Key Protection
Strictly Prohibited:
❌ Uploading API keys to GitHub
❌ Hardcoding API keys in code
❌ Sharing API keys in public places
Recommendations:
✅ Manage only via environment variables
✅ Include
.claude.jsonin.gitignore✅ Reissue immediately if API key is leaked
Required .gitignore Content
node_modules/
.claude.json
.env
*.key🤝 How to Contribute
Fork the Project
Create your Feature Branch (
git checkout -b feature/AmazingFeature)Commit your Changes (
git commit -m 'Add some AmazingFeature')Push to the Branch (
git push origin feature/AmazingFeature)Open a Pull Request
📝 License
MIT License - See the LICENSE file for details
🔗 References
📧 Contact
Project-related inquiries: GitHub Issues
Made with ❤️ by [Your Name]
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
- FlicenseBqualityNot gradedmaintenanceEnables Claude Code to use Google Gemini AI capabilities for analyzing PDFs and images, generating and translating text, and reviewing code. Supports both CLI and API backends with different quota limits.4118
- FlicenseCqualityDmaintenanceEnables Claude Code to call Gemini models through an OpenAI-compatible API, providing tools for deep analysis, brainstorming, code review, and general queries using Gemini's capabilities.4
- AlicenseBqualityDmaintenanceEnables Claude to collaborate with Gemini for code reviews, second opinions, and iterative software development. It facilitates multi-step workflows including PRD creation and code generation through an AI orchestration framework.291MIT
- AlicenseAqualityCmaintenanceIntegrates Google's Gemini AI models into Claude Code and other MCP clients to provide second opinions, code comparisons, and token counting. It supports streaming responses and multi-turn conversations directly within your existing AI development workflow.3Apache 2.0
Related MCP Connectors
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor
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/Yoon-jongho/claude-to-gemini'
If you have feedback or need assistance with the MCP directory API, please join our Discord server