Trivy Security Scanner MCP Server
Trivy セキュリティ スキャナー MCP サーバー
標準化されたインターフェースを通じて Trivy セキュリティ スキャン機能を提供するモデル コンテキスト プロトコル (MCP) サーバー。
⚠️注:これは、MCP、Cursor IDE、Trivy の統合機能を実証するための概念実証プロジェクトです。実験と学習のみを目的としており、本番環境での使用には対応していません。自己責任でご利用ください。
特徴
🔍プロジェクトスキャン: Trivy を使用してプロジェクトディレクトリのセキュリティ脆弱性を自動的にスキャンします
🛠️自動修正: 脆弱な依存関係を安全なバージョンに自動的に更新します
📦マルチパッケージサポート:複数のパッケージマネージャー(Python、Node.js、Ruby、Go)に対応
デモ

Related MCP server: MCP SBOM Server
建築
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Cursor IDE │ --> │ MCP Server │ --> │ Trivy │
│ (Composer) │ │ │ │ │
└─────────────┘ └──────────────┘ └─────────────┘前提条件
Python 3.12以上
システムにインストールされた Trivy:
# macOS brew install trivy
インストール
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt使用法
SSE トランスポートを使用してサーバーを起動します。
# Using SSE transport (default)
python server.py --transport sse --port 54321サーバーは 2 つのツールを公開します。
scan_project: ディレクトリのセキュリティ脆弱性をスキャンします必須引数:
workspace- スキャンするディレクトリパス
fix_vulnerability: 脆弱なパッケージを安全なバージョンに更新する必要な引数:
workspace- 変更するディレクトリpkg_name- 更新するパッケージの名前target_version- 更新するバージョン
カーソルIDEでの使用
SSE トランスポートを使用してサーバーを起動します。
python server.py --transport sse --port 54321カーソルで設定:
設定を開く
機能 > MCPサーバーへ移動
追加:
http://127.0.0.1:54321/sse
次の内容を .cursorrules ファイルに追加します (まだファイルがない場合は作成してください)。
After making changes in any of the package dependency/manifest files, scan the project for security vulnerabilities. Fixes should only be according to the desired version reported by the scanner. If the scanner reports a fix unrelated to our change, ignore it. After performing the fix, scan the project for security vulnerabilities again.この構成では次のようになります。
依存ファイルが変更されると、自動的にセキュリティスキャンを実行します。
新しい依存関係が追加されたらすぐに脆弱性を特定できるように支援します
開発全体を通してプロジェクトの安全性を確保する
ツールを手動で使用したい場合は、コンポーザー インターフェースから次のプロンプトを使用して、エージェントにツールを使用するように指示することができます。
Please scan my project for security vulnerabilities
なぜMCPなのか?
MCP (モデル コンテキスト プロトコル) は、大規模言語モデル (LLM) を扱う際の基本的な問題、つまりこれらのモデルを外部のデータ ソースやツールに効率的かつ一貫して接続する方法を解決するために存在します。
詳細については、 modelcontextprotocol.ioをご覧ください。
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
ライセンス
MITライセンス
謝辞
This server cannot be deployed
Maintenance
Related MCP Connectors
Scan packages and lockfiles (npm, PyPI, Go, Maven, Cargo, NuGet) for vulnerabilities and malware.
41Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Deep security scans of repos you own from your editor: dependency CVEs, SAST, git-history secrets.
Multi-CI security scanner with a live threat-intel feed of compromised CI components
Related MCP Servers
- AlicenseAqualityDmaintenanceAutomatically scans project dependencies (npm, Composer) for security vulnerabilities using the OSV.dev database, providing real-time alerts and detailed remediation guidance directly in your IDE.19 npm1MIT
- FlicenseAqualityNot gradedmaintenancePerforms vulnerability scans using Trivy to generate Software Bill of Materials (SBOM) in CycloneDX format. It enables automated security auditing and dependency tracking through the Model Context Protocol.1-
- AlicenseAqualityDmaintenanceEnables AI assistants to scan project dependencies and Infrastructure as Code files for security vulnerabilities and misconfigurations. It also provides automated fixing capabilities to remediate identified security issues.183MIT

Git-Fabric CVEofficial
AlicenseNot gradedqualityNot gradedmaintenanceProvides tools for autonomous CVE detection, enrichment, and remediation across managed repositories using GHSA and NVD data. It enables automated triage and pull request creation for dependency fixes based on configurable severity policies.-