MCP Integration

Muster ships with a built-in MCP (Model Context Protocol) server that lets AI assistants like Claude Desktop and Claude Code interact with your deploy infrastructure. Check status, trigger deploys, view logs, and roll back — all through natural language.

Setup

The MCP server is provided by the muster-mcp binary, which is installed alongside muster. Add it to your AI assistant's MCP configuration:

json
{
  "mcpServers": {
    "muster": {
      "command": "muster-mcp",
      "args": ["--project", "/path/to/your/project"]
    }
  }
}

Available MCP tools

The muster MCP server exposes these tools to AI assistants:

Setup & scaffolding

NameDescription
muster_scan_project
toolDetect project files (Dockerfile, compose, package.json, etc.) and suggest services.
muster_init_project
toolCreate deploy.json, hook directories, and .gitignore entries.
muster_write_hook
toolWrite a hook script (deploy.sh, health.sh, rollback.sh, logs.sh, cleanup.sh). Auto-creates dirs.
muster_read_hook
toolRead an existing hook script. Shows available hooks if requested one is missing.

Operations

NameDescription
muster_list_services
toolList services with health type and hook availability.
muster_status
toolHealth check all services (returns HEALTHY/UNHEALTHY per service).
muster_deploy
toolDeploy all or a specific service, then verify health.
muster_rollback
toolRollback a specific service.
muster_logs
toolGet recent deploy log lines for a service.
muster_cleanup
toolRun cleanup hooks and delete old log files.
muster_config
toolReturn the full deploy.json / muster.json contents.

Credentials

NameDescription
muster_set_credential
toolStore a credential key-value pair in the MCP session (never written to disk).
muster_list_credentials
toolList stored credential keys for the current session.
muster_clear_credentials
toolWipe all in-memory credentials.
Warning
All tools require a project_dir parameter. The MCP server runs locally over stdio and requires jq. Credentials stored via muster_set_credential are kept in-memory only — they are never written to disk.

Example workflow

Once configured, you can interact with muster through natural language in Claude:

text
You: "What's the current deploy status?"
Claude: (calls muster_status) "All 3 services are healthy..."

You: "Deploy the API service with a dry run first"
Claude: (calls muster_deploy --service api --dry-run) "Dry run complete..."

You: "Looks good, deploy it for real"
Claude: (calls muster_deploy --service api) "Deploy successful..."
Tip
The MCP integration works with any AI assistant that supports the Model Context Protocol, not just Claude. Check your AI tool's documentation for MCP configuration.