gemini-search-mcp
Provides an OpenAI-compatible API endpoint for web search, enabling non-MCP clients to perform search queries through a standard chat completion interface.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gemini-search-mcpWhat is the price of Bitcoin today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gemini-search-mcp
What is this
An MCP server that gives any AI agent (Claude, Cursor, Windsurf, etc.) the ability to search the web in real-time using Google's AI Mode — the same Gemini-powered search that lives in the "AI Mode" tab on Google Search.
Think of it as a free, unlimited alternative to Grok MCP / Tavily / SerpAPI, backed by Google's search index.
Related MCP server: gemini-search
Features
Free: No API key, no subscription, no quota
Unlimited: 60+ requests/min with zero rate limiting
Google quality: Powered by Gemini + Google Search (grounded in real web results)
MCP native: Works with Claude Desktop, Claude Code, Cursor, Windsurf, Cline
Also ships OpenAI API:
/v1/chat/completionsfor non-MCP clientsFast: ~1.5s average response time
Quick Start
pip install -e .
# Optional: install the undetected-chromedriver backend for CAPTCHA probes.
pip install -e '.[undetected]'MCP Server (for AI agents)
gemini-search-mcpOpenAI-compatible API
gemini-search --port 8080MCP Integration
Claude Code
claude mcp add gemini-search -- gemini-search-mcpClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"gemini-search": {
"command": "gemini-search-mcp",
"args": [],
"env": {
"CDP_URL": "http://127.0.0.1:9222"
}
}
}
}Cursor / Windsurf
Same pattern — point to gemini-search-mcp as an stdio MCP server.
MCP Tools
Tool | Description |
| Search the web and get a synthesized answer grounded in real-time results |
| General question — AI Mode auto-decides whether to search the web |
Examples
web_search("latest AI regulation news 2026")
→ "The EU AI Act enforcement began on June 1, 2026, requiring..."
web_search("Bitcoin price today")
→ "As of June 30, 2026, Bitcoin is trading at $59,687 USD..."
ask("what is 1847 * 293")
→ "541171"OpenAI API Usage
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gemini-search","messages":[{"role":"user","content":"What happened in the news today?"}]}'Field | Value |
Base URL |
|
API Key | anything |
Model |
|
Environment Variables
Variable | Default | Description |
| (none) | Chrome DevTools URL. If set, connects to existing Chrome instead of launching one |
|
| Browser to use: |
|
| Set to |
| (none) | Persistent Chrome profile directory. Reuses cookies across runs and is not deleted on shutdown |
|
| CDP port used for self-launched Chrome |
|
| Browser launcher: |
| (none) | Chrome proxy server, e.g. |
| (none) | Chromedriver executable used by the |
Persistent Chrome profile / CAPTCHA priming
If Google shows /sorry/ CAPTCHA for a fresh temporary profile, prime a persistent profile once in a visible Chrome window, then reuse the same directory in headless mode:
# 1) Visible first run: solve CAPTCHA manually if Google asks.
gemini-search --no-headless --user-data-dir "$HOME/.local/share/gemini-search-mcp/chrome-profile"
# 2) Later runs: reuse the same cookies headlessly.
GEMINI_SEARCH_USER_DATA_DIR="$HOME/.local/share/gemini-search-mcp/chrome-profile" gemini-searchFor Windows-side validation from WSL, run the probe with Windows Python through PowerShell so it launches Windows Chrome:
$profile = Join-Path $env:TEMP 'gemini-search-mcp-persistent-profile'
python .\scripts\windows_chrome_profile_probe.py `
--profile-dir $profile `
--mode two-phase `
--out .\headless-reuse-result.jsonSuccess evidence is ok=true and stages.headless_reuse.captcha=false in the JSON output.
undetected-chromedriver CAPTCHA probe
When a normal Chrome subprocess gets a Google /sorry/ CAPTCHA, install the optional backend and run the reusable probe against google.com.hk:
pip install -e '.[undetected]'
python scripts/uc_google_probe.py \
--proxy socks5://127.0.0.1:7897 \
--out-json uc-probe.jsonUse the backend only when the probe reports ok=true, captcha=false, and successful_for_engine_integration=true.
gemini-search \
--browser-backend undetected \
--proxy-server socks5://127.0.0.1:7897 \
--chromedriver-path /path/to/chromedriver \
--no-headlessObserved on Windows Chrome for Testing 148 through Clash: headed UC passed (captcha=false and AI Mode tokens present), while headless UC hit Google /sorry/.
How It Works
Google rate-limits by TLS fingerprint quality — not by IP. Automated HTTP clients (curl, requests, httpx) get throttled after a few requests. But a real Chrome browser's fetch() calls are trusted unconditionally.
This tool runs a single real Chrome tab and executes all queries as fetch() inside it over CDP, giving every request an authentic Chrome TLS/HTTP2 fingerprint. Google sees normal browser traffic and applies no rate limits. The optional undetected backend still uses the same CDP query path after launch.
Agent calls web_search("query")
→ Chrome Runtime.evaluate(fetch)
→ Google Search AI Mode (token extraction + folwr endpoint)
→ Parse answer from HTML response
→ Return to agentComparison
gemini-search-mcp | Grok MCP | Tavily | |
Cost | Free | xAI API key ($) | API key ($) |
Rate limit | None | API quota | API quota |
Search backend | Google Search | Grok + web | Proprietary |
Answer quality | Gemini synthesized | Grok synthesized | Extracted snippets |
Setup | Chrome + CDP | API key | API key |
Docker
docker compose up -dRequirements
Python 3.10+
Chrome, Edge, or Chromium
Runtime dependencies from
pyproject.tomlOptional:
undetected-chromedriverandseleniumviapip install -e '.[undetected]'
Limitations
Requires Chrome/Edge/Chromium installed
No conversation memory between requests
Answer extraction relies on Google's DOM structure (may break on updates)
Streaming is chunked, not per-token
Acknowledgments
GenericAgent — 本项目核心开发依仗 GA 提供的 AI 能力
linux.do community
License
MIT
Available Tools
2 toolsaskARead-only
Ask Google AI Mode any question and get an AI-generated answer.
Similar to web_search but intended for general questions that may or may not require web search. Google AI Mode will automatically decide whether to search the web or answer from its training data.
Args: prompt: Any question or instruction. Google AI Mode will search the web if needed and synthesize an answer.
Returns: AI-generated answer, potentially grounded in web search results.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes the automatic decision process between web search and training data, and specifies return type as 'AI-generated answer, potentially grounded in web search results'. Annotations already declare readOnlyHint=true, and description aligns without contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise with no fluff. Front-loaded with purpose, then comparison, then structured Args and Returns sections. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With only one parameter and an output schema (implied), the description covers the tool's behavior, input, and output adequately. Mentions sibling tool for differentiation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage for the parameter, but the description provides an explicit Args section explaining 'prompt: Any question or instruction. Google AI Mode will search the web if needed and synthesize an answer.' This adds meaningful semantics beyond the schema type.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Ask Google AI Mode any question and get an AI-generated answer' - specific verb+resource. Distinguishes from sibling web_search by noting it's for general questions that may not require web search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly compares to web_search and explains that Google AI Mode decides whether to search the web or answer from training data, providing good context on when to use. Lacks explicit 'when not to use' but covers key distinction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
web_searchARead-only
Search the web using Google AI Mode and get a synthesized answer with sources.
Uses Google Search's AI Mode (powered by Gemini) to search the web in real-time and return a comprehensive, grounded answer. Results include information from current web pages, news, and data.
This is equivalent to using Google Search's "AI Mode" tab — the AI reads multiple web sources and synthesizes an answer, similar to Perplexity or Grok's web search, but powered by Google's search index.
Args: query: Search query or question. Can be anything you'd type into Google. Examples: "latest news about AI regulation", "Bitcoin price today", "how does mRNA vaccine work", "Python asyncio best practices 2026"
Returns: A synthesized answer based on real-time web search results. The answer is grounded in actual web content found by Google.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds context beyond the readOnlyHint annotation by explaining it searches in real-time, synthesizes answers from multiple sources, and is powered by Gemini. It is consistent with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear first-line purpose, followed by technical context, and separate Args/Returns sections. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given a single required parameter and an output schema, the description adequately covers behavior and return format. Minor omission: no mention of limitations or rate limits.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Despite 0% schema description coverage, the description provides extensive guidance on the 'query' parameter with examples, clarifying it can be any search query or question.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches the web using Google AI Mode and returns a synthesized answer with sources. It is distinct from sibling 'ask' tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives context that this is for general web queries and provides examples, but does not explicitly state when not to use it or compare it to alternatives like 'ask'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.4.0- First observed
ask - First observed
web_search
TDQS
Scored across 2 tools
The two tools have distinct intentions: 'ask' for general questions that may use training data, and 'web_search' for explicit web-grounded answers. The description of 'ask' clarifies it is similar but flexible, reducing ambiguity. However, an agent might still be uncertain which to choose when a question could be answered from either source.
'ask' is a single verb, while 'web_search' is verb_noun with underscore. They do not follow a consistent pattern, which could be slightly confusing. However, both names are descriptive and readable.
With only 2 tools, the server feels thin for a search/QA domain. Typically a well-scoped server has 3-15 tools. However, for a specialized server focused on Google AI Mode, two tools (one for general questions and one for web search) might suffice, but it's on the lower end of acceptable.
The server covers two modes of AI-powered answering, but lacks a tool for pure training-data answers without web search, as 'ask' may still use web search. Users cannot force offline-only answers. Additionally, there is no tool for raw search results, only synthesized answers. This leaves notable gaps for a comprehensive search toolset.
Maintenance
Related MCP Connectors
Docs: https://docs.keenable.ai/mcp-server Keenable is a free, remote MCP server that gives agents access to the web index. Search the web with ranked results and date/site filters, then fetch any indexed page as clean markdown. Works out of the box with no account or API key.
MCP server for Google search results via SERP API
Scrape, crawl and search the web for AI agents via MCP.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that enables AI models to perform Google Web searches using the Gemini API, complete with citations and grounding metadata for accurate information retrieval. It is compatible with Claude Desktop and other MCP clients for real-time web access.13Apache 2.0
- AlicenseAqualityDmaintenanceFree, unlimited web search MCP server using Gemini CLI's Google Search grounding to provide cited, live web results for any AI agent.31MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for internet search via direct Google and DuckDuckGo HTML scraping with AI-powered result normalization and optional summarization, requiring no API keys for search.MIT
- AlicenseAqualityDmaintenanceFree, unlimited web search MCP server powered by Google AI Mode (Gemini) without API key. Provides real-time search results for AI agents like Claude, Cursor, and Windsurf.2MIT