Skip to main content

Official Anchore Grype MCP Server for AI-assisted vulnerability scanning

Project description

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 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 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grype_mcp-0.2.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grype_mcp-0.2.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file grype_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: grype_mcp-0.2.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

Hashes for grype_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8ee22d21808ecb9f7d0bad01524811415dea775bf971edfea01c8108f336b713
MD5 1e8eceaae453984048f032e6a6edf418
BLAKE2b-256 3a00da4ff33d1f55268363898e7898f409976e993eb55494bdd921e811f52d89

See more details on using hashes here.

Provenance

The following attestation bundles were made for grype_mcp-0.2.0.tar.gz:

Publisher: workflow.yml on anchore/grype-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grype_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: grype_mcp-0.2.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

Hashes for grype_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 692a9acaa8b2a6533e1d28fd2fb9968162d991287d4594742bbddd5251eee658
MD5 9ba4d4637fee91d2f815db317aca9dd3
BLAKE2b-256 3def611216048ef3f6ea88334a99753cd0e00d2183a9737596995a2ab41f5d17

See more details on using hashes here.

Provenance

The following attestation bundles were made for grype_mcp-0.2.0-py3-none-any.whl:

Publisher: workflow.yml on anchore/grype-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page