Skip to main content

A command-line tool for analyzing MCP servers.

Project description

MCPScanner

MCPScanner 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 CrowdStrike AIDR: It uses the CrowdStrike AIDR 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 crowdstrike-aidr-mcpscanner

Configuration

Before using MCPScanner, you need to set the CS_AIDR_TOKEN environment variable to a CrowdStrike AIDR API token and the CS_AIDR_BASE_URL_TEMPLATE environment variable to the base URL of the CrowdStrike AIDR API.

export CS_AIDR_TOKEN="your_token_here"
export CS_AIDR_BASE_URL_TEMPLATE="https://api.crowdstrike.com/aidr/{SERVICE_NAME}"

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

crowdstrike_aidr_mcpscanner-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

crowdstrike_aidr_mcpscanner-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file crowdstrike_aidr_mcpscanner-0.1.0.tar.gz.

File metadata

File hashes

Hashes for crowdstrike_aidr_mcpscanner-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c29576a54a6c87a94e33e518c24382955934a38bf96094cc00552c49062b3654
MD5 1c14f92af1d8d5b40a16cf9c87313b54
BLAKE2b-256 a3f4b71123080793c6bde3bffc6399b2f3c97ec658d647ca77149b7db599fa95

See more details on using hashes here.

Provenance

The following attestation bundles were made for crowdstrike_aidr_mcpscanner-0.1.0.tar.gz:

Publisher: publish.yml on CrowdStrike/mcpscanner

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

File details

Details for the file crowdstrike_aidr_mcpscanner-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crowdstrike_aidr_mcpscanner-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 653274d1d272734aa9b97ccc4691765ef41cd364beabc642f3ae7987331f0a5f
MD5 72d714a9a3598f5c2bd77151f4831365
BLAKE2b-256 fcbb88d8811b0e2704d4d7290154c1274a08da07ea5fb0131f5d0422a970cece

See more details on using hashes here.

Provenance

The following attestation bundles were made for crowdstrike_aidr_mcpscanner-0.1.0-py3-none-any.whl:

Publisher: publish.yml on CrowdStrike/mcpscanner

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