Skip to main content
Glama
DefectDojo MCP Server

DefectDojo MCP Server

by jamiesonio

DefectDojo MCP サーバー

PyPIバージョン

このプロジェクトは、人気のオープンソース脆弱性管理ツールであるDefectDojo用のModel Context Protocol (MCP)サーバー実装を提供します。これにより、AIエージェントやその他のMCPクライアントがプログラム的に DefectDojo API とやり取りできるようになります。

特徴

この MCP サーバーは、主要な DefectDojo エンティティを管理するためのツールを公開します。

  • **結果:**取得、検索、作成、ステータスの更新、メモの追加。

  • **製品:**入手可能な製品を一覧表示します。

  • エンゲージメント: エンゲージメントの一覧表示、詳細の取得、作成、更新、およびクローズを行います。

Related MCP server: Agent Construct

インストールと実行

このサーバーを実行するにはいくつかの方法があります。

uvxの使用(推奨)

uvx一時的な仮想環境で Python アプリケーションを実行し、依存関係を自動的にインストールします。

uvx defectdojo-mcp

pipの使用

pipを使用して、パッケージを Python 環境にインストールできます。

# Install directly from the cloned source code directory
pip install .

# Or, if the package is published on PyPI
pip install defectdojo-mcp

pip でインストールしたら、次のコマンドを使用してサーバーを実行します。

defectdojo-mcp

構成

