mcp-server-gemini

MCP.Pizza Chef: aliargun

The mcp-server-gemini is a TypeScript-based MCP server implementation that facilitates interaction between Claude Desktop and Google's Gemini AI models. It supports the full Model Context Protocol, enabling real-time response streaming and secure handling of API keys. Users can configure model parameters easily, making it a robust solution for integrating Gemini's advanced AI capabilities into MCP-enabled environments. The server is designed for quick setup with clear instructions for obtaining API keys and configuring Claude Desktop, ensuring smooth and secure connectivity.

Use This MCP server To

Integrate Gemini AI models with Claude Desktop Stream real-time AI responses from Gemini models Securely manage Gemini API keys in MCP workflows Customize Gemini model parameters for tailored outputs Enable multi-model workflows combining Gemini and other LLMs

README

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

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

  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

mcp-server-gemini FAQ

How do I obtain an API key for the Gemini MCP server?
You can get a Gemini API key by visiting Google AI Studio at https://makersuite.google.com/app/apikey and creating a new API key.
How is the Gemini API key secured in the MCP server?
The server securely handles API keys through environment variables, preventing exposure in code or logs.
What programming language is the mcp-server-gemini implemented in?
It is implemented in TypeScript, ensuring type safety and maintainability.
Can I configure model parameters for Gemini through this MCP server?
Yes, the server supports configurable model parameters to customize AI responses.
Does the server support real-time response streaming?
Yes, it supports real-time streaming of responses from Gemini models for interactive applications.
How do I configure Claude Desktop to use the Gemini MCP server?
Add the Gemini server configuration to Claude Desktop's config file with the appropriate command, args, and environment variables as documented.
Is the mcp-server-gemini compatible with other LLM providers?
While focused on Gemini, MCP's provider-agnostic design allows integration alongside models from OpenAI, Anthropic Claude, and others.
Where can I find the source code for the Gemini MCP server?
The source code is available on GitHub at the repository aliargun/mcp-server-gemini.