dashboard
dashboard
¶
Dashboard and MCP server commands for Marianne CLI.
This module implements server commands for external integrations:
- dashboard: Start the web dashboard for job monitoring
- mcp: Start the Model Context Protocol server for AI agent access
★ Insight ─────────────────────────────────────
1. Lazy imports for optional dependencies: The dashboard command only imports
uvicorn when executed, not at module load time. This allows the CLI to work
even when uvicorn isn't installed, deferring the error until the user tries
to use the feature. This is a common pattern for optional dependencies.
-
State backend preference hierarchy: The dashboard prefers SQLite if a database file exists, falling back to JSON. This respects user choice while providing sensible defaults - SQLite offers better query performance for dashboards while JSON provides simplicity and human readability for debugging.
-
MCP as external API surface: The MCP server exposes Marianne's capabilities to external AI agents using a standardized protocol. This transforms Marianne from a standalone CLI into an API-accessible service that other AI systems can invoke. ─────────────────────────────────────────────────
Functions¶
dashboard
¶
dashboard(port=Option(8000, '--port', '-p', help='Port to run dashboard on'), host=Option('127.0.0.1', '--host', help='Host to bind to'), workspace=Option(None, '--workspace', '-w', help='Workspace directory for job state (defaults to current directory)'), reload=Option(False, '--reload', '-r', help='Enable auto-reload for development'))
Start the web dashboard.
Launches the Marianne dashboard API server for job monitoring and control. The API provides endpoints for listing, viewing, and managing jobs.
Examples:
mzt dashboard # Start on localhost:8000 mzt dashboard --port 3000 # Custom port mzt dashboard --host 0.0.0.0 # Allow external connections mzt dashboard --workspace ./jobs # Use specific state directory
Source code in src/marianne/cli/commands/dashboard.py
mcp
¶
mcp(port=Option(8001, '--port', '-p', help='Port to run MCP server on'), host=Option('127.0.0.1', '--host', help='Host to bind to'), workspace=Option(None, '--workspace', '-w', help='Workspace directory for job operations (defaults to current directory)'))
Start the Marianne MCP (Model Context Protocol) server.
Launches an MCP server that exposes Marianne's job management capabilities as tools for external AI agents. The server provides:
- Job management tools (run, status, pause, resume, cancel)
- Artifact browsing and log streaming
- Configuration access as resources
Security: All tool executions require explicit user consent. File system access is restricted to designated workspace directories.
Examples:
mzt mcp # Start on localhost:8001 mzt mcp --port 8002 # Custom port mzt mcp --workspace ./projects # Use specific workspace root