DefectDojo インスタンスに接続するには、サーバーに次の環境変数が必要です。

  • DEFECTDOJO_API_TOKEN (必須): 認証用の DefectDojo API トークン。

  • DEFECTDOJO_API_BASE (必須): DefectDojo インスタンスのベース URL (例: https://your-defectdojo-instance.com )。

これらはMCPクライアントの設定ファイルで設定できます。以下はuvxコマンドを使った例です。

{
  "mcpServers": {
    "defectdojo": {
      "command": "uvx",
      "args": ["defectdojo-mcp"],
      "env": {
        "DEFECTDOJO_API_TOKEN": "YOUR_API_TOKEN_HERE",
        "DEFECTDOJO_API_BASE": "https://your-defectdojo-instance.com"
      }
    }
  }
}

pipを使用してパッケージをインストールした場合、構成は次のようになります。

{
  "mcpServers": {
    "defectdojo": {
      "command": "defectdojo-mcp",
      "args": [],
      "env": {
        "DEFECTDOJO_API_TOKEN": "YOUR_API_TOKEN_HERE",
        "DEFECTDOJO_API_BASE": "https://your-defectdojo-instance.com"
      }
    }
  }
}

利用可能なツール

MCP インターフェース経由では次のツールが利用できます。

  • get_findings : フィルタリング (product_name、status、severity) とページ区切り (limit、offset) を使用して検出結果を取得します。

  • search_findings : フィルタリングとページ区切りを使用して、テキストクエリを使用して結果を検索します。

  • update_finding_status : 特定の検出結果のステータスを変更します (例: アクティブ、検証済み、誤検知)。

  • add_finding_note : 検出結果にテキストメモを追加します。

  • create_finding : テストに関連付けられた新しい検出結果を作成します。

  • list_products : フィルタリング (名前、製品タイプ) とページ区切りを使用して製品を一覧表示します。

  • list_engagements : フィルタリング (product_id、ステータス、名前) とページ区切りを使用してエンゲージメントを一覧表示します。

  • get_engagement : ID で特定のエンゲージメントの詳細を取得します。

  • create_engagement : 製品の新しいエンゲージメントを作成します。

  • update_engagement : 既存のエンゲージメントの詳細を変更します。

  • close_engagement : エンゲージメントを完了としてマークします。

(各ツールの詳細な使用例については、以下の元のREADMEコンテンツを参照してください)

使用例

(注: これらの例では、 use_mcp_toolを呼び出すことができる MCP クライアント環境を想定しています)

調査結果を取得する

# Get active, high-severity findings (limit 10)
result = await use_mcp_tool("defectdojo", "get_findings", {
    "status": "Active",
    "severity": "High",
    "limit": 10
})

検索結果

# Search for findings containing 'SQL Injection'
result = await use_mcp_tool("defectdojo", "search_findings", {
    "query": "SQL Injection"
})

調査結果ステータスの更新

# Mark finding 123 as Verified
result = await use_mcp_tool("defectdojo", "update_finding_status", {
    "finding_id": 123,
    "status": "Verified"
})

発見事項にメモを追加

result = await use_mcp_tool("defectdojo", "add_finding_note", {
    "finding_id": 123,
    "note": "Confirmed vulnerability on staging server."
})

発見を作成

result = await use_mcp_tool("defectdojo", "create_finding", {
    "title": "Reflected XSS in Search Results",
    "test_id": 55, # ID of the associated test
    "severity": "Medium",
    "description": "User input in search is not properly sanitized, leading to XSS.",
    "cwe": 79
})

製品一覧

# List products containing 'Web App' in their name
result = await use_mcp_tool("defectdojo", "list_products", {
    "name": "Web App",
    "limit": 10
})

リストエンゲージメント

# List 'In Progress' engagements for product ID 42
result = await use_mcp_tool("defectdojo", "list_engagements", {
    "product_id": 42,
    "status": "In Progress"
})

エンゲージメントを獲得する

result = await use_mcp_tool("defectdojo", "get_engagement", {
    "engagement_id": 101
})

エンゲージメントを生み出す

result = await use_mcp_tool("defectdojo", "create_engagement", {
    "product_id": 42,
    "name": "Q2 Security Scan",
    "target_start": "2025-04-01",
    "target_end": "2025-04-15",
    "status": "Not Started"
})

エンゲージメントの更新

result = await use_mcp_tool("defectdojo", "update_engagement", {
    "engagement_id": 101,
    "status": "In Progress",
    "description": "Scan initiated."
})

緊密な交戦

result = await use_mcp_tool("defectdojo", "close_engagement", {
    "engagement_id": 101
})

発達

設定

  1. リポジトリをクローンします。

  2. 仮想環境を使用することをお勧めします。

    python -m venv .venv
    source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
  3. 開発依存関係を含む依存関係をインストールします。

    pip install -e ".[dev]"

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

貢献

貢献を歓迎します!バグ、機能リクエスト、ご質問などございましたら、お気軽にIssueを開いてください。コードの貢献をご希望の場合は、まずIssueを開いて、提案された変更について議論してください。

Available Tools

11 tools
add_finding_noteC

Add a note to a finding

Inputs: finding_id (required), note (required). Returns: result

close_engagementC

Close an engagement

Inputs: engagement_id (required). Returns: result

create_engagementD

Create a new engagement

Inputs: name (required), product_id (required), status (required), target_end (required), +10 more.

create_findingD

Create a new finding

Inputs: description (required), severity (required), test_id (required), title (required), +5 more. Returns: result

get_engagementB

Get a specific engagement by ID

Inputs: engagement_id (required). Returns: result

get_findingsC

Get findings with filtering options and pagination support

Inputs: limit, offset, product_name, severity, +1 more. Returns: result

list_engagementsC

List engagements with optional filtering and pagination support

Inputs: limit, name, offset, product_id, +1 more. Returns: result

list_productsC

List all products with optional filtering and pagination support

Inputs: limit, name, offset, prod_type. Returns: result

search_findingsC

Search for findings using a text query with pagination support

Inputs: query (required), limit, offset, product_name, +2 more. Returns: result

update_engagementC

Update an existing engagement

Inputs: engagement_id (required), branch_tag, build_id, commit_hash, +10 more. Returns: result

update_finding_statusB

Update the status of a finding (Active, Verified, False Positive, Mitigated, Inactive)

Inputs: finding_id (required), status (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific resources and actions, such as create_engagement vs. update_engagement, and get_findings vs. search_findings, with no overlapping or ambiguous functions.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, such as create_engagement, list_products, and update_finding_status, with no deviations in style or convention.

    Tool Count5/5

    With 11 tools, the server is well-scoped for defect management, covering key operations like engagements, findings, and products without being overly sparse or bloated.

    Completeness4/5

    The tool set provides strong CRUD/lifecycle coverage for engagements and findings, including create, get, update, and list operations, though minor gaps like product creation or deletion might require workarounds.

    Related MCP Connectors

    Related MCP Servers