mdm.toml template contains most fields on this page, commented out, ready to uncomment; the rest are under Additional agent options. For guidance on when to use them, see the overview, Claude Code and Claude Desktop, and Codex.
File format
Pass the file to the binary with--config=/absolute/path/mdm.toml.
- The format follows the file extension:
.jsonis read as JSON,.yamland.ymlare rejected, and anything else is read as TOML. - Unknown keys fail validation, except inside
agents.claude-code.managed_settings, which follows Claude Code’s own schema. - Explicit CLI flags override the matching file values.
- Never put tokens, refresh tokens, or client secrets in the file.
~/.tf/config.toml and from the agents-policy.json file that the binary generates.
Fields
Connection and sign-in
Connection and sign-in
Agents and models
Agents and models
Each
[agents.<id>] table deploys that agent. For the IDs, see Supported agents.How agent tables work:
- A table deploys the agent. At least one agent table is required, and agents are never detected automatically. To stop managing an agent, delete its table.
- Before installation: Claude Code, Codex, Claude Desktop, and agents with managed settings (OpenCode, Qwen Code, Gemini CLI’s managed file, and Grok Build on macOS and Linux) are configured even before they are installed. Agents configured through user settings are configured on the first run after installation.
- Cursor monitoring only: add
[agents.cursor]withmcp_servers = []andskills = [].
MCP servers and Skills
MCP servers and Skills
Custom (non-registry) MCP servers are not applied in MDM rollouts. Register them in the gateway and use their registry names.
Claude Code policy and gateway overrides
Claude Code policy and gateway overrides
For the Claude Code policy, see Set the Claude Code policy. For a Codex template, use the
--codex-settings-file flag. On Windows it applies only to config.toml, not requirements.toml.Claude Desktop
Claude Desktop
All fields are under
agents.claude-desktop.Desktop inference headers use the
--desktop-header flag; a headers key fails validation.Prompt blocking
Prompt blocking
Cursor monitoring
Cursor monitoring
Additional agent options
Additional agent options
These keys go in an agent’s
[agents.<id>] table. Set only the keys an agent supports; others fail validation.headers: extra request headers, as an array of"Name: Value"strings, for example to tag requests in Request Logs.gateway_only(OpenCode):truehides every other provider, so employees can pick only gateway models. Default:false.utility_model(VS Code): the model VS Code uses for background tasks such as titles and summaries."mainAgent"(default) uses the gateway model in use,"copilot"uses GitHub Copilot’s model, and"none"turns these tasks off.api: the API the agent uses to call the gateway. The default, the first value in each row, works for most gateway models. Chooseresponses(openai-responsesin Pi) for OpenAI models that are served only through the Responses API, andmessages(anthropic-messagesin Pi) to call Claude models through the Anthropic Messages API.context_windowandmax_tokens: the context window and the largest reply, in tokens, that the agent assumes. Under MDM, one value applies to every model of that agent, and the defaults are 128000 and 16384; MDM runs do not read each model’s own limits. Set them when your models have a smaller context window than 128000, or when you want longer replies than 16384 tokens.provider_account(Gemini CLI): the gateway’s Gemini provider account. When set, Gemini CLI calls Gemini models through the native Gemini API at<gateway>/gemini/<account>/proxy.insiders(VS Code):trueconfigures VS Code Insiders instead of VS Code. Default:false.
Older file layout
Files written for earlier releases, withurl, tenant, and tools, still work. The binary reads a file in the current layout when it contains control_plane_url; the two layouts cannot be mixed in one file.
CLI flags
Keep routine configuration in the TOML file. Add these flags to the binary’s command in your script when needed:
Prompt blocks stop new submissions, not launching the app, manual edits, or Cursor Tab completions, and native Windows hooks do not cover WSL.
Client version requirements
Older versions ignore the setting, and Codex on Windows falls back to
config.toml, which employees can override.
Files written
Managed files (locked, administrator-only)
Managed files (locked, administrator-only)
The organization policy directory holds
agents-policy.json (configuration, never credentials), agents-state.json, cursor-monitoring.json, and, for prompt blocks, agent-blocking.json with its tfy-agent-blocking.sh or .ps1 script.Employee files
Employee files
The first time the binary edits an existing user file, it keeps the original next to it as a
.bak copy.