搜索服务MCP服务器

Hermes Search MCP服务器是一个基于Model Context Protocol(MCP)的搜索服务,提供全文和语义搜索功能,支持结构化/非结构化数据的文档索引和管理,适用于AI系统与数据源的交互。

  • by Cognitive-Stack
  • TypeScript
  • 本地部署
  • 4 星标
  • 更新于
在 GitHub 查看 Cognitive-Stack/hermes-search-mcp

使用说明

Hermes搜索MCP服务器🔍

🔌 兼容Cline、Cursor、Claude Desktop和任何其他MCP客户端!

模型上下文协议(MCP)是一个开放标准,使人工智能系统能够与各种数据源和工具无缝交互,促进安全的双向连接。

Hermes Search MCP服务器提供:

  • 结构化/非结构化数据的全文和语义搜索功能
  • Azure认知搜索中的文档索引和管理
  • 具有可定制参数的高效搜索操作
  • 使用TypeScript进行类型安全操作

先决条件🔧

在开始之前,请确保您已经:

  • Azure认知搜索服务和凭据
  • 克劳德桌面或光标
  • Node.js(v20或更高版本)
  • Git已安装(仅在使用Git安装方法时需要)

Hermes Search MCP服务器安装⚡

使用NPX运行

npx -y hermes-search-mcp@latest

通过Smithery安装

要通过Smithery自动安装Hermes Search MCP Server for Claude Desktop,请执行以下操作:

npx -y @smithery/cli install @hermes-search/mcp --client claude

配置MCP客户端⚙️

配置Cline🤖

在Cline中设置Hermes Search MCP服务器的最简单方法是单击一下市场:

  1. 在VS代码中打开Cline
  2. 点击侧边栏中的Cline图标
  3. 导航到“MCP服务器”选项卡(4个方块)
  4. 搜索“Hermes搜索”并点击“安装”
  5. 出现提示时,输入您的Azure认知搜索凭据

或者,您可以在Cline中手动设置Hermes Search MCP服务器:

  1. 打开Cline MCP设置文件:
# For macOS:
code ~/Library/Application\ Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

# For Windows:
code %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
  1. 将Hermes搜索服务器配置添加到文件中:
{
  "mcpServers": {
    "hermes-search-mcp": {
      "command": "npx",
      "args": ["-y", "hermes-search-mcp@latest"],
      "env": {
        "AZURE_SEARCH_ENDPOINT": "your-search-endpoint",
        "AZURE_SEARCH_API_KEY": "your-api-key",
        "AZURE_SEARCH_INDEX_NAME": "your-index-name"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}
  1. 保存文件并重新启动Cline(如果它已经在运行)。

配置光标🖥️

备注:需要Cursor 0.45.6或更高版本

在Cursor中设置Hermes Search MCP服务器:

  1. 打开光标设置
  2. 导航到功能>MCP服务器
  3. 点击“+添加新MCP服务器”按钮
  4. 填写以下信息:
    • 名字:输入服务器的昵称(例如“hermes search mcp”)
    • 类型:选择“command”作为类型
    • 命令:输入运行服务器的命令:
    env AZURE_SEARCH_ENDPOINT=your-search-endpoint AZURE_SEARCH_API_KEY=your-api-key AZURE_SEARCH_INDEX_NAME=your-index-name npx -y hermes-search-mcp@latest
    

    重要:用Azure认知搜索凭据替换环境变量

配置Claude Desktop应用程序🖥️

对于macOS:

# Create the config file if it doesn't exist
touch "$HOME/Library/Application Support/Claude/claude_desktop_config.json"

# Opens the config file in TextEdit
open -e "$HOME/Library/Application Support/Claude/claude_desktop_config.json"

对于Windows:

code %APPDATA%\Claude\claude_desktop_config.json

添加Hermes搜索服务器配置:

{
  "mcpServers": {
    "hermes-search-mcp": {
      "command": "npx",
      "args": ["-y", "hermes-search-mcp@latest"],
      "env": {
        "AZURE_SEARCH_ENDPOINT": "your-search-endpoint",
        "AZURE_SEARCH_API_KEY": "your-api-key",
        "AZURE_SEARCH_INDEX_NAME": "your-index-name"
      }
    }
  }
}

在Claude桌面应用程序中的使用🎯

一旦安装完成,并且配置了Claude桌面应用程序,您必须完全关闭并重新打开Claude桌面程序,才能看到hermes搜索mcp服务器。您应该在应用程序的左下角看到一个搜索图标,指示可用的MCP工具。

Hermes搜索示例

  1. 搜索文档:
Search for documents containing "machine learning" in the Azure Cognitive Search index, returning the top 10 results.
  1. 索引内容:
Index the following documents into Azure Cognitive Search: [{"id": "1", "title": "AI Overview", "content": "Artificial Intelligence is..."}]
  1. 删除索引:
Delete the current Azure Cognitive Search index.

故障排除🛠️

常见问题

  1. 找不到服务器

    • 通过运行验证npm安装 npm --version
    • 检查Claude Desktop配置语法
    • 通过运行以下命令确保Node.js已正确安装 node --version
  2. Azure搜索凭据问题

    • 确认您的Azure认知搜索凭据有效
    • 检查配置中是否正确设置了凭据
    • 验证凭据周围没有空格或引号
  3. 索引访问问题

    • 验证索引是否存在于Azure认知搜索服务中
    • 检查索引权限
    • 确保API密钥具有适当的访问权限

致谢✨

  • MCP规范的模型上下文协议
  • 克劳德桌面的拟人化
  • 微软Azure认知搜索