gsearch
🚨 免责声明 🚨
这只是提个醒。我们还没有看到任何因使用 GSearch 而导致的封禁。
与 Google 没有关联。使用与 开源 Gemini CLI 相同的公共 OAuth 客户端和 API。
Google 最近封禁了一些 OpenClaw 用户。在我看来,OpenClaw 对 OAuth 提供商的使用方式看起来属于滥用。GSearch 并不符合这种模式。风险依然存在。
请求会携带 Gemini CLI 的 User-Agent、ideType 和请求形状,因此在网络传输中几乎与官方客户端无法区分 (如果你是谷歌员工:我们是好人,请不要针对我们 🙏)。如果你对此介意,可以使用一次性 Google 账户。
GSearch - Free Google Search MCP
让 Claude Code、Codex CLI、Cursor 等 AI 工具通过 Google Search grounding 获得实时网页搜索能力。单二进制文件,零运行时依赖。任意 Google 账户免费使用。
安装
curl -fsSL https://raw.githubusercontent.com/daanielcruz/gsearch-mcp/main/install.sh | bash或从源码构建:
git clone https://github.com/daanielcruz/gsearch-mcp && cd gsearch-mcp
make build && ./gsearch-installer安装时会下载二进制文件,并自动配置 Claude Code、Codex 和 Cursor(如果可用)。
Related MCP server: SERPJET MCP Server
工作原理
Claude Code / Codex CLI / Cursor / Others...
| MCP (stdio)
gsearch-server (Go binary)
| OAuth2
Google Code Assist API
| googleSearch grounding
Answer with [1][2][3] source links当 AI 工具调用 google_search 时,GSearch 会返回带内联引用的有效答案:
The current time in Sao Paulo is 08:13 AM.[1][2]
Sao Paulo observes Brasilia Time (BRT), UTC-3.[3]
Sources:
[1] Time in Sao Paulo (https://...)
[2] World Clock (https://...)
[3] Time Zone Info (https://...)定价与限制
GSearch 使用与 Gemini CLI 相同的 Google Search grounding API。任何 Google 账户均可免费使用。 无需 API 密钥,无需信用卡,无需账单设置。
正常使用时的频率限制相对宽松。如果出现突发请求,服务器会自动进行动态退避并重试。
身份验证
有三种方法:
Gemini CLI(如果已经安装) — GSearch 直接复用
~/.gemini/oauth_creds.json中的现有凭证交互式 OAuth —
./gsearch-installer会打开浏览器供 Google 登录使用API key(API 密钥) ——从 aistudio.google.com 粘贴 Gemini API 密钥到安装器中,或设置
GEMINI_API_KEY/GSEARCH_API_KEY环境变量
OAuth 模式通过 Google Code Assist API 自动创建新账户(首次使用可能需要短信验证)。API 密钥模式会完全跳过 OAuth 直连 Gemini API。
配置
安装器会全自动完成所有配置。手动安装方式,请在 MCP 客户端配置中添加以下内容:
{
"mcpServers": {
"gsearch": {
"command": "npx",
"args": ["-y", "@daanielcruz/gsearch-mcp"]
}
}
}适用于 Claude Code(~/.claude.json)、Cursor(~/.cursor/mcp.json)以及任何兼容 MCP 的工具。
针对 Codex CLI(~/.codex/config.toml):
[mcp_servers.gsearch]
command = 'npx'
args = ['-y', '@daanielcruz/gsearch-mcp']仅在自动探测失败时,才需要设置 GSEARCH_PROJECT 环境变量。
许可证
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search Google straight from your AI agent. Web results, images, videos, news, products, scholarly ar
Web search, Google SERP, page extraction to markdown and cited answers for AI agents.
Web search and page-reading for AI agents. One-click OAuth connect, or a Caesar API key.
Give AI assistants access to real-time data. Search the web, compare flights, find hotels, and more.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides Google Search functionality for AI models using Gemini's built-in Grounding with Google Search feature, returning real-time web search results with source citations.183Apache 2.0
- AlicenseAqualityDmaintenanceEnables AI agents to perform Google searches and retrieve structured JSON results for 10 types including web, images, news, and shopping with live prices. Offers 1,000 free searches per month with no credit card required.137 npmMIT
- AlicenseAqualityDmaintenanceEnables AI assistants to perform Google searches with real, resolvable sources and transparent search terms.164 npm1MIT
- AlicenseAqualityBmaintenanceConnects AI assistants to web page content and Google search results, enabling them to retrieve HTML, Markdown, or screenshots from a URL, run Google queries, and check account plan and token usage. It supports hosted OAuth sign-in as well as local and self-hosted deployments with an API key.3226 npm1MIT