Start the Muster control plane server.
muster serve [OPTIONS]
The serve command starts the Muster control plane, which manages MCP servers, workflows, services, and provides the unified API for agent interactions. This is the core command that enables all other Muster functionality.
The aggregator server provides a unified MCP interface that other muster commands can connect to. Once started, you can use commands like muster list, muster create, muster start, etc. to interact with the running server.
--config-path(string): Custom configuration directory path- Default:
~/.config/muster - Directory should contain
config.yamland subdirectories:mcpservers/,workflows/,services/
- Default:
--debug: Enable debug-level logging and verbose output- Default:
false - Provides detailed information about service startup and operations
- Default:
--silent: Disable console log output (writer →io.Discard)- Default:
false - Useful for programmatic usage or when console output needs to be suppressed
- Does not silence OTLP. When OTLP is configured (via
OTEL_EXPORTER_OTLP_*orOTEL_LOGS_EXPORTER), log records still flow to the collector. To disable OTLP, unset those env vars or setOTEL_SDK_DISABLED=true.
- Default:
--yolo: Disable denylist for destructive tool calls- Default:
false - WARNING: Use with extreme caution. This removes safety restrictions on potentially destructive operations
- Default:
The serve command uses configuration from config.yaml in the configuration directory:
# Default configuration structure
server:
port: 8080
host: "0.0.0.0"
timeout: "30s"
mcpServers:
autoStart: true
timeout: "30s"
healthCheckInterval: "30s"
logging:
level: "info"
format: "text"
storage:
dataDir: "~/.local/share/muster"
tempDir: "/tmp"
# Component directories
directories:
mcpservers: "mcpservers/"
workflows: "workflows/"
services: "services/"When you run muster serve, the following initialization occurs:
-
Configuration Loading
- Loads configuration from the specified directory
- Supports layered configuration (defaults + user + project)
- Validates configuration structure
-
Service Initialization
- Sets up API service locator pattern
- Initializes orchestrator for service lifecycle management
- Registers all service adapters with the API layer
-
Component Loading
- Loads MCP server definitions from
mcpservers/ - Loads workflow definitions from
workflows/ - Loads service instances from
services/
- Loads MCP server definitions from
-
Auto-Start Services
- Starts all configured MCP servers with
autoStart: true - Initializes the aggregator service for tool access
- Starts any service instances marked for auto-start
- Starts all configured MCP servers with
-
Server Ready
- Begins accepting connections on the configured port
- Provides unified MCP interface for client connections
# Start with default settings
muster serve
# Logs will show startup progress:
# INFO: Setting up orchestrator for service management
# INFO: Loading MCP servers from ~/.config/muster/mcpservers/
# INFO: Services started. Press Ctrl+C to stop all services and exit.# Use custom configuration path
muster serve --config-path /etc/muster
# For development with local config
muster serve --config-path ./local-config# Start with debug logging
muster serve --debug
# Debug output includes:
# DEBUG: Loaded configuration from custom path: /etc/muster
# DEBUG: Initializing service registry
# DEBUG: Registering MCP server adapter
# DEBUG: Starting MCP server: kubernetes# Production server configuration
muster serve \
--config-path /etc/muster \
--silent
# Recommended systemd service setup# Development with debug output
muster serve \
--debug \
--config-path ./dev-configThe configuration directory should be organized as follows:
/path/to/config/
├── config.yaml # Main configuration
├── mcpservers/ # MCP server definitions
│ ├── kubernetes.yaml
│ ├── prometheus.yaml
│ └── github.yaml
├── workflows/ # Workflow definitions
│ ├── deploy-app.yaml
│ └── backup-db.yaml
└── services/ # Service instances
├── my-web-app.yaml
└── prod-database.yaml
| Variable | Description | Default |
|---|---|---|
MUSTER_CONFIG_PATH |
Override default configuration directory | ~/.config/muster |
MUSTER_DEBUG |
Enable debug mode | false |
MUSTER_LOG_LEVEL |
Set log level (debug|info|warn|error) | info |
| Code | Meaning |
|---|---|
| 0 | Server shutdown cleanly |
| 1 | Configuration error or invalid arguments |
| 2 | Service initialization failed |
| 3 | Failed to start required services |
| 130 | Interrupted by signal (Ctrl+C) |
The serve command handles the following signals for graceful shutdown:
- SIGINT (Ctrl+C): Initiates graceful shutdown sequence
- SIGTERM: Initiates graceful shutdown sequence
During shutdown:
- Stops accepting new connections
- Gracefully stops all running services
- Saves any pending state
- Exits cleanly
Error: Failed to load muster configuration
# Check configuration file exists and is valid YAML
ls -la ~/.config/muster/config.yaml
muster serve --debug # Shows detailed error informationError: Failed to initialize services
# Verify configuration directory structure
ls -la ~/.config/muster/
mkdir -p ~/.config/muster/{mcpservers,workflows,services}Error: MCP servers fail to start
# Check MCP server configurations
muster serve --debug
# Verify MCP server binaries are available
which mcp-kubernetes
which mcp-prometheusError: Address already in use
# Check what's using the port
netstat -tulpn | grep :8080
lsof -i :8080
# Edit config.yaml to use different port
# server:
# port: 8081Error: Permission denied accessing configuration
# Check directory permissions
ls -la ~/.config/muster
chmod 755 ~/.config/muster
chmod 644 ~/.config/muster/config.yaml
# For system-wide configuration
sudo chown -R muster:muster /etc/musterError: Services fail to start due to dependencies
# Start without auto-start to debug
# Edit config.yaml:
# mcpServers:
# autoStart: false
# Then start services individually using other commands
muster list mcpserver
muster start service <service-name>After starting the server, you can use other Muster commands:
# In one terminal
muster serve
# In another terminal
muster list service # List all services
muster create service my-app
muster agent --repl # Interactive tool exploration
muster test --scenario basic-crud # Run testsTo connect Muster to your IDE (Cursor, VSCode, etc.):
# Start the server
muster serve
# In your IDE's MCP configuration, use:
muster agent --mcp-server- agent - Connect to the server interactively
- list - List resources managed by the server
- get - Get detailed resource information
- create - Create new resources
- test - Test server functionality
# Single-path configuration (no layering)
muster serve --config-path /opt/muster/config
# Development with debug and custom path
muster serve --debug --config-path ./test-config# Production: Run without --yolo flag
muster serve --config-path /etc/muster
# Development: Use --yolo for testing only
muster serve --debug --yolo --config-path ./dev-configThe server exposes health and status information:
# Check server status (from another terminal)
curl http://localhost:8080/api/v1/status
# Monitor logs in real-time
muster serve --debug | tee muster.log