gemini-search-mcp
MCP server for web search powered by Google AI Mode (Gemini). Enables any AI agent to search the web in real-time for free and without rate limits.
README
gemini-search-mcp
<p align="center"> <img src="banner.png" width="700" alt="gemini-search-mcp"> </p>
<p align="center"> <img src="logo.png" width="120" alt="logo"> </p>
<p align="center"> MCP server for web search powered by Google AI Mode (Gemini). Free, unlimited, no API key. </p>
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.
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 clients - Fast: ~1.5s average response time
Quick Start
pip install playwright fastapi uvicorn "mcp[cli]"
playwright install chrome
MCP Server (for AI agents)
python mcp_server.py
OpenAI-compatible API
python -m gemini_search --port 8080
MCP Integration
Claude Code
claude mcp add gemini-search -- python /path/to/gemini-search-mcp/mcp_server.py
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"gemini-search": {
"command": "python",
"args": ["/path/to/gemini-search-mcp/mcp_server.py"],
"env": {
"CDP_URL": "http://127.0.0.1:9222"
}
}
}
}
Cursor / Windsurf
Same pattern — point to mcp_server.py as an stdio MCP server.
MCP Tools
| Tool | Description |
|---|---|
web_search(query) |
Search the web and get a synthesized answer grounded in real-time results |
ask(prompt) |
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 | http://localhost:8080/v1 |
| API Key | anything |
| Model | gemini-search |
Environment Variables
| Variable | Default | Description |
|---|---|---|
CDP_URL |
(none) | Chrome DevTools URL. If set, connects to existing Chrome instead of launching one |
BROWSER_CHANNEL |
chrome |
Browser to use: chrome, msedge, chromium |
HEADLESS |
1 |
Set to 0 to show browser window |
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 Playwright page and executes all queries as fetch() inside it, giving every request an authentic Chrome TLS/HTTP2 fingerprint. Google sees normal browser traffic and applies no rate limits.
Agent calls web_search("query")
→ Playwright page.evaluate(fetch)
→ Google Search AI Mode (token extraction + folwr endpoint)
→ Parse answer from HTML response
→ Return to agent
Comparison
| 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 + playwright | API key | API key |
Docker
docker compose up -d
Requirements
- Python 3.10+
- Chrome, Edge, or Chromium
playwright,fastapi,uvicorn,mcp[cli]
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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。