MCP HubMCP Hub
aliargun

mcp-server-gemini

by: aliargun

MCP server implementation for Google's Gemini API

105created 15/12/2024
Visit
Gemini
API

📌Overview

Purpose: To provide a Model Context Protocol (MCP) server that facilitates interaction between Claude Desktop and Google’s Gemini AI models.

Overview: The Gemini MCP Server is designed to enable seamless communication with Google's Gemini AI through full MCP protocol support, ensuring efficient operation and real-time data exchange in applications using Claude Desktop.

Key Features:

  • Full MCP Protocol Support: Ensures comprehensive compatibility with the Model Context Protocol for optimal interaction with Gemini AI models.

  • Real-time Response Streaming: Allows immediate streaming of responses, enhancing user experience with faster feedback.

  • Secure API Key Handling: Utilizes environment variables to securely manage API keys, protecting sensitive information.

  • Configurable Model Parameters: Offers flexibility in setting model parameters to tailor interactions to specific needs.

  • TypeScript Implementation: Provides a robust and modern coding framework for easier development and maintenance.


Gemini MCP Server

Model Context Protocol (MCP) server implementation that enables Claude Desktop to interact with Google's Gemini AI models.

Features

  • Full MCP protocol support
  • Real-time response streaming
  • Secure API key handling
  • Configurable model parameters
  • TypeScript implementation

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": "npx",
            "args": ["-y", "github:aliargun/mcp-server-gemini"],
            "env": {
              "GEMINI_API_KEY": "your_api_key_here"
            }
          }
        }
      }
      
  3. Restart Claude Desktop

Documentation

  • Claude Desktop Setup Guide – Detailed setup instructions
  • Examples and Usage – Usage examples and advanced configuration
  • Implementation Notes – Technical implementation details
  • Development Guide – Guide for developers
  • Troubleshooting Guide – 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 Contributing Guide.

Common Issues

  1. Connection Issues

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

    • Verify API key is correct
    • Check permissions
    • See Setup Guide

Security

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

License

MIT