Comprehensive reference for Muster's REST API and MCP (Model Context Protocol) interfaces.
Muster provides a comprehensive API layer that supports multiple protocols and interfaces:
- MCP Aggregator API - Primary MCP protocol interface for tool execution
- Core API Tools - Built-in tools for managing Muster resources
| Transport | Endpoint | Purpose |
|---|---|---|
| SSE | http://localhost:8080/sse |
Server-Sent Events for real-time communication |
| Streamable HTTP | http://localhost:8080/mcp |
HTTP-based streaming protocol (default) |
| Message Endpoint | http://localhost:8080/message |
HTTP message posting for SSE transport |
| Stdio | stdio |
Standard I/O for easy integration |
The MCP Aggregator is Muster's primary interface, aggregating tools from multiple MCP servers and exposing them through a unified API.
HTTP-based streaming for broader compatibility:
# List available tools
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/list", "params": {}}'
# Execute a tool
curl -X POST http://localhost:8080/mcp \
-H "Content-Type": application/json" \
-d '{
"method": "tools/call",
"params": {
"name": "x_kubernetes_get_pods",
"arguments": {"namespace": "default"}
}
}'Real-time bidirectional communication with persistent connections:
// Connect to SSE endpoint
const eventSource = new EventSource('http://localhost:8080/sse');
eventSource.onmessage = function(event) {
const data = JSON.parse(event.data);
console.log('Received:', data);
};
// Send messages via HTTP POST
fetch('http://localhost:8080/message', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
method: 'tools/list',
params: {}
})
});Muster provides a comprehensive set of built-in tools for managing all aspects of the platform. These tools are organized into functional categories:
- Configuration Tools - System configuration management
- MCP Server Tools - MCP server lifecycle management
- Service Tools - Service instance management
- ServiceClass Tools - ServiceClass definition management
- Workflow Tools - Workflow definition and execution management
Note: Workflow execution is available through dynamically generated
workflow_<workflow-name>tools. For example, if you have a workflow named "deploy-app", you can execute it using theworkflow_deploy-apptool. Use the agent REPL (muster agent --repl) orlist toolsto discover available workflow execution tools.
Tools for managing Muster system configuration and aggregator settings.
Retrieve current system configuration.
Parameters: None
Example:
{
"method": "tools/call",
"params": {
"name": "core_config_get",
"arguments": {}
}
}Retrieve current aggregator configuration.
Parameters: None
Example:
{
"method": "tools/call",
"params": {
"name": "core_config_get_aggregator",
"arguments": {}
}
}Reload system configuration from files.
Parameters: None
Example:
{
"method": "tools/call",
"params": {
"name": "core_config_reload",
"arguments": {}
}
}Save current configuration to files.
Parameters: None
Example:
{
"method": "tools/call",
"params": {
"name": "core_config_save",
"arguments": {}
}
}Update aggregator configuration.
Parameters:
aggregator(object, required) - Aggregator configuration object
Example:
{
"method": "tools/call",
"params": {
"name": "core_config_update_aggregator",
"arguments": {
"aggregator": {
"port": 8080,
"host": "localhost"
}
}
}
}Tools for managing MCP server lifecycle, including creation, configuration, and monitoring.
Create a new MCP server configuration.
Parameters:
name(string, required) - MCP server nametype(string, required) - MCP server type (stdio,streamable-http, orsse)description(string, optional) - MCP server descriptioncommand(array of strings, optional) - Command and arguments (for stdio type)args(array of strings, optional) - Command line arguments (for stdio type)url(string, optional) - Server endpoint URL (for streamable-http and sse types)env(object, optional) - Environment variables as key-value pairsheaders(object, optional) - HTTP headers (for streamable-http and sse types)timeout(integer, optional) - Connection timeout in secondsautoStart(boolean, optional) - Whether server should auto-start
Example:
{
"method": "tools/call",
"params": {
"name": "core_mcpserver_create",
"arguments": {
"name": "my-mcp-server",
"type": "stdio",
"description": "Custom MCP server for project management",
"command": ["node", "/path/to/server.js"],
"env": {
"NODE_ENV": "production",
"API_KEY": "secret"
},
"autoStart": true
}
}
}Delete an MCP server configuration.
Parameters:
name(string, required) - Name of the MCP server to delete
Example:
{
"method": "tools/call",
"params": {
"name": "core_mcpserver_delete",
"arguments": {
"name": "my-mcp-server"
}
}
}Retrieve details of a specific MCP server.
Parameters:
name(string, required) - Name of the MCP server to retrieve
Example:
{
"method": "tools/call",
"params": {
"name": "core_mcpserver_get",
"arguments": {
"name": "my-mcp-server"
}
}
}List all configured MCP servers.
Parameters: None
Example:
{
"method": "tools/call",
"params": {
"name": "core_mcpserver_list",
"arguments": {}
}
}Update an existing MCP server configuration.
Parameters:
name(string, required) - MCP server nametype(string, optional) - MCP server type (stdio,streamable-http, orsse)description(string, optional) - MCP server descriptioncommand(array of strings, optional) - Command and arguments (for stdio type)args(array of strings, optional) - Command line arguments (for stdio type)url(string, optional) - Server endpoint URL (for streamable-http and sse types)env(object, optional) - Environment variables as key-value pairsheaders(object, optional) - HTTP headers (for streamable-http and sse types)timeout(integer, optional) - Connection timeout in secondsautoStart(boolean, optional) - Whether server should auto-start
Example:
{
"method": "tools/call",
"params": {
"name": "core_mcpserver_update",
"arguments": {
"name": "my-mcp-server",
"description": "Updated description",
"autoStart": false
}
}
}Validate MCP server configuration without creating it.
Parameters:
name(string, required) - MCP server nametype(string, required) - MCP server type (stdio,streamable-http, orsse)description(string, optional) - MCP server descriptioncommand(array of strings, optional) - Command and arguments (for stdio type)args(array of strings, optional) - Command line arguments (for stdio type)url(string, optional) - Server endpoint URL (for streamable-http and sse types)env(object, optional) - Environment variables as key-value pairsheaders(object, optional) - HTTP headers (for streamable-http and sse types)timeout(integer, optional) - Connection timeout in secondsautoStart(boolean, optional) - Whether server should auto-start
Example:
{
"method": "tools/call",
"params": {
"name": "core_mcpserver_validate",
"arguments": {
"name": "test-server",
"type": "stdio",
"command": ["node", "server.js"]
}
}
}Tools for managing service instances, including lifecycle operations and status monitoring.
Create a new service instance from a ServiceClass.
Parameters:
serviceClassName(string, required) - Name of the ServiceClass to instantiatename(string, required) - Unique name for the service instanceargs(object, optional) - Arguments for service creation (depends on ServiceClass definition)persist(boolean, optional) - Whether to persist this service instance definition to YAML filesautoStart(boolean, optional) - Whether this instance should be started automatically on system startup
Example:
{
"method": "tools/call",
"params": {
"name": "core_service_create",
"arguments": {
"serviceClassName": "database",
"name": "prod-db",
"args": {
"port": 5432,
"database": "production"
},
"persist": true,
"autoStart": true
}
}
}Delete a service instance.
Parameters:
name(string, required) - Name of the ServiceClass instance to delete
Example:
{
"method": "tools/call",
"params": {
"name": "core_service_delete",
"arguments": {
"name": "prod-db"
}
}
}Retrieve details of a specific service instance.
Parameters:
name(string, required) - Name of the service to get
Example:
{
"method": "tools/call",
"params": {
"name": "core_service_get",
"arguments": {
"name": "prod-db"
}
}
}List all service instances.
Parameters: None
Example:
{
"method": "tools/call",
"params": {
"name": "core_service_list",
"arguments": {}
}
}Restart a service instance.
Parameters:
name(string, required) - Service name to restart
Example:
{
"method": "tools/call",
"params": {
"name": "core_service_restart",
"arguments": {
"name": "prod-db"
}
}
}Start a service instance.
Parameters:
name(string, required) - Service name to start
Example:
{
"method": "tools/call",
"params": {
"name": "core_service_start",
"arguments": {
"name": "prod-db"
}
}
}Get the status of a service instance.
Parameters:
name(string, required) - Service name to get status for
Example:
{
"method": "tools/call",
"params": {
"name": "core_service_status",
"arguments": {
"name": "prod-db"
}
}
}Stop a service instance.
Parameters:
name(string, required) - Service name to stop
Example:
{
"method": "tools/call",
"params": {
"name": "core_service_stop",
"arguments": {
"name": "prod-db"
}
}
}Validate service configuration without creating it.
Parameters:
name(string, required) - Service instance nameserviceClassName(string, required) - Name of the ServiceClass to instantiateargs(object, optional) - Arguments for service creationautoStart(boolean, optional) - Whether this instance should auto-startdescription(string, optional) - Service instance description
Example:
{
"method": "tools/call",
"params": {
"name": "core_service_validate",
"arguments": {
"name": "test-db",
"serviceClassName": "database",
"args": {
"port": 5433
}
}
}
}Tools for managing ServiceClass definitions that serve as templates for service instances.
Check if a ServiceClass is available and properly configured.
Parameters:
name(string, required) - Name of the ServiceClass to check
Example:
{
"method": "tools/call",
"params": {
"name": "core_serviceclass_available",
"arguments": {
"name": "database"
}
}
}Create a new ServiceClass definition.
Parameters:
name(string, required) - ServiceClass nameserviceConfig(object, required) - ServiceClass service configurationserviceType(string, required) - Type of service this configuration manageslifecycleTools(object, required) - Tools for managing service lifecyclestart(object, required) - Tool configuration for start operationsstop(object, required) - Tool configuration for stop operationsrestart(object, optional) - Tool configuration for restart operationsstatus(object, optional) - Tool configuration for status operationshealthCheck(object, optional) - Tool configuration for health check operations
defaultName(string, optional) - Default name pattern for service instancesdependencies(array of strings, optional) - List of ServiceClass names that must be availableoutputs(object, optional) - Template-based outputs for service instancestimeout(object, optional) - Timeout configuration for service operationshealthCheck(object, optional) - Health check configuration
args(object, optional) - ServiceClass arguments schemadescription(string, optional) - ServiceClass description
Example:
{
"method": "tools/call",
"params": {
"name": "core_serviceclass_create",
"arguments": {
"name": "web-service",
"description": "Generic web service template",
"serviceConfig": {
"serviceType": "web",
"lifecycleTools": {
"start": {
"tool": "docker_start",
"args": {
"image": "{{.image}}"
}
},
"stop": {
"tool": "docker_stop"
}
}
},
"args": {
"image": {
"type": "string",
"required": true,
"description": "Docker image to run"
},
"port": {
"type": "integer",
"default": 8080,
"description": "Port to expose"
}
}
}
}
}Delete a ServiceClass definition.
Parameters:
name(string, required) - Name of the ServiceClass to delete
Example:
{
"method": "tools/call",
"params": {
"name": "core_serviceclass_delete",
"arguments": {
"name": "web-service"
}
}
}Retrieve details of a specific ServiceClass.
Parameters:
name(string, required) - Name of the ServiceClass to retrieve
Example:
{
"method": "tools/call",
"params": {
"name": "core_serviceclass_get",
"arguments": {
"name": "web-service"
}
}
}List all ServiceClass definitions.
Parameters: None
Example:
{
"method": "tools/call",
"params": {
"name": "core_serviceclass_list",
"arguments": {}
}
}Update an existing ServiceClass definition.
Parameters:
name(string, required) - ServiceClass nameserviceConfig(object, optional) - ServiceClass service configurationargs(object, optional) - ServiceClass arguments schemadescription(string, optional) - ServiceClass description
Example:
{
"method": "tools/call",
"params": {
"name": "core_serviceclass_update",
"arguments": {
"name": "web-service",
"description": "Updated web service template with monitoring"
}
}
}Validate ServiceClass configuration without creating it.
Parameters:
name(string, required) - ServiceClass nameserviceConfig(object, required) - ServiceClass service configurationargs(object, optional) - ServiceClass arguments schemadescription(string, optional) - ServiceClass description
Example:
{
"method": "tools/call",
"params": {
"name": "core_serviceclass_validate",
"arguments": {
"name": "test-service",
"serviceConfig": {
"serviceType": "test",
"lifecycleTools": {
"start": {"tool": "echo"},
"stop": {"tool": "echo"}
}
}
}
}
}Tools for managing workflow definitions and execution tracking.
Check if a workflow is available and properly configured.
Parameters:
name(string, required) - Name of the workflow
Example:
{
"method": "tools/call",
"params": {
"name": "core_workflow_available",
"arguments": {
"name": "deploy-application"
}
}
}Create a new workflow definition.
Parameters:
name(string, required) - Name of the workflowsteps(array, required) - Workflow steps (minimum 1 step)- Each step object contains:
id(string, required) - Unique identifier for this steptool(string, required) - Name of the tool to executedescription(string, optional) - Human-readable documentationargs(object, optional) - Arguments to pass to the tooloutputs(object, optional) - Output variable assignmentscondition(object, optional) - Conditional execution logicallow_failure(boolean, optional) - Whether step can fail without failing workflowstore(boolean, optional) - Whether to store step result in workflow results
- Each step object contains:
args(object, optional) - Workflow arguments definitiondescription(string, optional) - Description of the workflow
Example:
{
"method": "tools/call",
"params": {
"name": "core_workflow_create",
"arguments": {
"name": "deploy-web-service",
"description": "Deploy a web service with health checks",
"args": {
"service_name": {
"type": "string",
"required": true,
"description": "Name of the service to deploy"
},
"image": {
"type": "string",
"required": true,
"description": "Docker image to deploy"
}
},
"steps": [
{
"id": "create_service",
"tool": "core_service_create",
"description": "Create the service instance",
"args": {
"serviceClassName": "web-service",
"name": "{{.service_name}}",
"args": {
"image": "{{.image}}"
}
}
},
{
"id": "start_service",
"tool": "core_service_start",
"description": "Start the service",
"args": {
"name": "{{.service_name}}"
}
},
{
"id": "check_health",
"tool": "core_service_status",
"description": "Verify service is healthy",
"args": {
"name": "{{.service_name}}"
}
}
]
}
}
}Delete a workflow definition.
Parameters:
name(string, required) - Name of the workflow to delete
Example:
{
"method": "tools/call",
"params": {
"name": "core_workflow_delete",
"arguments": {
"name": "deploy-web-service"
}
}
}Retrieve details of a specific workflow execution.
Parameters:
execution_id(string, required) - ID of the executioninclude_steps(boolean, optional, default: true) - Include step detailsstep_id(string, optional) - Get specific step details
Example:
{
"method": "tools/call",
"params": {
"name": "core_workflow_execution_get",
"arguments": {
"execution_id": "exec_123456",
"include_steps": true
}
}
}List workflow executions with optional filtering.
Parameters:
limit(number, optional, default: 50) - Maximum number of executions to returnoffset(number, optional, default: 0) - Number of executions to skipstatus(string, optional) - Filter by execution statusworkflow_name(string, optional) - Filter by workflow name
Example:
{
"method": "tools/call",
"params": {
"name": "core_workflow_execution_list",
"arguments": {
"limit": 10,
"status": "completed",
"workflow_name": "deploy-web-service"
}
}
}Retrieve details of a specific workflow definition.
Parameters:
name(string, required) - Name of the workflow
Example:
{
"method": "tools/call",
"params": {
"name": "core_workflow_get",
"arguments": {
"name": "deploy-web-service"
}
}
}List all workflow definitions.
Parameters:
include_system(boolean, optional, default: true) - Include system-defined workflows
Example:
{
"method": "tools/call",
"params": {
"name": "core_workflow_list",
"arguments": {
"include_system": false
}
}
}Update an existing workflow definition.
Parameters:
name(string, required) - Name of the workflow to updatesteps(array, required) - Workflow steps (minimum 1 step)args(object, optional) - Workflow arguments definitiondescription(string, optional) - Description of the workflow
Example:
{
"method": "tools/call",
"params": {
"name": "core_workflow_update",
"arguments": {
"name": "deploy-web-service",
"description": "Updated deployment workflow with rollback support",
"steps": [
{
"id": "create_service",
"tool": "core_service_create",
"args": {
"serviceClassName": "web-service",
"name": "{{.service_name}}"
}
}
]
}
}
}Validate workflow configuration without creating it.
Parameters:
name(string, required) - Name of the workflowsteps(array, required) - Workflow steps (minimum 1 step)args(object, optional) - Workflow arguments definitiondescription(string, optional) - Description of the workflow
Example:
{
"method": "tools/call",
"params": {
"name": "core_workflow_validate",
"arguments": {
"name": "test-workflow",
"steps": [
{
"id": "test_step",
"tool": "core_service_list"
}
]
}
}
}All tools follow consistent error handling patterns:
{
"isError": false,
"content": [
{
"type": "text",
"text": "Operation completed successfully"
}
]
}{
"isError": true,
"content": [
{
"type": "text",
"text": "Error: Resource not found"
}
]
}- Validation Errors - Invalid parameters or configuration
- Not Found Errors - Resource does not exist
- Conflict Errors - Resource already exists or conflicts with existing resources
- Dependency Errors - Required dependencies not available
- Timeout Errors - Operation exceeded configured timeout
Currently, Muster operates in a trusted environment without authentication. Future versions may include:
- API key authentication
- Role-based access control (RBAC)
- Service account tokens
- Integration with external identity providers
No rate limiting is currently implemented. Consider implementing appropriate rate limiting for production deployments.
The API follows semantic versioning principles. The current schema version is 1.0.0.
The Muster agent provides powerful interactive capabilities for discovering and executing tools:
# Start the interactive agent
muster agent --repl
# Discover tools
list tools # List all available tools
filter tools core_* # Filter tools by pattern
describe core_service_create # Get detailed tool documentation
# Execute tools
call core_service_list # Execute without arguments
call core_service_create { # Execute with JSON arguments
"serviceClassName": "web-service",
"name": "test-app"
}# List tools via MCP API
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/list", "params": {}}'
# Get tool schema
curl -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-d '{"method": "tools/get_schema", "params": {"name": "core_service_create"}}'- CLI Reference - Command-line interface documentation
- Agent CLI Reference - Interactive agent and REPL usage
- Configuration Reference - Detailed configuration options
- MCP Tools documentation - All the core mcp tools
- CRD reference - Kubernetes Custom Resource definitions
- Getting Started - Setup and basic usage
- How-to Guides - Task-oriented implementation guides
- Workflow Creation Guide - Step-by-step workflow creation
- ServiceClass Patterns - Common ServiceClass patterns