Skip to main content
Glama
gemini4-mcp

gemini4-mcp

by Franky1107

gemini4-mcp

An MCP server that lets Claude Desktop (or any MCP client) ask Google's Gemini 4 models: Hydrogen, Neon and Carbon. You choose the thinking level for each request.

Most existing Gemini MCP servers target Gemini 2.x and send parameters Gemini 4 no longer uses. This one is built for the Gemini 4 API: no temperature/top_p, and thinking_level instead.

Tool

ask_gemini(prompt, model="gemini-4-hydrogen", thinking_level="high", system=None)

Model

Use it for

gemini-4-hydrogen

Fast everyday tasks (default)

gemini-4-neon

Harder coding, analysis, long documents

gemini-4-carbon

The hardest problems (thinking capped at high)

Thinking levels: low, medium, high (default), xhigh.

Related MCP server: Gemini Thinking MCP Server

Requirements

  • Python 3.10+

  • A Gemini API key from Google AI Studio

  • Neon is paid-tier only. Every token is billed, thinking tokens included. Check pricing before heavy use.

Install

With uv (no manual install needed):

{
  "mcpServers": {
    "gemini4": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/Franky1107/gemini4-mcp", "gemini4-mcp"],
      "env": { "GEMINI_API_KEY": "your-key-here" }
    }
  }
}

Or with pip:

git clone https://github.com/Franky1107/gemini4-mcp
cd gemini4-mcp
pip install .
{
  "mcpServers": {
    "gemini4": {
      "command": "gemini4-mcp",
      "env": { "GEMINI_API_KEY": "your-key-here" }
    }
  }
}

Put the config in:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Then fully restart Claude Desktop.

⚠️ Your API key lives in that config file. Never commit it or paste it into an issue.

Usage

Ask Claude something like:

Ask Gemini Neon with xhigh thinking to review this function for race conditions.

Development

pip install -e . pytest
pytest

The tests use a fake client, so they don't call the API or need a key.

Limitations

  • Text prompts only (no images or files)

  • One request at a time, no multi-turn memory

  • Answers are capped at about 64K tokens (no background/long-decode mode)

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server implementation for the Google Gemini language model. This server allows Claude Desktop users to access the powerful reasoning capabilities of Gemini-2.0-flash-thinking-exp-01-21 model.
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude Desktop to interact with Google's Gemini API, allowing users to query Gemini models directly or facilitate conversations between Claude and Gemini with conversation history management.
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Integrates Google's Gemini API with MCP-compatible clients for chat, real-time web search, knowledge queries, code/text analysis, and content generation.
      -