- It is opt-in (no behavior changes unless enabled).
- It is enforced server-side (users can’t bypass it via the UI, slash commands, or manual edits).
- It is loaded at startup and refreshed every 15 minutes.
Enable the policy file
SetMUX_POLICY_FILE to an absolute path on the machine running Mux:
MUX_POLICY_FILE is set but the file can’t be read/parsed/validated, Mux will block startup with an error.
File format
The policy file is strict JSON.- Unknown fields are rejected.
- JSON must be valid (no comments, no trailing commas).
Provider and model access (provider_access)
If provider_access is omitted or an empty array, all providers are allowed.
If provider_access is present, only providers listed there are allowed.
Each entry supports:
id(required): provider ID (matches what you see in Settings → Providers)base_url(optional): if set to a non-empty string, Mux forces that provider base URLmodel_access(optional): list of allowed model IDs
model_access behavior:
- If omitted, all models for that provider are allowed.
- If present but an empty list, all models for that provider are allowed.
- If non-empty, only the listed models are allowed.
Mux Gateway models
The Mux Gateway provider ID ismux-gateway. Gateway model IDs use the form:
anthropic/<modelId>openai/<modelId>google/<modelId>xai/<modelId>
MCP restrictions (tools.allow_user_defined_mcp)
Control whether users can add/edit MCP servers themselves:
stdioapplies to localstdioMCP servers.remoteapplies to remote transports (http,sse, andauto).
allow_user_defined_mcp is omitted, both are allowed.
Runtime restrictions (runtimes)
If runtimes is omitted or an empty array, all runtimes are allowed.
If runtimes is present, only the listed runtime IDs are allowed:
localworktreesshssh+coderdockerdevcontainer
Operational behavior
- The policy is loaded at startup and refreshed every 15 minutes.
- If a refresh fails, Mux keeps the last-known-good policy (it does not fall back to allow-all).
- If the policy changes to disallow the currently selected provider/model/runtime, Mux will block the action (it will not auto-switch).