GemForge (Google Gemini) MCP server

Provides a specialized server that connects to Google's Gemini models with optimized tools for search, reasoning, code analysis, and file operations, automatically selecting the best model based on task requirements.
Back to servers
Setup instructions
Provider
PV Bhat
Release date
Apr 29, 2025
Language
TypeScript
Stats
4 stars

GemForge is an enterprise-grade integration that connects Google's Gemini AI with the MCP ecosystem. It allows Claude, Roo Code, Windsurf, and other MCP agents to leverage Gemini's capabilities for codebase analysis, live search, multi-format document processing, and more.

Installation Options

Quick One-Line Install

The fastest way to get started with GemForge is using the one-line installer:

npx @gemforge/mcp-server@latest init

Manual Setup

For more control over your installation, follow these steps:

  1. Create a configuration file named claude_desktop_config.json:
{
  "mcpServers": {
    "GemForge": {
      "command": "node",
      "args": ["./dist/index.js"],
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}
  1. Install and run the server:
npm install gemforge-mcp
npm start

Docker Deployment

For containerized environments, use the Docker image:

docker run -e GEMINI_API_KEY=your_api_key ghcr.io/pv-bhat/gemforge:latest

Smithery.ai Deployment

For one-click cloud deployment, you can use the Smithery.ai platform.

Configuration

Environment Variables

GemForge can be configured using these environment variables:

GEMINI_API_KEY=your_api_key_here       # Required: Gemini API key
GEMINI_PAID_TIER=true                  # Optional: Set to true if using paid tier
DEFAULT_MODEL_ID=gemini-2.5-pro        # Optional: Override default model
LOG_LEVEL=info                         # Optional: Set logging verbosity

Model Selection

GemForge intelligently selects the optimal Gemini model for each task:

  • gemini_search: Uses gemini-2.5-flash for speed and search integration
  • gemini_reason: Uses gemini-2.5-pro for deep reasoning
  • gemini_code: Uses gemini-2.5-pro for code understanding
  • gemini_fileops: Selects between models based on file size

You can override the model selection by adding the model_id parameter to any tool call.

Available Tools

gemini_search

Provides real-time web access for retrieving current information:

{
  "toolName": "gemini_search",
  "toolParams": {
    "query": "Latest advancements in quantum computing",
    "enable_thinking": true
  }
}

gemini_reason

Processes complex logic problems with step-by-step thinking:

{
  "toolName": "gemini_reason",
  "toolParams": {
    "question": "Solve this optimization problem...",
    "enable_thinking": true
  }
}

gemini_code

Analyzes code repositories, generates solutions, and debugs code:

{
  "toolName": "gemini_code",
  "toolParams": {
    "question": "Identify improvements and new features",
    "directory_path": "path/to/project",
    "repomix_options": "--include \"**/*.js\" --no-gitignore"
  }
}

gemini_fileops

Handles multiple file formats (60+ supported) including PDFs, images, and more:

{
  "toolName": "gemini_fileops",
  "toolParams": {
    "file_path": ["contract_v1.pdf", "contract_v2.pdf"],
    "operation": "analyze",
    "instruction": "Compare these contract versions and extract all significant changes."
  }
}

Advanced Features

Multi-File Comparison

GemForge can compare different versions of documents, images, or code:

{
  "toolName": "gemini_fileops",
  "toolParams": {
    "file_path": ["version1.js", "version2.js"],
    "operation": "compare",
    "instruction": "Identify any security vulnerabilities introduced in the new version"
  }
}

Full Repository Analysis

Analyze entire codebases with configurable inclusion/exclusion patterns:

{
  "toolName": "gemini_code",
  "toolParams": {
    "question": "Provide a high-level architecture overview of this project",
    "directory_path": "./src",
    "repomix_options": "--include \"**/*.{js,ts}\" --exclude \"**/*.test.js\""
  }
}

XML Content Processing

Process structured XML data with specialized handling:

{
  "toolName": "gemini_fileops",
  "toolParams": {
    "file_path": "data.xml",
    "operation": "extract",
    "instruction": "Extract all customer records with purchases over $1000"
  }
}

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 "GemForge" '{"command":"node","args":["./dist/index.js"],"env":{"GEMINI_API_KEY":"your_api_key_here"}}'

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": {
        "GemForge": {
            "command": "node",
            "args": [
                "./dist/index.js"
            ],
            "env": {
                "GEMINI_API_KEY": "your_api_key_here"
            }
        }
    }
}

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": {
        "GemForge": {
            "command": "node",
            "args": [
                "./dist/index.js"
            ],
            "env": {
                "GEMINI_API_KEY": "your_api_key_here"
            }
        }
    }
}

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