mcptrust scan
Command reference for scan.
Synopsis
mcptrust scan [flags] -- <server-command>Description
Connects to an MCP server via stdio, interrogates it for tools/resources, and outputs a JSON security report.
Flags
| Flag | Default | Description |
|---|---|---|
-p, --pretty | false | Pretty-print JSON output |
-t, --timeout | 10s | Timeout for MCP operations |
Output
JSON ScanReport with:
server_info: name, version, protocoltools[]: name, description, inputSchema, risk_levelresources[]: name, uri, mimeType
Examples
# Basic scan
mcptrust scan -- "npx -y @modelcontextprotocol/server-filesystem /tmp"
# Pretty output
mcptrust scan --pretty -- "python mcp_server.py"
# Custom timeout
mcptrust scan --timeout 30s -- "slow-starting-server"