metasearch MCP server

metasearch MCP server

site icon
2025.04.16 1
Python搜索服务信息检索搜索工具
metasearch-mcp 是一个基于 Tavily API 的 MCP 服务器,主要用于执行搜索查询并返回搜索结果。该服务器能够提供文本格式的搜索结果,包括 AI 响应、URI 和搜索结果标题。适用于需要快速获取网络搜索结果的场景。
View on GitHub

Overview

基本能力

产品定位

metasearch-mcp 是一个基于 Tavily API 的 MCP 服务器,主要用于执行搜索查询并返回搜索结果。

核心功能

  • 执行基于指定查询的搜索。
  • 返回文本格式的搜索结果,包括 AI 响应、URI 和搜索结果标题。
  • 支持基本和高级搜索深度。

适用场景

  • 需要快速获取网络搜索结果的场景。
  • 集成到 Claude Desktop 或 Cursor 等工具中,提供搜索功能。

工具列表

  • search: 执行基于指定查询的搜索。
  • 必需参数: "query"
  • 可选参数: "search_depth" (basic 或 advanced)

常见问题解答

  • 日志存储位置:
  • Windows: C:\Users\[username]\AppData\Roaming\Claude\logs\mcp-server-tavily-search

使用教程

使用依赖

  • 需要 Tavily API 密钥。

安装教程

  1. 下载仓库。
git clone https://github.com/YeonwooSung/metasearch-mcp.git
  1. 打开 Claude Desktop 配置文件。
MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
Windows: `C:\Users\[username]\AppData\Roaming\Claude\claude_desktop_config.json`
  1. 编辑配置文件如下:
"mcpServers": {
  "tavily-search": {
    "command": "uv",
    "args": [
      "--directory",
      "C:\\your_path\\mcp-server-tavily",
      "run",
      "tavily-search"
    ],
    "env": {
      "TAVILY_API_KEY": "YOUR_TAVILY_API_KEY",
      "PYTHONIOENCODING": "utf-8"
    }
  }
}
  1. 重启 Claude Desktop。

调试方式

  • 在 Claude Desktop 中,询问 "Please search for something",将会收到搜索结果。

使用 Cursor 执行

  1. 创建一个 shell 脚本 (例如 script.sh):
#!/bin/bash
TARGET_DIR=/path/to/mcp-server-tavily
cd "${TARGET_DIR}"
export TAVILY_API_KEY="your-api-key"
export PYTHONIOENCODING=utf-8
uv --directory $PWD run tavily-search
  1. 配置 Cursor 的 MCP Server 设置如下:
Name: tavily-search
Type: command
Command: /path/to/your/script.sh
  1. 保存设置。

  2. 询问 Cursor 的 Composer-Agent "search for something",将会返回搜索结果。

使用 Docker Compose 在本地环境运行

  1. 安装 Docker。
  2. 下载仓库。
git clone https://github.com/Tomatio13/mcp-server-tavily.git
  1. 运行 Docker compose。
docker compose up -d
  1. 执行客户端。
docker exec mcp_server uv --directory /usr/src/app/mcp-server-tavily/src run client.py
  1. 执行结果: 搜索可用工具后,将向 Tavily 发出查询并返回响应。

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。