Enables scanning of GitHub repositories for vulnerabilities and security issues by connecting to repositories like 'github.com/aquasecurity/trivy-ci-test'.
Provides vulnerability scanning capabilities for various sources including filesystems, container images, and code repositories, allowing users to identify vulnerabilities and misconfigurations through an MCP server interface.
Trivy MCP Server Plugin
This plugin starts a Model Context Protocol (MCP) server that integrates Trivy's security scanning capabilities with VS Code and other MCP-enabled tools.
Important
This is early stage development of the MCP Server, so you should assume things won't work great for now
Features
- Natural Language Scanning: Ask questions about security issues in natural language
- Multiple Scan Types:
- Filesystem scanning for local projects
- Container image vulnerability scanning
- Remote repository security analysis
- Integration with Aqua Platform: Optional integration with Aqua Security's platform for enhanced scanning capabilities
- Flexible Transport: Support for both stdio and SSE (Server-Sent Events) transport protocols
- VS Code Integration: Seamless integration with VS Code's chat interface
Installing the plugin
To install the plugin you can use Trivy's plugin management system
The will install the latest version of the plugin
Starting the plugin
You're now ready to start the plugin, this will launch an MCP server that Cursor or VSCode can interact with. For now, the instructions will focus on VSCode
Available Options
Option | Values | Default | Description |
---|---|---|---|
--transport / -t | sse , stdio | stdio | Transport protocol for the MCP Server |
--port / -p | 23456 | Port for SSE transport mode | |
--trivy-binary | Custom Trivy binary path (optional) | ||
--use-aqua-platform / a | true/false | false | Enable Aqua Platform integration |
--debug | true/false | false | Enable debug logging |
Authentication
The MCP Server supports integration with Aqua Platform through the auth
subcommand:
Available Auth Options
Option | Description |
---|---|
--key | Aqua Platform API key |
--secret | Aqua Platform API secret |
--region | Aqua Platform region (e.g., 'us-east-1') |
After configuring credentials, you can use Aqua Platform features by starting the server with the --use-aqua-platform
flag:
Credentials are securely stored in the platform specific key chain.
Configuring the MCP Server in VSCode
Now, we need to configure the server in VSCode to start using as an agent
Prereqs
- >= version 1.99.0 of VS Code
Configuring the plugin
You can configure the Trivy mcp to start itself or use the sse http endpoint
Configuring for stdio
- In VS Code, press
F1
- Search for
"Preferences: Open User Settings (JSON)"
- Find or create the
"mcp"
block and add a server as below - When you save, an annotation will appear to
Start
the server
Configuring for SSE HTTP
- Start the MCP Server
- In VS Code, press
F1
- Search for
"Preferences: Open User Settings (JSON)"
- Find or create the
"mcp"
block and add a server as below - When you save, an annotation will appear to
Start
the server
Example Queries
Important
Make sure to use the chat window in Agent
mode, not Ask
mode
Local Project Analysis
Container Image Scanning
Repository Analysis
Advanced Usage
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Trivy
Related MCP Servers
- PythonMIT License
- GoMIT License
- TypeScriptApache 2.0
- Go