Skip to main content
Glama

OpenSearch MCP Server

by jetbalsa

OpenSearch MCP サーバー

OpenSearch に保存されている Wazuh セキュリティ ログを照会および分析するための Model Context Protocol (MCP) サーバー。

特徴

  • 高度なフィルタリングでセキュリティアラートを検索する
  • 特定のアラートに関する詳細情報を取得する
  • セキュリティイベントの統計を生成する
  • アラートの傾向を時間経過とともに視覚化する
  • 長時間実行操作の進捗レポート
  • 構造化されたエラー処理

前提条件

  • Node.js v16以上
  • Wazuh セキュリティ ログを含む OpenSearch インスタンスへのアクセス

インストール

オプション 1: GitHub から直接 npx を使用する (推奨)

リポジトリをクローンせずに、npx を使用してこのツールを直接実行できます。

# Run the latest version from GitHub npx github:jetbalsa/mcp-opensearch-js # Run with debug mode enabled npx github:jetbalsa/mcp-opensearch-js --debug # You can also specify a specific branch or commit npx github:jetbalsa/mcp-opensearch-js#main

オプション2: ローカルインストール

  1. このリポジトリをクローンします:
git clone https://github.com/jetbalsa/mcp-opensearch-js.git cd mcp-opensearch-js
  1. 依存関係をインストールします:
npm install
  1. 環境変数を設定します。
cp .env.example .env
  1. OpenSearch 接続の詳細を使用して.envファイルを編集します。
OPENSEARCH_URL=https://your-opensearch-endpoint:9200 OPENSEARCH_USERNAME=your-username OPENSEARCH_PASSWORD=your-password DEBUG=false

サーバーの実行

サーバーを起動します。

npm start

これにより、サーバーが stdio モードで起動します。

デバッグ ログを有効にする:

npm run stdio:debug

MCP CLI でテストします。

npm run dev

これにより、対話型テスト用の FastMCP CLI ツールを使用してサーバーが実行されます。

MCP Inspector でテストします。

npm run inspect

これにより、サーバーが起動し、視覚的なデバッグのために MCP Inspector に接続されます。

サーバーツール

サーバーは次のツールを提供します。

1. 検索アラート

Wazuh データ内のセキュリティ警告を検索します。

パラメータ:

  • query : 検索クエリテキスト
  • timeRange : 時間範囲(例:1時間、24時間、7日)
  • maxResults : 返される結果の最大数
  • index : 検索するインデックスパターン

2. アラートの詳細を取得する

ID 別に特定のアラートの詳細情報を取得します。

パラメータ:

  • id : アラートID
  • index : インデックスパターン

3. アラート統計

セキュリティ警告に関する統計を取得します。

パラメータ:

  • timeRange : 時間範囲(例:1時間、24時間、7日)
  • field : 集計するフィールド (例: rule.level、agent.name)
  • index : インデックスパターン

4. アラートの傾向を視覚化する

アラートの傾向を時間経過とともに視覚化します。

パラメータ:

  • timeRange : 時間範囲(例:1時間、24時間、7日)
  • interval : グループ化する時間間隔(例:1時間、1日)
  • query : アラートをフィルタリングするクエリ
  • index : インデックスパターン

使用例

MCP CLI ツールの使用:

> tools Available tools: - searchAlerts: Search for security alerts in Wazuh data - getAlertDetails: Get detailed information about a specific alert by ID - alertStatistics: Get statistics about security alerts - visualizeAlertTrend: Visualize alert trends over time > tools.searchAlerts(query: "rule.level:>10", timeRange: "12h", maxResults: 5)

クライアントとの使用

この MCP サーバーをクライアント実装で使用するには:

import { Client } from "@modelcontextprotocol/sdk"; import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js"; const client = new Client( { name: "example-client", version: "1.0.0", }, { capabilities: {}, }, ); const transport = new SSEClientTransport(new URL(`http://localhost:3000/sse`)); await client.connect(transport); // Use tools const result = await client.executeTool("searchAlerts", { query: "rule.level:>10", timeRange: "24h", maxResults: 10 }); console.log(result);

ライセンス

マサチューセッツ工科大学

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

アラートの検索、詳細情報の取得、統計の生成、傾向の視覚化などの機能を備え、OpenSearch に保存されている Wazuh セキュリティ ログのクエリと分析を可能にするモデル コンテキスト プロトコル サーバーです。

  1. 特徴
    1. 前提条件
      1. インストール
        1. オプション 1: GitHub から直接 npx を使用する (推奨)
        2. オプション2: ローカルインストール
      2. サーバーの実行
        1. サーバーを起動します。
        2. デバッグ ログを有効にする:
        3. MCP CLI でテストします。
        4. MCP Inspector でテストします。
      3. サーバーツール
        1. 検索アラート
        2. アラートの詳細を取得する
        3. アラート統計
        4. アラートの傾向を視覚化する
      4. 使用例
        1. クライアントとの使用
          1. ライセンス

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that provides DuckDuckGo search functionality for Claude, enabling web search capabilities through a clean tool interface with rate limiting support.
              Last updated -
              1
              60
              15
              TypeScript
              MIT License
              • Apple
            • -
              security
              A
              license
              -
              quality
              "primitive" RAG-like web search model context protocol server that runs locally. ✨ no APIs ✨
              Last updated -
              43
              Python
              MIT License
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              Securely integrates Wazuh security data with LLMs (such as Claude Desktop) by retrieving alerts from Elasticsearch indices and transforming them into MCP-compliant format, enabling real-time security context in LLM applications.
              Last updated -
              26
              Python
              MIT License
              • Apple
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that integrates with Brave Search API to provide real-time search capabilities through Server-Sent Events (SSE).
              Last updated -
              TypeScript

            View all related MCP servers

            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/jetbalsa/mcp-opensearch-js'

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