gemini-search-mcp
Provides web search capabilities using Google's AI Mode, allowing agents to search the web and get synthesized answers grounded in real-time results.
Provides an OpenAI-compatible API endpoint for non-MCP clients to use the search functionality, with a base URL of http://localhost:8080/v1.
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-mcpsearch for latest AI regulation news"
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 (cn fork)
Free MCP server for web search powered by Google AI Mode (Gemini). Forked from Sophomoresty/gemini-search-mcp with adaptations for non-US IP environments.
What's different from upstream
Aspect | Upstream | This fork |
Target environment | US IP + headed Chrome + persistent profile | Same, plus auto-fallback for headless/non-US |
AI Mode flow | folwr token via | folwr token via |
Strategy | Single (AI Mode only — fails on non-US) | Dual: AI Mode (headed) + organic SERP (headless) |
Login required | No | No |
Related MCP server: gemini-search
Quick start
# 1. Install
pip install -e .
# 2. Prime a persistent Chrome profile (headed, manual CAPTCHA solve if prompted)
python scripts/prime_chrome_v2.py --profile-dir ~/.cache/gemini-search/chrome-profile
# 3. Add to your MCP config (Claude Desktop, Hermes, etc.)MCP server config:
{
"mcpServers": {
"gemini-search": {
"command": "python",
"args": ["-m", "gemini_search_mcp"],
"env": {
"GEMINI_SEARCH_USER_DATA_DIR": "~/.cache/gemini-search/chrome-profile",
"HEADLESS": "0",
"BROWSER_CHANNEL": "chrome"
}
}
}
}Requirements for AI Mode (full quality)
Google AI Mode is gated by 3 things:
headed Chrome window —
--headless=newtriggers/sorry/CAPTCHApersistent profile — fresh profiles get 91KB JS shell instead of 360KB token page
US-region IP — non-US IPs see "AI Mode is not currently available on your device or account"
When all three are met, the engine auto-detects AI Mode availability during _warmup and uses it. When any fails, it falls back to organic SERP extraction (still 5 results with links, just not AI-synthesized).
Headless fallback
Set HEADLESS=1 to run without a visible window. The engine will:
Use the persistent profile (still required)
Detect that AI Mode is blocked (91KB shell, no
data-srtsttoken)Fall back to extracting top 5 organic Google results from the rendered DOM
Answer quality is lower (snippet concat vs Gemini synthesis) but stable and fast.
MCP tools
Tool | Description |
| Search the web and get a synthesized answer grounded in real-time results |
| General question — Gemini Search decides whether to search the web |
Architecture
Agent calls web_search("query")
→ Chrome Runtime.evaluate (CDP via websockets)
→ _warmup: navigate to google.com/search?q=hello (no udm)
→ builds cookie session (NID, AEC, SNID)
→ Probe AI Mode: fetch google.com/search?q=test&udm=50
→ if has data-srtst token → AI Mode enabled
→ if 91KB shell or /sorry/ → organic fallback
→ ask():
[AI Mode path]
→ fetch AI Mode URL (udm=50&aep=1&ntc=1)
→ extract data-srtst, data-xsrf-folwr-token, data-garc, etc.
→ POST to /async/folwr endpoint
→ parse .pTRUV + .n6owBd blocks from HTML
[Organic path]
→ navigate to /search?q=...
→ extract top 5 div.g blocks from rendered DOMFiles
gemini_search/engine.py— Chrome CDP engine, dual strategygemini_search_mcp/— FastMCP server exposingweb_search+asktoolsgemini_search/server.py— OpenAI-compatible API server (gemini-search --port 8080)scripts/prime_chrome_v2.py— headed CAPTCHA priming helperscripts/uc_google_probe.py— undetected-chromedriver probe (for advanced CAPTCHA bypass)scripts/windows_chrome_profile_probe.py— Windows-specific two-phase profile verifiercompare_v2.py— Gemini Search vs Tavily comparison harness (13 queries)generate_report_v2.py— generates markdown report from results JSON
License
MIT (same as upstream)
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 tools 'ask' and 'web_search' have nearly identical descriptions, both using Google AI Mode and returning AI-generated answers. The only distinction is that 'ask' may optionally skip web search, but this is unclear and overlapping, making it hard for an agent to choose reliably.
Tool names 'ask' (verb) and 'web_search' (noun with underscore) do not follow a consistent pattern. Mixing a simple verb with a compound noun creates inconsistency, and no clear naming convention is evident across the set.
With only 2 tools, the server feels thin for a search service, but it is scoped to Google AI Mode. The count is borderline; it lacks additional tools for raw results or specialized searches, but the core functionality is covered.
For the narrow purpose of AI-powered search with synthesis, the server covers asking general questions and web searches. Minor gaps exist (e.g., no way to get unsynthesized results), but overall the surface is reasonably complete for its stated domain.
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
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
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
- AlicenseNot gradedqualityDmaintenanceFree web search MCP server using SearXNG, supporting web search, news search, and search summaries.MIT