mcp-server-gemini

ivangrynenko/mcp-server-gemini

3.2

If you are the rightful owner of mcp-server-gemini and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Gemini MCP Server Enhanced v2.5 is a robust server providing access to advanced AI capabilities through the Model Context Protocol.

Tools
  1. generate_text

    Generate text with customizable temperature and token limits

  2. analyze_image

    Analyze images and answer questions about them

  3. generate_code

    Generate code in specific programming languages with framework support

  4. chat

    Have conversations with context memory and session management

  5. translate_text

    Translate text between languages

Gemini MCP Server Enhanced v2.5

A powerful Model Context Protocol (MCP) server that provides comprehensive access to Google's Gemini 2.5 Pro Preview AI capabilities, including text generation, image analysis, code generation, chat conversations, and more. Powered by the most advanced Gemini 2.5 Pro model with thinking capabilities and 1M token context window (2M coming soon).

Features

Core Capabilities

  • Full MCP protocol support with stdio transport for Claude Desktop
  • WebSocket support for custom integrations
  • Real-time response streaming
  • Secure API key handling
  • TypeScript implementation with ES modules

🚀 Text Generation

  • generate_text - Generate text with customizable temperature and token limits

🖼️ Image Analysis

  • analyze_image - Analyze images and answer questions about them
  • extract_text_from_image - Extract text (OCR) from images
  • compare_images - Compare multiple images and describe differences/similarities

💻 Code Generation & Analysis

  • generate_code - Generate code in specific programming languages with framework support
  • explain_code - Analyze and explain code with detailed breakdowns
  • refactor_code - Suggest improvements and refactor code based on goals
  • convert_code - Convert code between programming languages

💬 Chat Conversations

  • chat - Have conversations with context memory and session management
  • clear_chat_history - Clear conversation history for a session
  • summarize_conversation - Get a summary of the conversation

✍️ Content Creation

  • translate_text - Translate text between languages
  • summarize_text - Create summaries in various styles (brief, detailed, bullet-points, executive)
  • rewrite_text - Rewrite text in different styles or for different audiences
  • generate_structured_data - Generate structured data (JSON, YAML, CSV, XML, TOML)

🛡️ Safety & Moderation

  • check_content_safety - Analyze content for safety issues across multiple categories
  • moderate_text - Filter and clean inappropriate content with different moderation levels

Installation

  1. Clone the repository

    git clone https://github.com/ivangrynenko/mcp-server-gemini.git
    cd mcp-server-gemini
    
  2. Install dependencies

    npm install
    
  3. Build the project

    npm run build
    

Quick Start

  1. Get Gemini API Key

  2. Configure Claude Desktop

    • Locate your config file:
      Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
      Windows: %APPDATA%\Claude\claude_desktop_config.json
      Linux: ~/.config/Claude/claude_desktop_config.json
      
    • Add Gemini configuration:
      {
        "mcpServers": {
          "gemini": {
            "command": "node",
            "args": ["/path/to/mcp-server-gemini/dist/stdio.js"],
            "env": {
              "GEMINI_API_KEY": "your_api_key_here"
            }
          }
        }
      }
      
  3. Restart Claude Desktop

Usage Examples

Once configured, you can use these tools in Claude Desktop:

Text Generation

Use the generate_text tool to write a creative story about space exploration

Image Analysis

Use the analyze_image tool to describe what's in /path/to/image.jpg

Code Generation

Use the generate_code tool to create a Python REST API with FastAPI

Chat Conversations

Use the chat tool with sessionId "project-discussion" to start a conversation about machine learning

Content Creation

Use the translate_text tool to translate "Hello, world!" to Spanish

Documentation

  • - Detailed setup instructions
  • - Usage examples and advanced configuration
  • - Technical implementation details
  • - Guide for developers
  • - Common issues and solutions

Local Development

# Clone repository
git clone https://github.com/aliargun/mcp-server-gemini.git
cd mcp-server-gemini

# Install dependencies
npm install

# Start development server
npm run dev

Contributing

Contributions are welcome! Please see our .

Common Issues

  1. Connection Issues

    • Check if port 3005 is available
    • Verify internet connection
    • See
  2. API Key Problems

    • Verify API key is correct
    • Check permissions
    • See

Security

  • API keys are handled via environment variables only
  • No sensitive data is logged or stored
  • Regular security updates

License

MIT