MCP スモロジック
Sumo Logic の API と統合してログ検索を実行するモデル コンテキスト プロトコル (MCP) サーバー。
特徴
カスタムクエリを使用してSumo Logicログを検索する
検索の時間範囲を設定可能
エラー処理と詳細なログ記録
簡単に導入できるDockerサポート
環境変数
ENDPOINT=https://api.au.sumologic.com/api/v1 # Sumo Logic API endpoint
SUMO_API_ID=your_api_id # Sumo Logic API ID
SUMO_API_KEY=your_api_key # Sumo Logic API Key
設定
リポジトリをクローンする
依存関係をインストールします:
npm install必要な環境変数を含む
.envファイルを作成するプロジェクトをビルドします。
npm run buildサーバーを起動します。
npm start
Dockerのセットアップ
Docker イメージをビルドします。
docker build -t mcp/sumologic .コンテナを実行します (1 つの方法を選択):
a. 環境変数を直接使用する:
docker run -e ENDPOINT=your_endpoint -e SUMO_API_ID=your_api_id -e SUMO_API_KEY=your_api_key mcp/sumologicb. .env ファイルを使用する:
docker run --env-file .env mcp/sumologic注: .env ファイルに必要な環境変数が含まれていることを確認してください。
ENDPOINT=your_endpoint SUMO_API_ID=your_api_id SUMO_API_KEY=your_api_key
使用法
サーバーは、次のパラメータを受け入れるsearch-sumologicツールを公開します。
query(必須): Sumo Logicの検索クエリfrom(オプション): ISO 8601形式の開始時刻to(オプション): ISO 8601形式の終了時刻
クエリの例:
const query = '_index=app_pro_fiat_cont | json auto | fields log_identifier';
const results = await search(sumoClient, query, {
from: '2024-02-23T00:00:00Z',
to: '2024-02-24T00:00:00Z',
});
エラー処理
サーバーには包括的なエラー処理とログ記録が含まれています。
APIエラーがキャッチされ、詳細とともにログに記録されます
検索ジョブのステータスが監視され、記録されます
ネットワークと認証の問題が適切に処理されている
発達
開発モードで実行するには:
npm run dev
テストの場合:
npm test
Related MCP Servers
- AsecurityFlicenseAqualityInteracts with LogSeq via its API.Last updated -145
- -security-license-qualityEnables LLMs to perform semantic search and document management using ChromaDB, supporting natural language queries with intuitive similarity metrics for retrieval augmented generation applications.Last updated -
- -securityAlicense-qualityEnables integration with DuckDuckGo search capabilities for LLMs, supporting comprehensive web search, regional filtering, result types, and safe browsing with caching and customizable search parameters.Last updated -263MIT License
- -securityFlicense-qualityAllows developers and AI Agents to query Google Cloud Logging using natural language, translating queries into Google Cloud Logging Query Language (LQL) with Vertex AI Gemini 2.5.Last updated -1