← Back to MCP directory
publicPublicdnsLocal runtime

Gemini Search

一个基于Gemini API和Google搜索的MCP服务器,通过与AI助手(如Cline)结合使用,提供最新信息的智能回答功能。

article

README

🚀 天秤座搜索 MCP 服务器

一个借助 Gemini API 和 Google 搜索,依据最新信息生成回答的 MCP 服务器。本服务器旨在与 AI 助手结合使用,为用户提供更精准、全面的搜索结果。

MCP Server

⚠️ 重要提示

此 MCP 服务器无法单独运行,它需要与 Cline 等 AI 助手结合使用。将该项目加载到 AI 助手后,Gemini 搜索功能即可启用。

✨ 主要特性

工具

  • search - 利用 Gemini 2.0 和 Google 搜索生成回答
    • 接收查询作为输入,并返回 Gemini 的回答及相关搜索结果

📦 安装指南

安装依赖项

npm install

构建项目

npm run build

设置环境变量

在项目根目录创建一个 .env 文件,内容如下:

GEMINI_API_KEY=your_api_key_here

注意:您可以在 Google AI Studio 获取 Gemini API 密钥。

💻 使用示例

开发期间自动构建

npm run watch

与 Claude Desktop 结合使用

添加以下配置:

Windows 系统路径:%APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["path/to/gemini-search-server/build/index.js"],
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}

调试

由于 MCP 服务器通过 stdio 进行通信,我们推荐使用 MCP Inspector 进行调试:

npm run inspector

Inspector 提供一个 URL,用于在浏览器中访问调试工具。

📄 许可证

该项目的代码根据 MIT License 发布。 但请注意,此项目使用了 Google Gemini API,需遵守其 服务条款。使用此 MCP 服务器时,必须同时遵循 MIT 许可证和 Google 的服务条款。

READY-TO-PASTE CONFIG

MCP client config generator

Choose your client, fill the required environment variables, then copy a config generated from this server's published metadata

terminal
data_object

This entry does not contain a standard command or remote URL, so a safe client config cannot be generated automatically

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client