SearXNG MCP Server

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Included as one of the search engines that SearXNG queries for results, configured with the shortcut 'd'.

  • Included as one of the search engines that SearXNG queries for results, configured with the shortcut 'g'.

  • Integrates with SearXNG to provide privacy-focused meta search capabilities, combining results from multiple search engines with features like language support, time range filtering, and safe search.

SearXNG MCP サーバー

SearXNG と統合し、プライバシー重視のメタ検索機能を提供する MCP サーバー実装。

特徴

  • メタ検索: 複数の検索エンジンの結果を結合します
  • プライバシー重視:追跡なし、ユーザープロファイリングなし
  • 複数のカテゴリ: 一般、ニュース、科学、ファイル、画像、ビデオなどをサポート
  • 言語サポート: 特定の言語またはすべての言語で検索
  • 時間範囲フィルタリング: 日、週、月、年で結果をフィルタリングします
  • セーフサーチ: 3段階のセーフサーチフィルタリング
  • フォールバックサポート: 信頼性のための複数の SearXNG インスタンス

インストール

npm install -g @kevinwatt/mcp-server-searxng

使用法

直接実行

mcp-server-searxng

ダイブデスクトップ

  1. Diveデスクトップで「+ MCPサーバーを追加」をクリックします。
  2. 次の設定をコピーして貼り付けます。
{ "mcpServers": { "searxng": { "command": "npx", "args": [ "-y", "@kevinwatt/mcp-server-searxng" ] } } }
  1. 「保存」をクリックしてMCPサーバーをインストールします

ツールドキュメント

  • ウェブ検索
    • 複数のエンジンでメタ検索を実行する
    • 入力:
      • query (文字列): 検索用語
      • page (数値、オプション):ページ番号(デフォルト:1)
      • language (文字列、オプション): 言語コード (例: 'en'、'all'、デフォルト: 'all')
      • categories (配列、オプション):検索カテゴリ(デフォルト:['general'])
        • 利用可能: 「一般」、「ニュース」、「科学」、「ファイル」、「画像」、「動画」、「音楽」、「ソーシャルメディア」、「IT」
      • time_range (文字列、オプション): 時間フィルター (日/週/月/年)
      • safesearch (数値、オプション): セーフサーチレベル (0: なし、1: 中、2: 厳密、デフォルト: 1)

発達

git clone https://github.com/kevinwatt/mcp-server-searxng.git cd mcp-server-searxng npm install npm run build npm start

ライセンス

このMCPサーバーはMITライセンスに基づいてライセンスされています。詳細はLICENSEファイルをご覧ください。

前提条件

ローカルのSearXNGインスタンスが稼働している必要があります。設定方法は次のとおりです。

DockerでSearXNGを実行する

クイックスタート

# Create config directory mkdir -p searxng # Create config file tee searxng/settings.yml << EOF use_default_settings: true server: bind_address: "0.0.0.0" secret_key: "CHANGE_THIS_TO_SOMETHING_SECURE" # Generate a random key port: 8080 search: safe_search: 0 formats: - html - json engines: - name: google engine: google shortcut: g - name: duckduckgo engine: duckduckgo shortcut: d - name: bing engine: bing shortcut: b server.limiter: false EOF # Start container docker run -d \ --name searxng \ -p 8080:8080 \ -v "$(pwd)/searxng:/etc/searxng" \ searxng/searxng

テスト検索機能

# Test JSON API with curl curl -v 'http://localhost:8080/search?q=test&format=json' # Or visit in browser http://localhost:8080/search?q=test

コンテナ管理

# Stop container docker stop searxng # Remove container docker rm searxng # View container logs docker logs searxng # Enable auto-start on boot docker update --restart always searxng

--restart alwaysフラグにより、次のことが保証されます。

  • Dockerデーモンが起動するとコンテナが自動的に起動します
  • コンテナはクラッシュすると自動的に再起動します
  • コンテナは、ユーザーが明示的に停止しない限り、停止すると自動的に再起動します。

カスタム構成

searxng/settings.yml次のように編集します。

  • 検索エンジンリストを変更する
  • セキュリティ設定を調整する
  • UI言語を設定する
  • API制限の変更

詳細な設定オプションについては、 SearXNGドキュメントを参照してください。

環境変数

  • SEARXNG_INSTANCES : SearXNGインスタンスURLのカンマ区切りリスト デフォルト: http://localhost:8080
  • SEARXNG_USER_AGENT : リクエストのカスタム User-Agent ヘッダー デフォルト: MCP-SearXNG/1.0
  • NODE_TLS_REJECT_UNAUTHORIZED : SSL証明書の検証をバイパスするには '0' に設定します(自己署名証明書を使用した開発用)。デフォルト: 未定義(SSL検証が有効)

すべてのオプションを含む構成例:

{ "mcpServers": { "searxng": { "name": "searxng", "command": "npx", "args": [ "-y", "@kevinwatt/mcp-server-searxng" ], "env": { "SEARXNG_INSTANCES": "http://localhost:8080,https://searx.example.com", "SEARXNG_USER_AGENT": "CustomBot/1.0", "NODE_TLS_REJECT_UNAUTHORIZED": "0" } } } }

⚠️ 警告: 実稼働環境では SSL 証明書の検証を無効にすることはお勧めしません。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

このサーバーは、追跡やユーザープロファイリングなしで複数の検索エンジンを統合し、フィルタリングされた検索のためのさまざまなカテゴリと言語をサポートすることで、プライバシー重視のメタ検索機能を提供します。

  1. Features
    1. Installation
      1. Usage
        1. Direct Run
        2. With Dive Desktop
      2. Tool Documentation
        1. Development
          1. License
            1. Prerequisites
              1. Run SearXNG with Docker
                1. Quick Start
                2. Test Search Function
                3. Container Management
                4. Custom Configuration
                5. Environment Variables
              ID: fjoqf30os0