Official Anchore Grype MCP Server for AI-assisted vulnerability scanning
Project description
Grype MCP Server
Anchore MCP server for Grype vulnerability scanner
Integrate Grype vulnerability scanning directly into AI-assisted development workflows through the Model Context Protocol (MCP).
🚀 Quick Start
Installation
Install using uvx (recommended):
uvx install grype-mcp
Or using pipx:
pipx install grype-mcp
Or using pip:
pip install grype-mcp
MCP Client Setup
Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"grype": {
"command": "uvx",
"args": ["grype-mcp"]
}
}
}
Other MCP Clients
For other MCP-compatible clients, add the server using:
- Command:
uvx - Args:
["grype-mcp"]
Start using Grype's vulnerability scanning capabilities!
🛠️ Available Tools
The Grype MCP server provides these tools for AI assistants:
System Management
find_grype- Check if Grype is installed and get version infoupdate_grype- Install or update Grype to the latest versionget_db_info- Get vulnerability database status and version infoupdate_db- Update the vulnerability database
Vulnerability Scanning
scan_dir- Scan project directories for vulnerabilitiesscan_purl- Scan specific packages using PURL format (e.g.,pkg:npm/lodash@4.17.20)scan_image- Scan container images for vulnerabilities
Vulnerability Research
search_vulns- Search the vulnerability database by CVE, package name, or CPEget_vuln_details- Get detailed information about specific CVEs
💡 Example Usage
Once configured, you can ask:
- "Check if Grype is installed and up to date"
- "Scan my project directory for vulnerabilities"
- "Is pkg:npm/lodash@4.17.20 vulnerable?"
- "Scan the nginx:latest Docker image"
- "Search for Log4j vulnerabilities"
- "Get details about CVE-2021-44228"
🔧 Requirements
- Python 3.10+
- Grype (can be installed via the
update_grypetool) - Docker (optional, for container image scanning)
The MCP server can help install Grype if it's not already available using the update_grype tool.
📋 Supported Scanning Targets
- Directories - Scan entire projects with all their dependencies
- Container Images - Docker images from any registry
- Package URLs - Individual packages in PURL format
- npm:
pkg:npm/package@version - Python:
pkg:pypi/package@version - Go:
pkg:golang/package@version - Java:
pkg:maven/group/artifact@version - And many more ecosystems
- npm:
🏗️ Architecture
The MCP server acts as a bridge between AI assistants and Grype:
AI Assistant ↔ MCP Server ↔ Grype CLI ↔ Vulnerability Database
- Zero modifications to Grype required
- Structured JSON responses optimized for AI consumption
- Comprehensive error handling with helpful messages
- Automatic tool management for easy setup
🤝 Contributing
We welcome contributions! Please see:
- CONTRIBUTING.md - Contribution guidelines
- DEVELOPING.md - Development setup
- CODE_OF_CONDUCT.md - Community standards
📄 License
Licensed under the Apache License, Version 2.0. See LICENSE for details.
🔗 Related Projects
- Grype - Vulnerability scanner for container images and filesystems
- Syft - SBOM generation tool
- Model Context Protocol - Open protocol for AI assistant integrations
- Anchore Enterprise - Commercial SBOM-powered security platform
📞 Support
- GitHub Issues - Bug reports and feature requests
- Anchore Community Discourse - Community support and discussions
- Documentation - Full documentation
Made with ❤️ by the Anchore team for the AI-assisted development community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grype_mcp-0.4.0.tar.gz.
File metadata
- Download URL: grype_mcp-0.4.0.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
796bd68f579c7e3471930025c47e0d37d02885faafa042d9ed5894e0ab652da4
|
|
| MD5 |
8e79d59eb4ec26058afa963ff8866491
|
|
| BLAKE2b-256 |
ba08feb07f012c4c12776b795ec9f47d1fda83c697bedad9c8bcbbf6a95754ec
|
Provenance
The following attestation bundles were made for grype_mcp-0.4.0.tar.gz:
Publisher:
workflow.yml on anchore/grype-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grype_mcp-0.4.0.tar.gz -
Subject digest:
796bd68f579c7e3471930025c47e0d37d02885faafa042d9ed5894e0ab652da4 - Sigstore transparency entry: 446676416
- Sigstore integration time:
-
Permalink:
anchore/grype-mcp@4113a486d826540997cc2847e3aa2af76922a1f7 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/anchore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@4113a486d826540997cc2847e3aa2af76922a1f7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file grype_mcp-0.4.0-py3-none-any.whl.
File metadata
- Download URL: grype_mcp-0.4.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45bc16ac2a006ac090381f3326256dcd6c860c6173fffc4749e1200ce5525e6c
|
|
| MD5 |
d4c4d9bc7f51b17f427e8e2e84303a29
|
|
| BLAKE2b-256 |
6fd9dfcb45c1820b660c13a40bb722d3b6ef27ac0f66626d9728f08bb32e8b77
|
Provenance
The following attestation bundles were made for grype_mcp-0.4.0-py3-none-any.whl:
Publisher:
workflow.yml on anchore/grype-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
grype_mcp-0.4.0-py3-none-any.whl -
Subject digest:
45bc16ac2a006ac090381f3326256dcd6c860c6173fffc4749e1200ce5525e6c - Sigstore transparency entry: 446676456
- Sigstore integration time:
-
Permalink:
anchore/grype-mcp@4113a486d826540997cc2847e3aa2af76922a1f7 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/anchore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@4113a486d826540997cc2847e3aa2af76922a1f7 -
Trigger Event:
push
-
Statement type: