G-搜索 MCP
强大的 Google 搜索 MCP 服务器,可同时使用多个关键字进行并行搜索。
该项目由google-search修改而来。
优势
并行搜索:支持在Google上同时使用多个关键字进行搜索,提高搜索效率
浏览器优化:在单个浏览器实例中打开多个选项卡,以实现高效的并行搜索
自动验证处理:智能检测验证码,并在需要时启用可见浏览器模式进行用户验证
用户行为模拟:模拟真实用户浏览模式,降低被搜索引擎检测到的可能性
结构化数据:以 JSON 格式返回结构化搜索结果,以便于处理和分析
可配置参数:支持各种参数配置,如搜索结果限制、超时设置、区域设置等。
Related MCP server: SerpApi MCP Server
快速入门
直接用npx运行:
npx -y g-search-mcp首次设置 - 通过在终端中运行以下命令来安装所需的浏览器:
npx playwright install chromium调试模式
使用--debug选项以调试模式运行(显示浏览器窗口):
npx -y g-search-mcp --debug配置 MCP
在 Claude Desktop 中配置此 MCP 服务器:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"g-search": {
"command": "npx",
"args": ["-y", "g-search-mcp"]
}
}
}特征
search- 使用多个关键字执行 Google 搜索并返回结果使用 Playwright 浏览器进行搜索
支持以下参数:
queries:要执行的搜索查询数组(必需参数)limit:每个查询返回的最大结果数,默认值为 10timeout:页面加载超时时间(毫秒),默认为 60000(60 秒)noSaveState:是否避免保存浏览器状态,默认为 falselocale:搜索结果的语言环境设置,默认为 en-USdebug:是否启用调试模式(显示浏览器窗口),覆盖命令行中的 --debug 标志
使用示例:
Use the search tool to search for "machine learning" and "artificial intelligence" on Google响应示例:
{
"searches": [
{
"query": "machine learning",
"results": [
{
"title": "What is Machine Learning? | IBM",
"link": "https://www.ibm.com/topics/machine-learning",
"snippet": "Machine learning is a branch of artificial intelligence (AI) and computer science which focuses on the use of data and algorithms to imitate the way that humans learn, gradually improving its accuracy."
},
...
]
},
{
"query": "artificial intelligence",
"results": [
{
"title": "What is Artificial Intelligence (AI)? | IBM",
"link": "https://www.ibm.com/topics/artificial-intelligence",
"snippet": "Artificial intelligence leverages computers and machines to mimic the problem-solving and decision-making capabilities of the human mind."
},
...
]
}
]
}使用技巧
处理特殊网站场景
调整搜索参数
搜索结果数量: 更多搜索结果:
Please return the top 20 search results for each keyword这将设置
limit: 20参数。增加超时时间:对于加载缓慢的情况:
Please set the page loading timeout to 120 seconds这会将
timeout参数调整为 120000 毫秒。
区域设置调整
更改搜索区域:指定不同的区域设置:
Please use Chinese locale (zh-CN) for searching这将设置
locale: "zh-CN"参数。
调试和故障排除
启用调试模式
动态调试激活:在特定搜索操作期间显示浏览器窗口:
Please enable debug mode for this search operation即使服务器启动时没有使用
--debug标志,也会设置debug: true。
安装
先决条件
Node.js 18 或更高版本
NPM 或 Yarn
从源安装
克隆存储库:
git clone https://github.com/jae-jae/g-search-mcp.git
cd g-search-mcp安装依赖项:
npm install安装 Playwright 浏览器:
npm run install-browser构建服务器:
npm run build发展
自动重建(开发模式)
npm run watch使用 MCP Inspector 进行调试
npm run inspector相关项目
fetcher-mcp :一款功能强大的 MCP 服务器,可使用 Playwright 无头浏览器抓取网页内容。它具备智能内容提取、并行处理、资源优化等功能,是理想的网页内容抓取工具。
执照
根据MIT 许可证授权
Appeared in Searches
- Techniques for Scraping Dynamic Websites with JavaScript and Handling CAPTCHA or Proxy Issues
- Information about Meta ads or advertising on Meta platforms
- A list of all Minecraft plugins that can use SSE
- Information about DeepSearch or related platforms/tools
- A tool for translating text between languages