Skip to main content
Glama
Yoon-jongho

Claude-to-Gemini MCP Server

by Yoon-jongho

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, fast

    • pro: 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 analysis

    • duplications: Duplicate code detection

    • security: Security vulnerability scan

    • performance: Performance optimization opportunities

    • general: 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 creation

  • Parameters:

    • prompt: Logo description (English)

    • brandName: Brand/text name to include (optional)

    • style: minimal | modern | vintage | playful | corporate

    • colorScheme: 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, free

  • Parameters:

    • prompt: Illustration description (English)

    • style: watercolor | cartoon | vector | oil_painting | sketch | anime | pixel_art

    • mood: cheerful | dark | calm | dramatic (optional)

    • aspectRatio: 1:1 | 16:9 | 9:16 | 4:3 | 3:4

    • numberOfImages: 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 optimization

  • Parameters:

    • prompt: Infographic topic/content (English)

    • data: Data/information to visualize (optional)

    • type: infographic | diagram | flowchart | timeline | comparison | stats

    • aspectRatio: 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, paid

  • Parameters:

    • prompt: Photo description (English)

    • style: natural | studio | cinematic | aerial | macro

    • numberOfImages: 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 combination

  • Parameters:

    • prompt: Banner description (English)

    • text: Text to include in the banner (optional)

    • platform: facebook | instagram | twitter | youtube | linkedin | web

    • aspectRatio: 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) - Free

  • Parameters:

    • prompt: Editing instructions (English)

    • imagePath: Path to the image file to edit

    • action: 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-gemini

3. Install Dependencies

npm install

4. Register MCP Server

claude mcp add gemini \
  --env GEMINI_API_KEY=YOUR_API_KEY_HERE \
  -- node /ABSOLUTE_PATH/claude-to-gemini/index.js

Note:

  • Replace YOUR_API_KEY_HERE with your actual Gemini API key

  • Replace /ABSOLUTE_PATH/ with the actual project path (e.g., /Users/username/projects/claude-to-gemini/index.js)

5. Verification

claude mcp list

Output example:

gemini - node /Users/username/projects/claude-to-gemini/index.js

🚀 Usage

Start Claude Code

claude

Basic 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 (gemini-3-pro-image-preview)

generate_logo, generate_infographic, generate_banner

Logo, infographic, banner

Paid

Professional asset creation, text rendering, thinking mode

Nano Banana 2 (gemini-3.1-flash-image-preview)

generate_illustration, edit_image

Illustration, image editing

Free

Fast generation, conversational editing, various styles

Imagen 4 (imagen-4.0-generate-001)

generate_photo

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.json in .gitignore

  • ✅ Reissue immediately if API key is leaked

Required .gitignore Content

node_modules/
.claude.json
.env
*.key

🤝 How to Contribute

  1. Fork the Project

  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)

  3. Commit your Changes (git commit -m 'Add some AmazingFeature')

  4. Push to the Branch (git push origin feature/AmazingFeature)

  5. 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]

Install Server
A
license - permissive license
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    B
    quality
    Not graded
    maintenance
    Enables 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.
    4
    118
  • A
    license
    B
    quality
    D
    maintenance
    Enables 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.
    2
    9
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Integrates 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.
    3
    Apache 2.0

View all related MCP servers

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

View all MCP Connectors

Latest Blog Posts

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