CLI
CLI Commands
Complete reference for all MCPSafe CLI commands and their options.
Global Options
--help, -hDisplay help for the command--version, -vDisplay CLI version--quiet, -qSuppress non-essential output--verboseEnable verbose outputscan
Scan a local directory or remote URL for security vulnerabilities
Usage
mcpsafe scan <path|url> [options]Options
--waitWait for scan to complete before exiting--format <type>Output format: json, sarif, table (default: table)--output <file>Write results to a file--fail-on <severity>Exit with error if vulnerabilities found at this severity or above--branch <name>Git branch to scan (for remote repos)--ignore <patterns>Comma-separated patterns to ignoreExamples
Scan current directory
mcpsafe scan ./Scan and wait for results
mcpsafe scan ./ --waitOutput as JSON
mcpsafe scan ./ --format json --output results.jsonFail on high severity
mcpsafe scan ./ --fail-on highScan specific branch
mcpsafe scan https://github.com/owner/repo --branch developcheck
Check the security status of a package without running a full scan
Usage
mcpsafe check <package> [options]Options
--registry <name>Package registry: npm, pypi (default: npm)--version <ver>Specific version to checkExamples
Check npm package
mcpsafe check @modelcontextprotocol/server-filesystemCheck PyPI package
mcpsafe check --registry pypi mcp-server-fetchCheck specific version
mcpsafe check lodash --version 4.17.21config
Manage CLI configuration settings
Usage
mcpsafe config <action> [key] [value]Options
set <key> <value>Set a configuration valueget <key>Get a configuration valuelistList all configuration valuesresetReset to default configurationExamples
Set API key
mcpsafe config set apiKey mcp_abc12345_xxxSet default format
mcpsafe config set format jsonView all settings
mcpsafe config listGet specific value
mcpsafe config get apiKeylogin
Authenticate with your MCPSafe account
Usage
mcpsafe login [options]Options
--token <key>Provide API key directly (non-interactive)Examples
Interactive login
mcpsafe loginLogin with token
mcpsafe login --token mcp_abc12345_xxxlogout
Remove stored credentials
Usage
mcpsafe logoutExamples
Logout
mcpsafe logoutinfo
Display information about the CLI and environment
Usage
mcpsafe infoExamples
Show info
mcpsafe info