Skip to main content

A command-line tool for analyzing MCP servers.

Project description

MCPScanner

MCPScanner (formerly known as mcpry) is a command-line tool for analyzing MCP servers. It does the following:

  1. Discovers MCP Servers: It automatically searches for MCP server configuration files in well-known locations on the host system.
  2. Analyzes Tools and Resources: It connects to each discovered server to fetch the list of available tools and resources.
  3. Security Scanning with Pangea AI Guard: It uses the Pangea AI Guard service to scan the tools for malicious entities and prompts.
  4. Generates Reports: It creates a JSON report (default mcpscanner.json) containing the analysis results.
  5. Detects Changes: It can compare the current state of a server's tools with a previous report and display a diff if any changes are detected.
  6. Finds Similar Tools: It can identify tools with similar functionality.

Sample output

Installation

pip install -U mcpscanner

Configuration

Before using MCPScanner, you need to set the PANGEA_AI_GUARD_TOKEN environment variable to a Pangea API token that has access to the Pangea AI Guard service.

export PANGEA_AI_GUARD_TOKEN="pts_your_token_here"

Pangea domain

To use a Pangea domain other than the default aws.us.pangea.cloud, set the PANGEA_DOMAIN environment variable.

export PANGEA_DOMAIN="aws.us-west-2.pangea.cloud"

Usage

The primary command is scan, which runs the analysis.

mcpscanner scan

Options

Parameter Description Default
--input <PATH> The input file containing a previous report to compare against. mcpscanner.json
--output <PATH> The file where the new report will be saved. mcpscanner.json
--list-tools If set, the names of all tools for each MCP server will be listed in the output. False
--mcp-config-files <FILES> A list of files to discover MCP servers from. A list of well-known paths for different operating systems.
--similarity-threshold <FLOAT> The threshold (between 0.0 and 1.0) for two tools to be considered similar. 0.96
--syntax-theme <THEME> The syntax theme to use for displaying JSON diffs. github-dark
--poll-result-timeout Timeout (seconds) for polling AI Guard results. 30

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

mcpscanner-0.5.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

mcpscanner-0.5.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file mcpscanner-0.5.0.tar.gz.

File metadata

  • Download URL: mcpscanner-0.5.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcpscanner-0.5.0.tar.gz
Algorithm Hash digest
SHA256 446013637f86d800d50df1f9d86ff4070b8526705f1241636e914b0ac572528f
MD5 f956874f77c3f8ba6ae259255bc2b277
BLAKE2b-256 7b71d0a771eda60faac348480b62cb88f733064fc634743c7669204aae45afff

See more details on using hashes here.

File details

Details for the file mcpscanner-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: mcpscanner-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcpscanner-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 882b1aadbfdefe1b605dce0f5d743eaf97699f9644f70127d66731e895692ba0
MD5 c3adfbfad9510f7c59f8ed0e0f91abd4
BLAKE2b-256 e66e80d0a8d95b00252e76377c24ed97c655017e0fb23e869aa1c0ae7d59ade6

See more details on using hashes here.

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