Skip to content
Arxo Arxo

CLI Comparison

This page maps Arxo CLI commands to their MCP equivalents, helping you transition between the command-line interface and the MCP server.


CLI CommandMCP EquivalentNotes
arxo analyzeanalyze_architectureFull analysis
arxo analyze --preset cianalyze_architecture({ preset: "ci" })Preset support
arxo analyze --baseline mainanalyze_with_baseline({ baseline_ref: "main" })⚠️ Requires Pro
arxo doctorcheck_cyclesFast health check
arxo initN/ACLI only
arxo cache clearN/ARestart MCP server instead
arxo metrics listlist_presetsLists presets, not individual metrics
arxo config validateN/ACLI only

CLI:

Terminal window
arxo analyze

MCP:

analyze_architecture({ "project_path": "." })

Output:

  • CLI: Human-readable text or JSON (with --format json)
  • MCP: Always JSON with structured metrics and violations

CLI:

Terminal window
arxo analyze --preset quick

MCP:

analyze_architecture({
"project_path": ".",
"preset": "quick"
})

Available presets: quick, ci, risk, coupling, security, runtime, ai, rag, full


CLI:

Terminal window
arxo analyze --config custom-config.yaml

MCP:

analyze_architecture({
"project_path": ".",
"config_path": "/path/to/custom-config.yaml"
})

CLI:

Terminal window
arxo analyze --baseline main

MCP:

analyze_with_baseline({
"project_path": ".",
"baseline_ref": "main"
})

CLI:

Terminal window
arxo doctor

MCP:

check_cycles({ "project_path": "." })

Output:

  • CLI: Exit code 0 if no cycles, 1 if cycles detected
  • MCP: JSON with { scc: { component_count, cycle_count, max_cycle_size, total_nodes_in_cycles }, violations_count }

CLI:

Terminal window
arxo analyze --preset ai

MCP:

check_llm_integration({ "project_path": "." })

Difference:

  • CLI: Runs the full ai preset (all AI/ML metrics)
  • MCP: Focused on llm_integration metric only

CLI:

Terminal window
arxo analyze --policy

MCP:

evaluate_policy({ "project_path": "." })

CLI:

Terminal window
echo "policy:
invariants:
- metric: scc.max_cycle_size
op: '<='
value: 0" > temp-policy.yaml
arxo analyze --config temp-policy.yaml --policy

MCP:

evaluate_policy({
"project_path": ".",
"policy_yaml": "policy:\n invariants:\n - metric: scc.max_cycle_size\n op: '<='\n value: 0"
})

CLI:

Terminal window
arxo analyze --preset risk --format json | jq '.findings'

MCP:

get_hotspots({ "project_path": "." })

Difference:

  • CLI: Returns all findings from the risk preset
  • MCP: Returns filtered hotspots with severity and evidence count

CLI:

Terminal window
arxo analyze --preset risk --format json | jq '.recommendations'

MCP:

suggest_refactors({ "project_path": "." })

MCP:

analyze_file_impact({
"project_path": ".",
"file_paths": ["src/core/auth.ts"]
})

CLI Workaround:

Terminal window
# Run full analysis and grep for the file
arxo analyze --format json | jq '.results[] | select(.evidence[]?.file | contains("auth.ts"))'

The MCP tool is more efficient because it runs incremental analysis for the specified files only.


CLI:

Terminal window
arxo metrics list

MCP:

list_presets()

Output:

  • CLI: Lists individual metrics
  • MCP: Lists presets (groups of metrics)

CLI:

Terminal window
arxo init

MCP: No equivalent. Generate a config file using the CLI, then reference it in MCP tools.


CLI:

Terminal window
arxo config validate

MCP: No equivalent. The MCP server validates config implicitly when loading it for analysis.


CLI:

Terminal window
arxo cache clear

MCP: Restart the MCP server. The cache is in-memory and cleared on restart.


CLI:

Terminal window
arxo cache stats

MCP: Enable debug logging and look for cache hit/miss messages:

[INFO] Cache hit for project: ...
[INFO] Cache miss, running analysis for project: ...

CLI:

Terminal window
arxo analyze --format json

MCP: All MCP tools return JSON by default.


CLI:

Terminal window
arxo analyze

MCP: No equivalent. MCP tools return structured JSON. The AI assistant formats it for the user.


CLI:

Terminal window
arxo analyze --format html > report.html

MCP: No equivalent. Use the CLI for report generation.


These features have no MCP equivalent:

FeatureCLI CommandWhy MCP Doesn’t Support It
Config initializationarxo initOne-time setup, not interactive
Report generationarxo analyze --format htmlMCP clients handle presentation
Cache persistencearxo cacheMCP cache is in-memory
Shell completionsarxo completionsClient-specific
Git worktree creationarxo analyze --baselineRequires filesystem manipulation
Refactoring executionFuture CLI featureMCP is read-only analysis

These features have no direct CLI equivalent:

FeatureMCP ToolWhy CLI Doesn’t Support It
File-scoped impact analysisanalyze_file_impactDesigned for AI assistant context
Hotspot summarizationget_hotspotsCLI returns raw findings
Resource URIsmetrics://current/...MCP-specific protocol

#!/bin/bash
arxo doctor || exit 1
arxo analyze --preset ci --policy || exit 1

The AI assistant runs:

  1. check_cycles({ "project_path": "." })
  2. evaluate_policy({ "project_path": "." })
  3. Blocks commit if violations found

- name: Architecture Analysis
run: |
arxo analyze --preset ci --baseline main --format json > analysis.json
arxo analyze --policy || exit 1

Not recommended. Use the CLI in CI for:

  • Baseline comparison
  • Report artifacts
  • Policy gates with exit codes

Use MCP for interactive development workflows.


ScenarioUse CLIUse MCP
CI/CD pipeline
Pre-commit hooks
Interactive development (IDE)
AI assistant queries
One-time reports
Exploring codebase with AI
Baseline comparison⚠️ (Limited)
Policy evaluation✅ Both

  1. Replace shell scripts with AI assistant workflows:

    • CLI: arxo doctor && arxo analyze --preset ci
    • MCP: Ask AI to “check for cycles and run CI preset”
  2. Use resources for quick checks:

    • CLI: arxo analyze --format json | jq '.violations'
    • MCP: Read policy://violations/. resource
  3. Let AI assistants handle formatting:

    • CLI: --format json, --format html
    • MCP: Tools return JSON, AI formats for user
  1. When you need baseline comparison:

    • MCP: analyze_with_baseline (limited support)
    • CLI: arxo analyze --baseline main
  2. When you need reports:

    • MCP: No report generation
    • CLI: arxo analyze --format html
  3. When you need persistent cache:

    • MCP: In-memory cache (cleared on restart)
    • CLI: Persistent cache in ~/.cache/arxo