Command Reference¶
This section provides detailed documentation for all MCP Standards Server CLI commands.
Command Index¶
Core Commands¶
- sync - Synchronize standards from repository
- status - Show sync status and statistics
- cache - Manage local cache
- config - Show or validate configuration
- generate - Generate standards from templates
Planned Commands¶
The following commands are documented but not yet fully implemented in the CLI:
- query - Query standards based on context (use Python API or MCP server)
- validate - Validate code against standards (available as generate subcommand)
- serve - Start MCP server (use
python -m src)
Global Options¶
These options are available for all commands:
-v, --verbose¶
Enable verbose output for debugging.
-c, --config <path>¶
Specify a custom configuration file.
--no-color¶
Disable colored output (useful for CI/CD environments).
--json¶
Output results in JSON format where applicable.
-h, --help¶
Show help message for any command.
Exit Codes¶
The CLI uses standard exit codes:
0: Success1: General error2: Command line syntax error3: Configuration error4: Network/sync error5: Validation error
Environment Variables¶
The following environment variables affect CLI behavior:
MCP_STANDARDS_CONFIG: Default configuration file pathMCP_STANDARDS_DATA_DIR: Data directory locationMCP_STANDARDS_CACHE_DIR: Cache directory locationMCP_DISABLE_SEARCH: Disable semantic search featuresNO_COLOR: Disable colored output (same as --no-color)MCP_LOG_LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR)
Configuration Precedence¶
Configuration is loaded in the following order (later sources override earlier ones):
- Default configuration
- System-wide configuration (
/etc/mcp-standards/config.yaml) - User configuration (
~/.config/mcp-standards/config.yaml) - Project configuration (
./.mcp-standards.yaml) - Environment variables
- Command-line options
Common Patterns¶
Automated Sync in CI/CD¶
Project-Specific Configuration¶
JSON Output for Scripting¶
# Get status as JSON for processing
STATUS=$(mcp-standards --json status)
echo $STATUS | jq '.total_files'