Back to MCP directory
publicPublicdnsLocal runtime

one-search-mcp

一个集成了多种搜索引擎和网页爬取功能的MCP服务器实现

article

README

🚀 OneSearch MCP 服务器:网络搜索、抓取与提取

OneSearch MCP 服务器是一个集成了 Searxng、Tavily、DuckDuckGo、Bing 等搜索引擎的模型上下文协议(MCP)服务器实现。它具备网络搜索、本地浏览器搜索、网页抓取和内容提取等功能,并且与 Firecrawl 进行了集成,为用户提供了强大且全面的搜索与数据提取解决方案。

🚀 快速开始

您可以按照以下步骤安装和配置 OneSearch MCP 服务器,以满足您的搜索和数据提取需求。

✨ 主要特性

  • 多工具支持:支持多种网络搜索和网页抓取工具,如 SearXNGFirecrawlTavilyDuckDuckGoBing 等,为用户提供多样化的搜索选择。
  • 本地浏览器搜索:支持使用多种搜索引擎进行本地浏览器搜索,包括 BingGoogleBaiduSogou 等。
    • 使用 puppeteer-core 抓取网页内容。
    • 需要安装本地浏览器,如 ChromiumGoogle ChromeGoogle Chrome Canary 等。
    • 免费使用,无需密钥。
  • 已启用工具one_searchone_scrapeone_map,方便用户进行搜索、抓取和数据映射操作。
  • 自托管服务支持:支持自托管 SearXNG、Firecrawl 等服务(请参阅 部署),满足用户对数据安全和定制化的需求。

📦 安装指南

使用 Smithery 自动安装

通过 Smithery 可以自动为 Claude Desktop 安装 OneSearch:

npx -y @smithery/cli install @yokingma/one-search --client claude

手动安装

# 手动安装(可选)
npm install -g one-search-mcp
# 使用 npx
env SEARCH_API_URL=http://127.0.0.1:8080 FIRECRAWL_API_URL=http://127.0.0.1:3002 npx -y one-search-mcp

📚 详细文档

环境变量配置

搜索引擎相关

  • SEARCH_PROVIDER(可选):使用的搜索提供程序,支持 searxngduckduckgobingtavilylocal,默认为 local
  • SEARCH_API_URL(可选):SearxNG API 的 URL,使用 searxng 时必填。
  • SEARCH_API_KEY(可选):搜索 API 的密钥,具体取决于使用的搜索引擎。

示例配置

# 使用 Searxng 并指定代理和日志级别
SEARXNG_API_URL=https://api.searxng.org \
SEARXNG_API_KEY=your_api_key_here \
SEARCH_PROVIDER=searxng \
LOG_LEVEL=debug

在不同平台的运行配置

在 Cursor 上运行

{
  "mcp": {
    "servers": [
      {
        "type": "file",
        "path": "./config.json"
      }
    ],
    "tools": {
      "one_search": {
        "env": {
          "SEARCH_API_URL": "http://127.0.0.1:8080",
          "FIRECRAWL_API_URL": "http://127.0.0.1:3002"
        }
      }
    }
  }
}

在 Windsurf 上运行

{
  "mcp_server": {
    "tools": {
      "one_search": {},
      "one_scrape": {},
      "one_map": {}
    }
  }
}

自托管服务

  • Searxng:支持通过 API 调用进行网络搜索。
  • Firecrawl:提供强大的网页抓取和爬虫功能。

故障排除与问题解决

网络连接问题

若无法访问 Searxng 或 Firecrawl 服务,请检查网络配置和代理设置:

# 验证 API 连通性
curl https://api.searxng.org

日志与调试信息

启用详细日志输出以帮助排查问题:

# 启用 debug 级别日志
LOG_LEVEL=debug one-search-mcp

📄 许可证

本项目遵循 MIT 许可证,具体请参阅 LICENSE 文件。

通过以上内容,您可以详细了解如何安装、配置和使用 OneSearch MCP 服务器,并根据实际需求进行相应的调整和优化。

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