Gemini CLI MCP server

Integrates with Google's Gemini CLI tool to enable conversational interactions, content generation with configurable temperature settings, and model discovery through command-line interface calls.
Back to servers
Setup instructions
Provider
blesscat
Release date
Jun 26, 2025
Language
Go
Stats
5 stars

Gemini MCP Server provides integration with the Gemini CLI tool through the Model Context Protocol (MCP). This server allows you to access Gemini's AI capabilities directly from tools like Claude Desktop by acting as a bridge between your applications and Gemini's functionality.

Prerequisites

Before setting up the Gemini MCP Server, ensure you have:

  • Node.js 18 or newer installed
  • Gemini CLI tool installed and properly configured

Installation

Install the required dependencies by running:

npm install

Usage

Starting the Server

To launch the MCP server:

npm start

Available Tools

The server provides access to several Gemini capabilities:

gemini_chat

Send messages to Gemini and receive responses.

Parameters:

  • message (required): The text message to send to Gemini
  • model (optional): The model to use (defaults to gemini-pro)

gemini_generate

Generate content with Gemini using specific prompts and parameters.

Parameters:

  • prompt (required): The generation prompt
  • model (optional): The model to use for generation
  • temperature (optional): Controls randomness of outputs (range: 0.0-1.0)

gemini_list_models

Retrieve a list of all available Gemini models.

Parameters:

  • None required

Configuration

System Setup

The MCP server requires the Gemini CLI to be available in your system PATH. Make sure you have:

  1. Installed the Gemini CLI tool
  2. Set up your API credentials
  3. Verified the CLI works by running gemini --help

Claude Desktop Integration

To integrate with Claude Desktop, add the following to your Claude Desktop configuration:

{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["/path/to/gemini-mcp/index.js"]
    }
  }
}

Be sure to replace /path/to/gemini-mcp/index.js with the actual path to the index.js file on your system.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "gemini" '{"command":"node","args":["/path/to/gemini-mcp/index.js"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "gemini": {
            "command": "node",
            "args": [
                "/path/to/gemini-mcp/index.js"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "gemini": {
            "command": "node",
            "args": [
                "/path/to/gemini-mcp/index.js"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later