cortex-mcp
StrangeBee/TheHive ProjectによるCortex用のMCP(Model Context Protocol)サーバーです。Cortexは、アナライザーを使用してオブザーバブル(IP、URL、ハッシュ、ドメイン、メール、ファイル)の分析を自動化し、レスポンダーを介してレスポンスアクションを実行します。このMCPサーバーは、Cortexの完全な分析および管理パイプラインをLLMに公開します。
特徴
31個のMCPツール: Cortex APIの全範囲をカバー
4個のMCPリソース: Cortexの状態を閲覧可能
4個のMCPプロンプト: ガイド付きワークフロー(セットアップ、調査、トリアージ)
アナライザー/レスポンダーの完全なライフサイクル管理: 定義の閲覧、有効化、設定、無効化
オブザーバブルデータ型(IP、ドメイン、ハッシュ、URL、メール)の自動検出
タクソノミ集約を伴う、該当する全アナライザーでの一括分析
ドライラン対応のジョブクリーンアップ
ユーザーAPIキー管理(作成、更新、取得)
ステータス管理付きの組織CRUD
デュアルAPIキー対応: 組織レベルの操作 + スーパー管理者管理
Related MCP server: misp-mcp
前提条件
Node.js 20以降
実行中のCortexインスタンス(v3.x推奨)
適切な権限を持つCortex APIキー
インストール
git clone https://github.com/solomonneas/cortex-mcp.git
cd cortex-mcp
npm install
npm run build設定
変数 | 必須 | デフォルト | 説明 |
| はい | - | CortexベースURL(例: |
| はい | - | 通常操作用APIキー(組織管理者レベル) |
| いいえ | - | 組織/ユーザー/定義管理用スーパー管理者APIキー |
| いいえ |
| SSL検証をスキップするには |
| いいえ |
| リクエストタイムアウト(秒) |
使用方法
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json(macOS)または %APPDATA%\Claude\claude_desktop_config.json(Windows)に追加します:
{
"mcpServers": {
"cortex": {
"command": "cortex-mcp",
"env": {
"CORTEX_URL": "http://cortex.example.com:9001",
"CORTEX_API_KEY": "your-org-admin-key",
"CORTEX_SUPERADMIN_KEY": "your-superadmin-key"
}
}
}
}Claude Code
claude mcp add cortex \
--env CORTEX_URL=http://cortex.example.com:9001 \
--env CORTEX_API_KEY=your-org-admin-key \
--env CORTEX_SUPERADMIN_KEY=your-superadmin-key \
-- cortex-mcp現在のプロジェクトだけでなく、どのディレクトリからでも利用できるようにするには --scope user を追加してください。
OpenClaw
npmインストールされたバイナリではなくソースチェックアウトから実行している場合は、command/args をビルド済みの dist/index.js に向けてください:
openclaw mcp set cortex '{
"command": "node",
"args": ["/absolute/path/to/cortex-mcp/dist/index.js"],
"env": {
"CORTEX_URL": "http://cortex.example.com:9001",
"CORTEX_API_KEY": "your-org-admin-key",
"CORTEX_SUPERADMIN_KEY": "your-superadmin-key"
}
}'または、グローバルnpmインストールの場合:
openclaw mcp set cortex '{
"command": "cortex-mcp",
"env": {
"CORTEX_URL": "http://cortex.example.com:9001",
"CORTEX_API_KEY": "your-org-admin-key",
"CORTEX_SUPERADMIN_KEY": "your-superadmin-key"
}
}'その後、OpenClawゲートウェイを再起動して新しいサーバーを読み込ませます:
systemctl --user restart openclaw-gateway
openclaw mcp list # confirm "cortex" is registeredHermes Agent
Hermes Agent は、mcp_servers キーの下にある ~/.hermes/config.yaml からMCP設定を読み取ります。エントリを追加してください:
mcp_servers:
cortex:
command: "cortex-mcp"
env:
CORTEX_URL: "http://cortex.example.com:9001"
CORTEX_API_KEY: "your-org-admin-key"
CORTEX_SUPERADMIN_KEY: "your-superadmin-key"または、グローバルnpmインストールではなくソースチェックアウトから実行している場合:
mcp_servers:
cortex:
command: "node"
args: ["/absolute/path/to/cortex-mcp/dist/index.js"]
env:
CORTEX_URL: "http://cortex.example.com:9001"
CORTEX_API_KEY: "your-org-admin-key"
CORTEX_SUPERADMIN_KEY: "your-superadmin-key"その後、Hermesセッション内からMCPをリロードします:
/reload-mcpCodex CLI
Codex CLI は codex mcp add を介してMCPサーバーを登録します:
codex mcp add cortex \
--env CORTEX_URL=http://cortex.example.com:9001 \
--env CORTEX_API_KEY=your-org-admin-key \
--env CORTEX_SUPERADMIN_KEY=your-superadmin-key \
-- cortex-mcpまたは、ソースチェックアウトから実行している場合:
codex mcp add cortex \
--env CORTEX_URL=http://cortex.example.com:9001 \
--env CORTEX_API_KEY=your-org-admin-key \
--env CORTEX_SUPERADMIN_KEY=your-superadmin-key \
-- node /absolute/path/to/cortex-mcp/dist/index.jsCodexは [mcp_servers.cortex] の下にエントリを ~/.codex/config.toml に書き込みます。以下で確認してください:
codex mcp listスタンドアロン
export CORTEX_URL=http://cortex.example.com:9001
export CORTEX_API_KEY=your-org-admin-key
npm startMCPツール (31)
ステータス
ツール | 説明 |
| Cortexインスタンスの健全性、バージョン、設定を取得 |
アナライザーツール
ツール | 説明 |
| 有効なすべてのアナライザーをリスト表示(データ型でフィルタリング可能) |
| IDで特定のアナライザーの詳細を取得 |
| 分析のためにオブザーバブルを特定のアナライザーに送信 |
| IDではなく名前でアナライザーを実行(便利なラッパー) |
| 分析のためにファイル(パスまたはbase64)をアナライザーに送信 |
アナライザー定義ツール
ツール | 説明 |
| 260以上の利用可能なアナライザー定義をフィルタリング(データ型、無料/設定不要、検索)して閲覧 |
| 現在の組織で設定を伴うアナライザー定義を有効化 |
| 有効なアナライザーを無効化(削除) |
ジョブツール
ツール | 説明 |
| 分析ジョブのステータスと詳細を取得 |
| 完了した分析ジョブの完全なレポートを取得 |
| ジョブの完了を待機してレポートを返す |
| オプションのフィルタを使用して最近の分析ジョブをリスト表示 |
| 完了したジョブからアーティファクト(抽出されたIOC)を取得 |
| 特定のジョブを削除 |
| ステータスまたは経過時間でジョブを一括削除(ドライラン対応) |
レスポンダーツール
ツール | 説明 |
| 有効なすべてのレスポンダーをリスト表示(データ型でフィルタリング可能) |
| TheHiveエンティティに対してレスポンダーアクションを実行 |
レスポンダー定義ツール
ツール | 説明 |
| 137以上の利用可能なレスポンダー定義をフィルタリングして閲覧 |
| 設定を伴うレスポンダー定義を有効化 |
| 有効なレスポンダーを無効化(削除) |
一括操作
ツール | 説明 |
| 自動検出されたデータ型と集約されたタクソノミ結果を使用して、該当するすべてのアナライザーを実行 |
組織管理 (スーパー管理者)
ツール | 説明 |
| すべての組織をリスト表示 |
| 組織の詳細を取得 |
| 新しい組織を作成 |
| 組織の説明またはステータスを更新 |
ユーザー管理 (スーパー管理者)
ツール | 説明 |
| 組織全体のすべてのユーザーをリスト表示 |
| ユーザーの詳細を取得 |
| 組織内に新しいユーザーを作成 |
| ユーザーの新しいAPIキーを生成(以前のキーは無効化) |
| ユーザーの現在のAPIキーを取得 |
MCPリソース (4)
URI | 説明 |
| 機能付きの有効なアナライザー |
| 設定要件付きの260以上の利用可能なアナライザー定義 |
| 設定要件付きの137以上の利用可能なレスポンダー定義 |
| 直近50件の分析ジョブ |
MCPプロンプト (4)
プロンプト | 説明 |
| Cortexを介してオブザーバブルを分析するためのガイド付きワークフロー |
| 不審なIOCに対する詳細な調査ワークフロー |
| 新規Cortexインスタンス用のガイド付きセットアップウィザード(無料アナライザーの有効化、APIキーの設定) |
| 複数オブザーバブル分析とリスク評価を伴う構造化されたアラートトリアージワークフロー |
例
アナライザーをゼロからセットアップする
1. Use cortex_list_analyzer_definitions with freeOnly=true to find analyzers
that need no API keys.
2. Use cortex_enable_analyzer to enable "Abuse_Finder_3_0" with empty config.
3. Use cortex_analyze_observable with data "8.8.8.8" to analyze the IP.オブザーバブル型を自動検出する
Use cortex_analyze_observable with data "185.220.101.42"
(no dataType needed - auto-detects as IP)古い失敗したジョブをクリーンアップする
Use cortex_cleanup_jobs with status "Failure", dryRun true to preview,
then dryRun false to delete.ファイルを分析する
Use cortex_run_analyzer_file with analyzerId "Yara_3_0",
filePath "/tmp/suspicious.exe" to scan with YARA rules.APIキーを管理する
Use cortex_renew_user_key with userId "analyst1" to rotate their API key.セキュリティアラートをトリアージする
Use the triage-alert prompt with alertDescription "Suspicious outbound traffic
detected" and observables "185.220.101.42, evil.example.com, 44d88612fea8a8f36de82e1278abb02f"サポートされているデータ型
型 | 例 | 自動検出 |
|
| ✅ |
|
| ✅ |
|
| ✅ |
| MD5, SHA1, SHA256, SHA512 | ✅ |
|
| ✅ |
|
| ドメインとして |
|
| 手動 |
|
| 手動 |
| バイナリファイルアップロード | 手動 |
| CVE, カスタム型 | 手動 |
テスト
npm test # Unit tests (36 tests)
npm run test:watch # Watch mode
npm run lint # Type check
# Integration tests (requires live Cortex instance)
CORTEX_URL=http://cortex:9001 \
CORTEX_API_KEY=your-key \
CORTEX_SUPERADMIN_KEY=your-superadmin-key \
npx vitest run tests/integration.test.tsプロジェクト構造
cortex-mcp/
src/
index.ts # MCP server entry point
config.ts # Environment config + validation
client.ts # Cortex REST API client (full surface)
types.ts # Cortex API type definitions
resources.ts # MCP resources (4)
prompts.ts # MCP prompts (2)
tools/
analyzers.ts # Analyzer tools (list, get, run, run-by-name)
analyzer-definitions.ts # Definition browsing, enable, disable
jobs.ts # Job management + cleanup
responders.ts # Responder tools (list, run)
responder-definitions.ts # Definition browsing, enable, disable
bulk.ts # Bulk analysis with auto-detect
status.ts # Health/version check
organizations.ts # Org CRUD (superadmin)
users.ts # User CRUD + key management (superadmin)
tests/
client.test.ts # API client unit tests
tools.test.ts # Tool handler unit tests
integration.test.ts # Live instance integration tests (21 tests)
scripts/
proxmox_install.sh # Proxmox LXC deployment scriptデプロイメント
Proxmox LXC
bash -c "$(wget -qLO - https://raw.githubusercontent.com/solomonneas/cortex-mcp/main/scripts/proxmox_install.sh)"ライセンス
MIT
Maintenance
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
- AlicenseAqualityAmaintenanceAn MCP server that extracts Indicators of Compromise (IoCs) from unstructured text and checks their reputation across multiple threat intelligence services. It enables real-time analysis of IPs, domains, hashes, and URLs, providing enriched context for security workflows within LLMs.519MIT
- AlicenseAqualityAmaintenanceAn MCP server that enables LLMs to interact with MISP for threat intelligence sharing, IOC lookups, and event management. It provides tools for investigating indicators, discovering correlations, and exporting intelligence in formats like STIX and Suricata.36312MIT
- FlicenseNot gradedqualityDmaintenanceA security-focused MCP server that enables automated log retrieval and threat analysis using LangGraph orchestration and RAG. It allows users to detect suspicious activity and generate structured security insights by integrating LLM reasoning with log data and runbook documentation.
- AlicenseNot gradedqualityDmaintenanceMCP server that provides condensed and normalized data from OpenCTI to LLMs, enabling lookup of observables, adversaries, and reports with enriched context.16MIT
Related MCP Connectors
MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/lidless-labs/cortex-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server