Skip to main content
Glama

gemini-search-mcp

A lightweight, zero-dependency Model Context Protocol (MCP) server that provides real-time web search with Google Search grounding powered by Google Gemini models.

Give your AI coding assistants (Claude Desktop, Cursor, Antigravity, OpenCode, Zed, Cline) real-time access to the live web, current documentation, APIs, and news with verified source citations.

Features

  • ⚡ Zero External Dependencies: Pure Node.js ESM. Instant npx downloads and cold starts without bundle bloat.

  • 🔍 Google Search Grounding: Leverages Google's native grounding tools for high accuracy, freshness, and relevance.

  • 📚 Clean Markdown Citations: Automatically extracts answers and appends deduplicated markdown source links.

  • 🧠 Thought-Filtering: Automatically filters internal model reasoning tokens to keep tool outputs compact and relevant.

  • ⚙️ Custom Proxy & Model Support: Compatible with official Google Gemini API as well as custom endpoints (e.g. CLIProxyAPI, Open-WebUI, or local gateways).


Related MCP server: Crawl4AI RAG MCP Server

Quickstart

You don't need to install anything globally. Run directly via npx:

npx -y @kazimshah39/gemini-search-mcp

Get an API Key

Get a Google Gemini API key from Google AI Studio.


Configuration

Add the server to your MCP client configuration file:

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "gemini-search": {
      "command": "npx",
      "args": ["-y", "@kazimshah39/gemini-search-mcp"],
      "env": {
        "GEMINI_API_KEY": "YOUR_GEMINI_API_KEY"
      }
    }
  }
}

Cursor

In .cursor/mcp.json or Cursor Settings -> Features -> MCP:

{
  "mcpServers": {
    "gemini-search": {
      "command": "npx",
      "args": ["-y", "@kazimshah39/gemini-search-mcp"],
      "env": {
        "GEMINI_API_KEY": "YOUR_GEMINI_API_KEY"
      }
    }
  }
}

Antigravity / OpenCode

In your workspace .mcp.json:

{
  "mcpServers": {
    "gemini-search": {
      "command": "npx",
      "args": ["-y", "@kazimshah39/gemini-search-mcp"],
      "env": {
        "GEMINI_API_KEY": "YOUR_GEMINI_API_KEY"
      }
    }
  }
}

Environment Variables

Variable

Required

Default

Description

GEMINI_API_KEY

Yes

undefined

Your Google Gemini API key or proxy authorization key.

GEMINI_MODEL

No

gemini-2.5-flash

The Gemini model to use for grounded searches (e.g., gemini-2.5-flash, gemini-2.0-flash, gemini-3.8-flash).

GEMINI_BASE_URL

No

https://generativelanguage.googleapis.com/v1beta

Custom base endpoint if using a custom gateway or reverse proxy.

GEMINI_PROXY_URL

No

undefined

Alias for GEMINI_BASE_URL (e.g. http://127.0.0.1:8317/v1beta).

GEMINI_TIMEOUT_MS

No

35000

Request timeout in milliseconds (default 35 seconds).

Example with Local Proxy / Custom Gateway

If you route requests through a local proxy (such as CLIProxyAPI):

{
  "mcpServers": {
    "gemini-search": {
      "command": "npx",
      "args": ["-y", "@kazimshah39/gemini-search-mcp"],
      "env": {
        "GEMINI_API_KEY": "YOUR_PROXY_KEY",
        "GEMINI_PROXY_URL": "http://127.0.0.1:8317/v1beta",
        "GEMINI_MODEL": "gemini-3.8-flash"
      }
    }
  }
}

Tool Reference

Search the live web using Google Search grounding via Gemini. Returns current real-time facts, documentation, news, and verified sources.

Input Schema:

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "The search query or question to research on Google."
    }
  },
  "required": ["query"]
}

Local Development & Testing

Clone the repository and test locally:

git clone https://github.com/kazimshah39/gemini-search-mcp.git
cd gemini-search-mcp

# Test running directly
export GEMINI_API_KEY="your-key-here"
node ./bin/cli.js

You can test JSON-RPC communication by piping JSON:

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' | node ./bin/cli.js

License

MIT © Kazim Shah

Available Tools

1 tool

Tool Schema Changelog

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

  1. 1 tool updatev1.0.0
    • First observedgemini_search

TDQS

A4/5.0

Scored across 1 tool

Disambiguation5/5

Only one tool exists, so there is no risk of misselection or overlapping purpose; an agent cannot confuse it with another tool.

Naming Consistency5/5

The sole tool uses clear snake_case with a descriptive noun/verb structure (gemini_search); no inconsistency is possible with a single tool.

Tool Count4/5

A single search tool is reasonable for a narrowly scoped web-search server, though it is below the typical 3–15 range and could feel thin if broader search operations are expected.

Completeness4/5

The tool covers the core web-search operation and returns current facts, docs, news, and sources, but it lacks advanced parameters (e.g., result count, filters, pagination) that a full search surface might offer.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI agents and coding assistants with advanced web crawling and RAG capabilities, allowing them to scrape websites and leverage that knowledge through various retrieval strategies.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides AI coding agents with a live web search tool that returns extracted, answer-ready text from web pages. Enables real-time information retrieval without any local installation or maintenance.
    2 npm
    MIT