cursor-mcp-trivy
A Model Context Protocol (MCP) server that provides Trivy security scanning capabilities through a standardized interface.
Documentation
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

Architecture
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Cursor IDE │ --> │ MCP Server │ --> │ Trivy │
│ (Composer) │ │ │ │ │
└─────────────┘ └──────────────┘ └─────────────┘Prerequisites
- Python 3.12 or higher
- Trivy installed on your system:
# macOS
brew install trivyInstallation
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txtUsage
Start the server using SSE transport:
# Using SSE transport (default)
python server.py --transport sse --port 54321The server exposes two tools:
1. `scan_project`: Scans a directory for security vulnerabilities
2. `fix_vulnerability`: Updates a vulnerable package to a secure version
Using with Cursor IDE
1. Start the server with SSE transport:
python server.py --transport sse --port 543212. Configure in Cursor:
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:
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 vulnerabilitiesWhy 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
Frequently asked questions
What is cursor-mcp-trivy?
cursor-mcp-trivy is A Model Context Protocol (MCP) server that provides Trivy security scanning capabilities through a standardized interface.
How do I install cursor-mcp-trivy?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is cursor-mcp-trivy open source?
Yes — it is hosted on GitHub at https://github.com/norbinsh/cursor-mcp-trivy and has 10 stars.
Related MCP tools
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
An LLM agent that conducts deep research (local and web) on any given topic and generates a long report with citations. Built for the Model Context Protocol to
🚀 The fast, Pythonic way to build MCP servers and clients Trusted by 19900+ developers. Trusted by 19900+ developers. Trusted by 19900+ developers.
🔥 MaxKB is an open-source platform for building enterprise-grade agents. MaxKB 是强大易用的开源企业级智能体平台。 for the Model Context Protocol. Enhance AI assistants with po
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP