Related MCP Server Resources

Explore more AI models, providers, and integration options:

  • Explore AI Models
  • Explore AI Providers
  • Explore MCP Servers
  • LangDB Pricing
  • Documentation
  • AI Industry Blog
  • Semgrep MCP Server
  • Linear MCP Server
  • Formula One MCP Server
  • GHAS MCP server GitHub Advanced Security
  • Gemini MCP Image Generation Server
Back to MCP Servers
Trivy Security Scanner MCP Server

Trivy Security Scanner MCP Server

Public
norbinsh/cursor-mcp-trivy

Provides Trivy security scanning capabilities through a standardized interface, allowing users to scan projects for vulnerabilities and automatically fix them by updating dependencies.

Verified
python
0 tools
May 30, 2025
Updated May 30, 2025

Trivy Security Scanner MCP Server

A Model Context Protocol (MCP) server that provides Trivy security scanning capabilities through a standardized interface.

āš ļø Note: This is a proof of concept project to demonstrate the integration capabilities between MCP, Cursor IDE, and Trivy. It's intended for experimentation and learning purposes only and is not production-ready. Use at your own risk.

Features

  • šŸ” Project Scanning: Automatically scan your project directory for security vulnerabilities using Trivy
  • šŸ› ļø Automated Fixes: Automatically update vulnerable dependencies to secure versions
  • šŸ“¦ Multi-Package Support: Handles multiple package managers (Python, Node.js, Ruby, Go)

Demo

Demo

Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā” │ Cursor IDE │ --> │ MCP Server │ --> │ Trivy │ │ (Composer) │ │ │ │ │ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜ ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

Prerequisites

  • Python 3.12 or higher
  • Trivy installed on your system:
    # macOS brew install trivy

Installation

# Create and activate virtual environment python -m venv .venv source .venv/bin/activate # Install dependencies pip install -r requirements.txt

Usage

Start the server using SSE transport:

# Using SSE transport (default) python server.py --transport sse --port 54321

The server exposes two tools:

  1. scan_project: Scans a directory for security vulnerabilities

    • Required argument: workspace - The directory path to scan
  2. fix_vulnerability: Updates a vulnerable package to a secure version

    • Required arguments:
      • workspace - The directory to modify
      • pkg_name - Name of the package to update
      • target_version - Version to update to

Using with Cursor IDE

  1. Start the server with SSE transport:

    python server.py --transport sse --port 54321
  2. Configure in Cursor:

    • Open Settings
    • Go to Features > MCP Servers
    • Add: http://127.0.0.1:54321/sse
  3. Add the following to your .cursorrules file, create it if you don't have one yet:

    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.
    

    This configuration will:

    • Automatically trigger a security scan when any dependency file is modified
    • Help identify vulnerabilities as soon as new dependencies are added
    • Ensure your project stays secure throughout development

    if you want to use the tool manually, you can use prompt the agent to use the tool with the following prompt through the composer interface:

    Please scan my project for security vulnerabilities
    

Why MCP?

MCP (Model Context Protocol) exists to solve a fundamental problem in working with large language models (LLMs): how to efficiently and consistently connect these models to external data sources and tools.

Learn more at modelcontextprotocol.io.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License

Acknowledgments

  • Model Context Protocol
  • Trivy
  • Cursor IDE
Publicly Shared Threads0

Discover shared experiences

Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!

Share your threads to help others
Related MCPs5
  • Semgrep MCP Server
    Semgrep MCP Server

    An MCP server that provides a comprehensive interface to Semgrep, enabling users to scan code for se...

    6 tools
    Added May 30, 2025
  • Linear MCP Server
    Linear MCP Server

    Facilitates project management with the Linear API via the Model Context Protocol, allowing users to...

    Added May 30, 2025
  • Formula One MCP Server
    Formula One MCP Server

    Provides Formula One data and statistics through a Model Context Protocol interface, allowing users ...

    Added May 30, 2025
  • GHAS MCP server GitHub Advanced Security
    GHAS MCP server GitHub Advanced Security

    This server integrates with GitHub Advanced Security to load security alerts and bring it into your ...

    Added May 30, 2025
  • Gemini MCP Image Generation Server
    Gemini MCP Image Generation Server

    A Model Context Protocol server that provides image generation capabilities using Google's Gemini 2 ...

    1 tools
    Added May 30, 2025