MCP Server Gemini

A state-of-the-art Model Context Protocol (MCP) server that provides seamless integration with Google's Gemini AI models. This server enables Claude Desktop and other MCP-compatible clients to leverage the full power of Gemini's advanced AI capabilities.
  • typescript

14

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "gurveeer-mcp-server-gemini-pro": {
      "command": "mcp-server-gemini",
      "args": [],
      "env": {
        "NODE_ENV": "production",
        "LOG_LEVEL": "info",
        "ENABLE_METRICS": "false",
        "GEMINI_API_KEY": "YOUR_API_KEY_HERE",
        "REQUEST_TIMEOUT": "30000",
        "RATE_LIMIT_WINDOW": "60000",
        "RATE_LIMIT_ENABLED": "true",
        "RATE_LIMIT_REQUESTS": "100"
      }
    }
  }
}

You run a state‑of‑the‑art MCP server that lets you connect Gemini AI models to MCP‑compatible clients like Claude Desktop. It provides secure access to Gemini capabilities, including thinking models, JSON output, grounding, and multimodal support, with robust error handling and monitoring for production use.

How to use

Set up the Gemini MCP server and connect your MCP client to it. You can run the server locally for development or install it globally for everyday use. Configure your API key, then point your MCP client to the local stdio server or to the global command so the client can send requests to Gemini models.

If you run a local setup, start the server by invoking Node with the main server script. The client will communicate through standard input/output (stdio) or via a dedicated command in your environment.

In Claude Desktop, add a new MCP server entry that points to the Gemini MCP server. Provide the required environment variable for the API key and choose between the global installation or the local development path as described below.

How to install

Prerequisites you need before installing the server:

# Node.js 16+ is required
node -v
npm -v

# If you will build from source
git --version

Option 1: Global installation (recommended for most users)

npm install -g mcp-server-gemini

Option 2: Local development (clone, install, build)

git clone https://github.com/gurr-i/mcp-server-gemini-pro.git
cd mcp-server-gemini-pro
npm install
npm run build

Configuration

Set up your Gemini API key in the environment so the server can authenticate requests to Gemini models.

# Option A: Environment variable
export GEMINI_API_KEY="your_api_key_here"

# Option B: .env file
echo "GEMINI_API_KEY=your_api_key_here" > .env

Claude Desktop configuration examples

Global installation you expose through Claude Desktop with a command that starts the MCP server and passes the API key via environment variables.

{
  "mcpServers": {
    "gemini": {
      "command": "mcp-server-gemini",
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}

Local installation runs via Node and loads the built stdio server script. Provide the API key the same way.

{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["/path/to/mcp-server-gemini-pro/dist/enhanced-stdio-server.js"],
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}

Restart Claude Desktop

After changing configuration, close Claude Desktop completely and reopen it to apply the new MCP server settings.

Environment variables

Configure runtime behavior using environment variables.

# Required
GEMINI_API_KEY=your_api_key_here

# Optional (examples)
LOG_LEVEL=info
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=60000
REQUEST_TIMEOUT=30000
NODE_ENV=production

Development and production notes

Development uses a development script and debugging configuration, while production enables metrics and stricter security settings.

# Development
NODE_ENV=development
LOG_LEVEL=debug
RATE_LIMIT_ENABLED=false
REQUEST_TIMEOUT=60000

# Production
NODE_ENV=production
LOG_LEVEL=warn
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=60000
REQUEST_TIMEOUT=30000
ENABLE_METRICS=true

Security and maintenance notes

Protect your API key, enable rate limiting in production, and monitor logs for anomalies. Run the server with a non‑root user in production builds and keep dependencies up to date.

Troubleshooting

If the server won’t start, verify that GEMINI_API_KEY is set and that the configuration file is readable. Check file permissions and ensure the correct node script path is used in local setups.

# Health checks
echo $GEMINI_API_KEY
ls -la .env
which node

Available tools

generate_text

Generate text with advanced Gemini thinking models, JSON mode, grounding, and structured outputs.

analyze_image

Analyze images using Gemini vision models for multimodal understanding.

count_tokens

Count tokens for cost estimation across models.

list_models

List all available Gemini models with features and contexts.

embed_text

Generate text embeddings for vector representations.

get_help

Get usage help and documentation for MCP usage.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational