Skip to content

Configuration

muxed is configured through a JSON file that defines which MCP servers to connect to and how muxed should behave. The format is intentionally compatible with the mcpServers section of claude_desktop_config.json, so you can reuse your existing config without changes.

muxed looks for configuration in two places:

  • Project-level: muxed.config.json in the project root
  • Global: ~/.config/muxed/config.json

When muxed starts, it resolves configuration in the following order:

  1. Explicit --config <path> flag
  2. muxed.config.json in the current working directory
  3. ~/.config/muxed/config.json (global)
  4. Empty fallback (no servers)

Global config is merged as a base — project config takes precedence for servers with the same name. This lets you define shared servers globally and override or extend them per-project.

muxed supports two types of MCP servers: stdio servers (local processes) and HTTP servers (remote endpoints).

Stdio servers run as local child processes. muxed spawns the command and communicates over stdin/stdout.

{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/projects"],
"env": {},
"cwd": "/optional/working/directory"
}
}
}
FieldDescription
commandThe executable to run
argsArray of command-line arguments
envEnvironment variables to set for the process
cwdOptional working directory for the process

HTTP servers connect to remote MCP endpoints over the network.

{
"mcpServers": {
"remote-api": {
"url": "https://mcp.example.com/mcp",
"transport": "streamable-http",
"headers": { "Authorization": "Bearer ..." },
"sessionId": "optional-existing-session-id",
"reconnection": {
"maxDelay": 30000,
"initialDelay": 1000,
"growFactor": 1.5,
"maxRetries": 2
}
}
}
}
FieldDescription
urlThe HTTP endpoint URL
transportTransport type (e.g., "streamable-http")
headersOptional HTTP headers to include with requests
sessionIdOptional existing session ID to resume
reconnectionOptional reconnection settings (see fields below)
reconnection.maxDelayMaximum delay between reconnection attempts (ms)
reconnection.initialDelayInitial delay before first reconnection attempt (ms)
reconnection.growFactorMultiplier applied to delay after each failed attempt
reconnection.maxRetriesMaximum number of reconnection attempts

HTTP servers can authenticate using OAuth. Add an auth block inside the server configuration.

Use this flow for machine-to-machine authentication where no user interaction is needed.

{
"auth": {
"type": "client_credentials",
"clientId": "...",
"clientSecret": "...",
"scope": "optional-scope"
}
}

Use this flow when user consent is required. muxed will open a browser and listen for the callback on the specified port.

{
"auth": {
"type": "authorization_code",
"clientId": "...",
"clientSecret": "...",
"callbackPort": 8080,
"scope": "optional-scope"
}
}

The daemon block controls how the muxed daemon operates. All fields are optional and have sensible defaults.

{
"daemon": {
"idleTimeout": 300000,
"connectTimeout": 30000,
"requestTimeout": 60000,
"healthCheckInterval": 30000,
"maxRestartAttempts": -1,
"maxTotalTimeout": 300000,
"taskExpiryTimeout": 3600000,
"logLevel": "info",
"shutdownTimeout": 10000,
"http": {
"enabled": false,
"port": 3100,
"host": "127.0.0.1"
}
}
}
FieldTypeDefaultDescription
idleTimeoutnumber300000 (5 min)Shut down daemon after this many ms of inactivity
connectTimeoutnumber30000 (30s)Timeout for connecting to MCP servers
requestTimeoutnumber60000 (60s)Default timeout for tool calls
healthCheckIntervalnumber30000 (30s)Interval for periodic health check pings
maxRestartAttemptsnumber-1 (unlimited)Max auto-restart attempts for crashed servers
maxTotalTimeoutnumber300000 (5 min)Max total wait time for blocking calls
taskExpiryTimeoutnumber3600000 (1 hr)Clean up stale task references after this
logLevelstring”info”Log level: debug, info, warn, error
shutdownTimeoutnumber10000 (10s)Wait for in-flight requests during shutdown
http.enabledbooleanfalseEnable the HTTP JSON-RPC listener
http.portnumber3100HTTP listener port
http.hoststring”127.0.0.1”HTTP listener host

If you already have MCP servers configured in Claude Desktop, you can have muxed automatically merge them in. Set mergeClaudeConfig at the top level of your muxed config:

{
"mergeClaudeConfig": true,
"mcpServers": {
"my-project-server": {
"command": "node",
"args": ["server.js"]
}
}
}

When enabled, servers from your Claude Desktop config serve as a base. Any servers defined in your muxed config take precedence if they share the same name.

muxed provides CLI commands for managing your configuration without editing JSON by hand.

  • muxed init — Auto-discover MCP servers from agent configs and generate a muxed config file.
  • muxed mcp add <name> <command-or-url> [args...] — Add a server to your config.
  • muxed mcp remove <name> — Remove a server from your config.
  • muxed mcp list — List all configured servers.

The config format is intentionally compatible with the mcpServers section of claude_desktop_config.json. If you have an existing Claude Desktop config, you can copy the mcpServers block directly into muxed.config.json and it will work as-is. Alternatively, enable mergeClaudeConfig to pull servers in automatically.