Looking for the easiest setup? See AI Agent Quick Start which uses
muster standalonefor single-command integration.
This advanced guide walks you through setting up Muster with separate server and agent processes for production environments. This approach provides visible logs, supports multiple MCP clients, and is ideal for complex deployments.
Use this guide when you need:
- Visible server logs for debugging
- Multiple IDE/MCP clients connecting to one server
- Production deployment patterns
- Environment-specific configurations
For simple IDE integration, use muster standalone instead.
Critical Concept: Before setting up AI integration, understand Muster's meta-tools interface:
- Exposes: 11 meta-tools (
list_tools,call_tool, etc.) as the only interface - Contains: 36 core tools + external MCP tools (accessed via
call_tool) - Purpose: Business logic, tool execution, service management
- Role: Transport bridge (stdio ↔ HTTP/SSE) + OAuth handling
- Purpose: Enable non-OAuth MCP clients to connect to authenticated servers
- Note: OAuth-capable clients can connect directly to the server
Your AI agent uses meta-tools from the server to access all functionality.
- OS: Linux, macOS, or Windows
- Go: Version 1.21 or later
- IDE: VSCode, Cursor, or another MCP-compatible environment
- Network: Ability to run local processes
- Basic JSON configuration
- How to configure extensions in your IDE
- Basic command-line usage
- Understanding of Muster's two-layer architecture
# Clone the repo
git clone https://github.com/giantswarm/muster.git
cd muster
# Build and install
go install
# Verify installation
muster versionMuster uses a configuration directory at .muster/ by default:
# Create the config directory (optional - created automatically)
mkdir -p .muster/{mcpservers,serviceclasses,workflows}
# Start Muster server (keep this running)
muster serveNote: Keep this terminal open - the server needs to stay running for the agent to connect.
You can add MCP servers to extend muster's capabilities:
# .muster/mcpservers/filesystem.yaml
apiVersion: muster.giantswarm.io/v1alpha1
kind: MCPServer
metadata:
name: filesystem-tools
namespace: default
spec:
description: "File system operations for development"
toolPrefix: "fs"
type: stdio
autoStart: true
command: ["npx", "@modelcontextprotocol/server-filesystem", "/workspace"]
env:
DEBUG: "1"# Test interactive mode
muster agent --repl
# In the REPL, try meta-tools:
list tools # Discover all available tools
call core_config_get {} # Execute core tools
call core_service_list {} # Execute service tools
call core_mcpserver_list {} # Execute MCP server toolsConfigure MCP extension Add this to your VSCode settings:
{
"mcpServers": {
"muster": {
"command": "muster",
"args": ["agent", "--mcp-server"]
}
}
}Add Muster as MCP server
{
"mcpServers": {
"muster": {
"command": "muster",
"args": ["agent", "--mcp-server"]
}
}
}For other tools that support MCP, use the same configuration pattern:
{
"mcpServers": {
"muster": {
"command": "muster",
"args": ["agent", "--mcp-server"],
"description": "Muster unified tool interface"
}
}
}Once configured, your AI agent will have access to 11 meta-tools from the server that provide access to all Muster functionality:
Tool Discovery:
list_tools- Discover all available toolsdescribe_tool- Get detailed information about any toolfilter_tools- Filter tools by name patterns or descriptionslist_core_tools- List built-in Muster tools specifically
Tool Execution:
call_tool- Execute any tool by name
Resource Access:
list_resources- List available resourcesget_resource- Retrieve resource contentdescribe_resource- Get resource details
Prompt Access:
list_prompts- List available promptsget_prompt- Execute prompt templatesdescribe_prompt- Get prompt details
When your AI agent uses call_tool, it can execute any of the 36+ aggregator tools:
Configuration Management (5 tools):
core_config_get- Get complete system configurationcore_config_get_aggregator- Get aggregator-specific settingscore_config_update_aggregator- Modify aggregator configurationcore_config_save- Persist configuration changescore_config_reload- Reload from configuration files
Service Management (9 tools):
core_service_list- List all services (static and ServiceClass-based)core_service_create- Create service instances from ServiceClassescore_service_get- Get detailed service informationcore_service_start/stop/restart- Control service lifecyclecore_service_status- Monitor service healthcore_service_delete- Remove ServiceClass instancescore_service_validate- Validate service configurations
ServiceClass Management (7 tools):
core_serviceclass_list- List available service templatescore_serviceclass_create- Define new service typescore_serviceclass_get- Get ServiceClass detailscore_serviceclass_available- Check template dependenciescore_serviceclass_update- Modify existing templatescore_serviceclass_delete- Remove templatescore_serviceclass_validate- Validate template configurations
Workflow Orchestration (9 tools):
core_workflow_list- List available workflowscore_workflow_create- Define multi-step processescore_workflow_get- Get workflow detailscore_workflow_available- Check workflow dependenciescore_workflow_update/delete- Modify or remove workflowscore_workflow_validate- Validate workflow configurationscore_workflow_execution_list- View execution historycore_workflow_execution_get- Get execution detailsworkflow_<name>- Execute specific workflows (auto-generated)
MCP Server Management (6 tools):
core_mcpserver_list- List external tool providerscore_mcpserver_create- Add new MCP serverscore_mcpserver_get- Get server detailscore_mcpserver_update/delete- Modify or remove serverscore_mcpserver_validate- Validate server configurations
External Tools (Variable):
- Tools from configured MCP servers (e.g.,
x_kubernetes_*,x_teleport_*)
Your AI agent can now help you with infrastructure tasks using the correct two-layer pattern:
"Show me the current system configuration"
AI executes: call core_config_get {}"Create a Kubernetes connection service"
AI executes: call core_service_create {
"serviceClassName": "service-k8s-connection",
"name": "my-k8s-conn",
"args": {"cluster_name": "prod", "role": "management"}
}"List all running services"
AI executes: call core_service_list {}"Execute the authentication workflow"
AI executes: call workflow_auth-workflow {
"cluster": "my-cluster",
"profile": "default"
})"Check workflow execution history"
AI executes: call core_workflow_execution_list {
"workflow_name": "auth-workflow"
}"Discover available tools"
AI executes: list tools"Filter tools for service management"
AI executes: filter tools workflow_*When connecting to a remote Muster Server that requires authentication, the agent handles OAuth 2.1 automatically.
- Connection Attempt: The agent tries to connect to the Muster Server
- 401 Detection: If the server requires authentication, it returns a 401 with OAuth metadata
- Pending Auth State: The agent exposes a synthetic
authenticate_mustertool - User Authentication: Call
authenticate_musterto get an auth URL, then sign in via browser - Automatic Upgrade: After sign-in, the agent connects and exposes all real tools
- SSO Chain: The agent automatically authenticates with remote MCP servers (disable with
--disable-auto-sso)
{
"mcpServers": {
"muster": {
"command": "muster",
"args": ["agent", "--mcp-server", "--endpoint=https://muster.example.com/mcp"]
}
}
}When you first connect:
- Your AI assistant will see the
authenticate_mustertool - Call it to receive an authentication URL
- Open the URL in your browser and sign in
- The agent automatically reconnects and exposes all tools
By default, the agent automatically authenticates with remote MCP servers after you sign in to the main Muster Server. This leverages Single Sign-On (SSO) since remote servers typically share the same Identity Provider (Dex).
What happens (default behavior):
- You sign in once via
authenticate_muster - The agent detects remote servers needing auth (e.g.,
authenticate_github,authenticate_gitlab) - Browser tabs open automatically for each remote server
- SSO redirects complete authentication without additional login prompts
- A summary shows how many servers were authenticated
To disable automatic SSO:
{
"mcpServers": {
"muster": {
"command": "muster",
"args": ["agent", "--mcp-server", "--disable-auto-sso", "--endpoint=https://muster.example.com/mcp"]
}
}
}With --disable-auto-sso: Remote servers remain unauthenticated until you explicitly call their authenticate_* tools. This gives you full control over when browser tabs open.
Note: The agent opens browser tabs with a 2-second delay between each to allow SSO redirects to complete. If browser pop-ups are blocked, the agent will display the URLs for manual authentication.
OAuth tokens are stored securely on your local filesystem:
- Location:
~/.config/muster/tokens/ - File permissions:
0600(owner read/write only) - Directory permissions:
0700(owner access only) - Format: JSON files with hashed server URL as filename
Subsequent connections reuse existing valid tokens, so you only need to authenticate once per server until the token expires.
Security Considerations:
- Tokens contain sensitive credentials - treat this directory like SSH keys
- To revoke access:
rm -rf ~/.config/muster/tokens/ - For shared machines: ensure proper user isolation
- Tokens have a 60-second expiry buffer to handle network latency
The Muster Agent uses a Client ID Metadata Document (CIMD) hosted on GitHub Pages for OAuth client identification:
- Client ID:
https://giantswarm.github.io/muster/muster-agent.json - Redirect URI:
http://localhost:3000/callback
For self-hosted Muster deployments, ensure your IdP trusts this client ID.
- Ensure
muster serveis running - Check that the agent can connect:
muster agent --repl - Verify IDE MCP extension is properly installed
- Check if MCP servers are running: Ask agent to run
call core_mcpserver_list {}) - Verify tool availability by testing meta-tools: Ask agent to run
list_tools() - Check aggregator status: Ask agent to run
call core_service_status {"name": "mcp-aggregator"})
- Check configuration directory:
.muster/ - Verify YAML syntax in configuration files
- Check muster logs for error messages
- Test configuration: Ask agent to run
call core_config_get {})
- Token expired: Clear tokens with
rm -rf ~/.config/muster/tokens/and re-authenticate - Callback not received: Ensure port 3000 is available and no firewall blocks localhost
- Client not registered: For self-hosted servers, verify the CIMD client ID is trusted by your IdP
- Wrong issuer: Check that the server's WWW-Authenticate header points to your IdP
- Browser pop-ups blocked: Some browsers block automatic tab opening. The agent will display URLs for manual authentication if this happens
- SSO not working: Ensure all remote MCP servers use the same IdP (Dex) as the Muster Server
- Too many tabs opening: This is expected behavior. Use
--disable-auto-ssoif you prefer manual control - Partial authentication: Check the agent logs for which servers failed. You can manually call their
authenticate_*tools
- Explore meta-tools: Use
muster agent --replto try all 11 server meta-tools - Create ServiceClasses: Define templates in
.muster/serviceclasses/ - Build workflows: Automate processes in
.muster/workflows/ - Add MCP servers: Integrate external tools in
.muster/mcpservers/
Based on your .muster setup, you can try:
- ServiceClasses:
service-k8s-connection,mimir-port-forward - Workflows:
auth-workflow,login-workload-cluster,connect-monitoring - MCP Servers:
kubernetes,prometheus,grafana,teleport
Remember these patterns when working with AI agents:
# ✅ Correct: How AI agents work with Muster (via server meta-tools)
list_tools() # Discover tools
call_tool(name="core_service_list", arguments={}) # Execute tools
filter_tools(pattern="workflow_*") # Filter tools
# ❌ Wrong: These tools don't exist at the MCP interface level
core_service_list() # Must use call_tool
workflow_auth-workflow() # Must use call_toolThis architecture enables:
- Unified access to all tool types (core, workflow, external)
- Dynamic discovery of available capabilities
- Session-scoped visibility based on authentication state
- OAuth-capable clients can connect directly to the server
For comprehensive examples, see the test scenarios in internal/testing/scenarios/.