Skip to main content
Glama

Web Search MCP

マルチソースのWeb検索MCPサーバー。RRF融合、4層URL抽出、プロバイダーヘルス追跡を備えています。

ステータス

フェーズ2: 5つのプロバイダー(SearXNG/ddgr/Tavily/Exa/opencli-zh)、RRF融合、スニペットクリーニング(ルール + オプションのLLM圧縮)、search/extract/doctorツール、自動劣化付きプロバイダーヘルス追跡。

Related MCP server: Prism

インストール

Claude Desktop 3P設定に追加(~/Library/Application Support/Claude-3p/configLibrary/<uuid>.json):

{
  "name": "web-search",
  "source": "user",
  "transport": "stdio",
  "command": "node",
  "args": ["/Users/hades/projects/web-search-mcp/bin/cli.js"],
  "env": {
    "SEARXNG_URL": "http://localhost:18443",
    "TAVILY_API_KEY": "...",
    "EXA_API_KEY": "...",
    "FIRECRAWL_API_KEY": "...",
    "WSM_LLM_PROVIDER": "haiku",
    "ANTHROPIC_API_KEY": "..."
  },
  "toolPolicy": {
    "search": "allow",
    "extract": "allow",
    "doctor": "allow"
  }
}

npmに公開されたら、command: "node" + 絶対パスを command: "npx" + args: ["-y", "@thehappyboy/web-search-mcp@latest"] に置き換えてください。

設定

環境変数(またはカレントディレクトリの.env~/.agents/skills/web-search/.env):

変数

デフォルト

必須

説明

SEARXNG_URL

http://localhost:18443

いいえ

SearXNGのベースURL

TAVILY_API_KEY

いいえ

Tavilyプロバイダーを有効化

EXA_API_KEY

いいえ

Exaプロバイダーを有効化

FIRECRAWL_API_KEY

いいえ

Firecrawlを抽出パイプラインで有効化(レイヤー3)

WSM_LLM_PROVIDER

none

いいえ

haikuでAnthropic、localでOllama、noneで無効化

ANTHROPIC_API_KEY

いいえ

WSM_LLM_PROVIDER=haikuの場合に必要

WSM_LOCAL_LLM_URL

いいえ

WSM_LLM_PROVIDER=localの場合に必要

WSM_MAX_RESULTS

10

いいえ

デフォルトの最大結果数

WSM_TIMEOUT_MS

25000

いいえ

グローバル検索タイムアウト

キーのないプロバイダーは自動的に無効化されます。検索ツールは利用可能なもので動作します。ddgropenclidefuddlewhichで自動検出されます。

ツール

{
  query: string,              // required
  max_results?: number,       // 1-30, default 10
  category?: 'general'|'news'|'science',
  mode?: 'fast'|'quality',    // quality = LLM compression (top-5 results)
  providers?: string[],       // override default list (replace semantics)
}

戻り値:

{
  count: number,
  took_ms: number,
  providers_used: string[],     // providers that returned ≥1 result
  providers_failed: string[],   // providers that errored OR returned []
  results: [{
    title, url, snippet,
    providers: string[],        // which sources surfaced this URL (multi-source corroboration)
    rrf_score: number,          // reciprocal rank fusion score
  }]
}

opencli-zh自動ルーティング: クエリに知乎小红书雪球B站微博などのキーワードや600519.SHのようなパターンが含まれる場合、opencli-zhプロバイダーは対応するアダプターにルーティングします。opencli_sitesで特定のサイトを強制できます(プロバイダー拡張経由で渡されます。オーケストレーター参照)。

extract

{
  url: string,                 // required
  timeout?: number,            // 5-60 seconds, default 20
}

成功するまで4つのレイヤーを順に試行:

  1. defuddle — 最速、プレーンテキストサイト

  2. opencliアダプター — 既知のサイト向け(zhihu/xiaohongshu/xueqiu/bilibili/weibo)

  3. Firecrawl — JSレンダリングページ(FIRECRAWL_API_KEYが必要)

  4. opencliブラウザ — 最終手段、実際のChromeを駆動

戻り値:

{
  content: string,             // markdown
  source: 'defuddle'|'opencli'|'firecrawl'|'opencli-browser'|'none',
  took_ms: number,
  error?: string,              // only when source === 'none'
}

doctor

{} // no arguments

プロバイダーの可用性と実行時ヘルス統計を返します:

{
  providers: {
    searxng:    { available: true, url: "http://localhost:18443" },
    ddgr:       { available: true },
    tavily:     { available: true },
    exa:        { available: true },
    opencli_zh: { available: true },
    firecrawl:  { available: true },
    llm:        { available: true, provider: "haiku" },
  },
  health: {
    tavily: {
      total: 24,
      success: 15,
      fail: 9,
      success_rate: 0.625,
      last_failure: "2026-07-06T...",
      last_failure_reason: "timeout",
      recommendation: "healthy" | "insufficient" | "degraded",
    },
    // ...
  },
  version: "0.2.0",
}

プロバイダーのsuccess_rateが0.5未満でサンプル数が20以上の場合、自動的にスキップされます(推奨: degraded)。ヘルス統計はメモリ内に保持され、再起動時にリセットされます。

開発

npm test                  # all tests (unit + integration, 158 total)
npm run test:unit         # unit only
npm run test:integration  # integration only (needs searxng at SEARXNG_URL)
npm start                 # start stdio server

アーキテクチャ

MCP client (Claude/Cowork)
  │ JSON-RPC over stdio
  ▼
server.js ───┬── search tool ──→ search.js (orchestrator)
             ├── extract tool ─→ extract/index.js (4-layer pipeline)
             └── doctor tool ──→ health tracker snapshot

search.js:
  Provider layer (parallel, isolated failure)
    searxng | ddgr | tavily | exa | opencli-zh
  ▼
  Merger layer: normalize → dedup(URL) → RRF(k=60)
  ▼
  Cleaner layer: rules (default) | LLM compression (quality mode, top-5)
  ▼
  Health tracker records success/failure per provider

extract/index.js:
  defuddle → opencli adapter → Firecrawl → opencli browser
  (each layer returns null on failure, falls through to next)

フェーズ履歴

  • フェーズ1 (15タスク): 4プロバイダー(searxng/ddgr/tavily/exa)、RRF融合、ルールベースのクリーニング、stdio MCP、searchツールのみ

  • フェーズ2 (8タスク): opencli-zhプロバイダー、LLM品質モード、4層extractdoctor + ヘルス自動劣化

ライセンス

MIT

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • MCP server for Google search results via SERP API

  • Multi-engine search for AI agents. Trust scoring, local corpus, MCP-native. Self-hostable, BYOK.

  • Fast, intelligent web search and web crawling. New mcp tool: Exa-code is a context tool for coding

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thehappyboy/web-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server