cross-search

cross-search

Enables multi-engine parallel search with cross-validation, combining Brave, Tavily, DuckDuckGo, Wikipedia, Bing, and Mojeek, and labeling results with confidence levels based on engine agreement.

Category
Visit Server

README

Cross Search

🔍 多引擎並行搜索 + 交叉驗證 — 同時調用多個搜索引擎,去重合併、標註置信度,追求絕對準確的事實。

支援兩種模式,覆蓋幾乎所有 AI 智能體:

模式 適用於 安裝方式
OpenClaw Plugin OpenClaw 用戶 openclaw plugins install
MCP Server Claude Desktop、Cursor、ZCode、任何 MCP client node dist/mcp-server.js

✨ 功能

同時調用 Brave + Tavily + DuckDuckGo + Wikipedia + Bing + Mojeek,Promise.all 並行發送、URL 去重合併、交叉驗證,每個結果標註來源引擎同意數同置信度。

🎯 置信度層級

層級 條件 說明
🟢 HIGH ≥50% engines 同意 多引擎獨立驗證,極高可信度
🟡 MEDIUM 2+ engines 同意 部分驗證,可靠
🔴 LOW 單一 engine 未經交叉驗證,需謹慎對待

📦 模式一:OpenClaw Plugin

適用於 OpenClaw 用戶。Agent 自動使用 cross_search 工具。

# 從 GitHub 安裝(推薦)
openclaw plugins install https://github.com/Bryan-cmf/CrossSearch-MCP

# 或 clone 後本地 link 安裝(適合開發)
git clone https://github.com/Bryan-cmf/CrossSearch-MCP.git
cd CrossSearch-MCP
npm install
openclaw plugins install --link .

⚙️ 配置

在 ~/.openclaw/openclaw.json 加入:

{
  plugins: {
    entries: {
      "cross-search": {
        enabled: true,
        config: {
          braveApiKey: "BSA...",           // https://brave.com/search/api/
          tavilyApiKey: "tvly-...",         // https://tavily.com/
          bingApiKey: "xxx",                // optional
          defaultEngines: ["brave", "tavily", "ddg", "wikipedia"],
          maxResultsPerEngine: 10,
          timeoutMs: 10000
        }
      }
    }
  }
}

改完執行 openclaw mcp reload,再重啟 gateway 讓 plugin 生效。


📦 模式二:MCP Server(Claude Desktop / Cursor / ZCode / 任何 MCP client)

把 cross_search 作為 MCP server 運行,任何支援 Model Context Protocol 的智能體都能用。

安裝 + 建構

git clone https://github.com/Bryan-cmf/CrossSearch-MCP.git
cd CrossSearch-MCP
npm install
npm run build      # 產生 dist/mcp-server.js

配置 API Key(環境變數)

MCP server 從環境變數讀取 API key(冇 key 的引擎會自動跳過,免費引擎仍可運作):

export BRAVE_API_KEY="BSA..."          # https://brave.com/search/api/
export TAVILY_API_KEY="tvly-..."        # https://tavily.com/
export BING_API_KEY="xxx"               # 可選

# 可選調整
export CROSS_SEARCH_ENGINES="brave,tavily,ddg,wikipedia"   # 預設引擎
export CROSS_SEARCH_MAX_RESULTS="10"                       # 每引擎最大結果數
export CROSS_SEARCH_TIMEOUT_MS="10000"                     # 超時(ms)

💡 冇任何 API key 也能用:ddg + wikipedia + mojeek 三個免費引擎仍提供交叉驗證。

接入 MCP client

Claude Desktop(~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "cross-search": {
      "command": "node",
      "args": ["/path/to/CrossSearch-MCP/dist/mcp-server.js"],
      "env": {
        "BRAVE_API_KEY": "BSA...",
        "TAVILY_API_KEY": "tvly-..."
      }
    }
  }
}

Cursor / 其他 MCP client:同樣格式,指定 node dist/mcp-server.js + env。

OpenClaw 自己也能用 MCP 模式(~/.openclaw/openclaw.json):

{
  "mcp": {
    "servers": {
      "cross-search": {
        "command": "node",
        "args": ["/path/to/CrossSearch-MCP/dist/mcp-server.js"],
        "env": { "BRAVE_API_KEY": "BSA...", "TAVILY_API_KEY": "tvly-..." }
      }
    }
  }
}

驗證

# 測試 server 能否啟動 + 列出工具
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | \
  BRAVE_API_KEY="BSA..." node dist/mcp-server.js

成功會回傳 serverInfo: cross-search 0.1.0 同 cross_search 工具定義。

MCP 模式特色

  • 同時返回文字 + JSON:content 含可讀報告 + 結構化數據,畀 agent 自行揀用
  • 自動引擎過濾:缺 key 的付費引擎會被靜默跳過,唔會報錯
  • 跨平台:任何 OS、任何 MCP client,只要識行 node

🧰 可用引擎

引擎 需要 API Key 免費額度 說明
brave ✅ 2000/月 Brave Search API(獨立索引+新聞+社群)
tavily ✅ 1000/月 Tavily AI Search(結構化摘要)
ddg ❌ 無限 DuckDuckGo(HTML 抓取)
wikipedia ❌ 無限 Wikipedia REST API
bing ✅ 視計劃 Bing Web Search API
mojeek ❌ 無限 Mojeek(獨立索引)

💡 即使冇任何 API key,ddg + wikipedia + mojeek 三個免費引擎仍可提供交叉驗證。

🚀 使用

裝好後,agent 會自動使用 cross_search 工具。你也可以明確指示:

  • 「用 cross_search 查一下...」
  • 「用交叉驗證搜索幫我查...」
  • 「同時用多個引擎搜尋...」

工具會返回每條結果的來源引擎、同意數、置信度標記。

📋 配置項

項目 類型 預設 說明
braveApiKey string — Brave Search API Key
tavilyApiKey string — Tavily API Key
bingApiKey string — Bing Search API Key(可選)
defaultEngines string[] ["brave","tavily","ddg","wikipedia"] 預設啟用的引擎
maxResultsPerEngine number 10 每個引擎返回最大結果數(1-20)
timeoutMs number 10000 每個引擎請求超時(3000-30000ms)

🔧 開發

git clone https://github.com/Bryan-cmf/CrossSearch-MCP.git
cd CrossSearch-MCP
npm install
npm run build    # tsc → dist/

📄 License

MIT — 見 LICENSE

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured