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

scan

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 ignore

Examples

Scan current directory

mcpsafe scan ./

Scan and wait for results

mcpsafe scan ./ --wait

Output as JSON

mcpsafe scan ./ --format json --output results.json

Fail on high severity

mcpsafe scan ./ --fail-on high

Scan specific branch

mcpsafe scan https://github.com/owner/repo --branch develop

check

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 check

Examples

Check npm package

mcpsafe check @modelcontextprotocol/server-filesystem

Check PyPI package

mcpsafe check --registry pypi mcp-server-fetch

Check specific version

mcpsafe check lodash --version 4.17.21

config

Manage CLI configuration settings

Usage

mcpsafe config <action> [key] [value]

Options

set <key> <value>Set a configuration value
get <key>Get a configuration value
listList all configuration values
resetReset to default configuration

Examples

Set API key

mcpsafe config set apiKey mcp_abc12345_xxx

Set default format

mcpsafe config set format json

View all settings

mcpsafe config list

Get specific value

mcpsafe config get apiKey

login

Authenticate with your MCPSafe account

Usage

mcpsafe login [options]

Options

--token <key>Provide API key directly (non-interactive)

Examples

Interactive login

mcpsafe login

Login with token

mcpsafe login --token mcp_abc12345_xxx

logout

Remove stored credentials

Usage

mcpsafe logout

Examples

Logout

mcpsafe logout

info

Display information about the CLI and environment

Usage

mcpsafe info

Examples

Show info

mcpsafe info