Trivy Security Scanner MCP Server logo

Trivy Security Scanner MCP Server

by norbinsh

This MCP server provides Trivy security scanning capabilities through a standardized interface, enabling integration with tools like Cursor IDE. It's a proof of concept for experimentation and learning, not intended for production use.

View on GitHub

Last updated: N/A

What is Trivy Security Scanner MCP Server?

This is a Model Context Protocol (MCP) server that acts as an intermediary between tools like Cursor IDE and the Trivy security scanner. It allows you to scan your project for vulnerabilities and automatically fix them through a standardized interface.

How to use Trivy Security Scanner MCP Server?

  1. Install Trivy and Python 3.12 or higher.
  2. Clone the repository and install the dependencies using pip install -r requirements.txt.
  3. Start the server using python server.py --transport sse --port 54321.
  4. Configure Cursor IDE to connect to the server's SSE endpoint (e.g., http://127.0.0.1:54321/sse).
  5. Add the provided configuration in your .cursorrules file to automatically trigger security scans on dependency file changes.

Key features of Trivy Security Scanner MCP Server

  • Project Scanning using Trivy

  • Automated Vulnerability Fixes

  • Multi-Package Manager Support (Python, Node.js, Ruby, Go)

  • Integration with Cursor IDE

  • Standardized MCP Interface

Use cases of Trivy Security Scanner MCP Server

  • Automated security scanning in Cursor IDE

  • Identifying vulnerabilities in projects

  • Automatically updating vulnerable dependencies

  • Integrating security scanning into the development workflow

  • Experimenting with MCP integrations

FAQ from Trivy Security Scanner MCP Server

What is MCP?

MCP (Model Context Protocol) solves the problem of efficiently connecting LLMs to external data sources and tools.

Is this server production-ready?

No, this is a proof of concept and is not intended for production use.

What package managers are supported?

The server supports multiple package managers including Python, Node.js, Ruby, and Go.

How do I configure Cursor IDE to use this server?

Open Cursor Settings, go to Features > MCP Servers, and add the server's SSE endpoint (e.g., http://127.0.0.1:54321/sse).

How do I trigger a security scan?

You can configure your .cursorrules file to automatically trigger scans on dependency file changes, or prompt the agent to use the tool with Please scan my project for security vulnerabilities