Skip to main content

Grype MCP Server

PyPI version Python Support License

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 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 info
  • update_grype - Install or update Grype to the latest version
  • get_db_info - Get vulnerability database status and version info
  • update_db - Update the vulnerability database

Vulnerability Scanning

  • scan_dir - Scan project directories for vulnerabilities
  • scan_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 CPE
  • get_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_grype tool)
  • 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

🏗️ 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:

📄 License

Licensed under the Apache License, Version 2.0. See LICENSE for details.

🔗 Related Projects

📞 Support


Made with ❤️ by the Anchore team for the AI-assisted development community

Metadata

Release files for iflow-mcp_anchore-grype-mcp 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_anchore-grype-mcp 0.4.0
File Size Uploaded
iflow_mcp_anchore_grype_mcp-0.4.0.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_anchore-grype-mcp 0.4.0
File Interpreter ABI Platform
iflow_mcp_anchore_grype_mcp-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.2 kB

Release files / iflow_mcp_anchore_grype_mcp-0.4.0.tar.gz

Download URL iflow_mcp_anchore_grype_mcp-0.4.0.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0d50af9fdfe047ad0a77c5e43531d99aabbd9fa1ab98ea54985603dbed76f166
BLAKE2b-256 checksum
How to use checksums
05e6afdd6bcced89e2fbea4f341bd983ea05c0926ffdd94240ba7fdb153bc726
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_anchore_grype_mcp-0.4.0-py3-none-any.whl

Download URL iflow_mcp_anchore_grype_mcp-0.4.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c154aa301f5c0c972b956e39c81e330b4f2b7ba571602678ce64406185a5d63b
BLAKE2b-256 checksum
How to use checksums
d7da6bc45ae656c7fa748275f2b4b0aa8553742ec3446472f00df10ad208b670
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page