Skip to content

Configuration reference

Every one of MAGE's 139 settings: what it does, what it's for, its default, and how to set it. Settings go in ~/.config/mage/config.toml (or a project's mage.toml), and most can be changed in the app's Settings page too.

Sections

Where settings live

MAGE reads TOML files in layers. Later layers override earlier ones. Lists such as instructions, skills, disabled_providers and the permission rules add up, and tables such as [mcp], [models] and [provider] merge key by key. Most settings can also be changed in the app's Settings page (ctrl ,), which writes to your own config file.

  • Your config
    ~/.config/mage/config.toml
  • Profile
    profiles/<name>.toml
  • Project
    .mage/config.toml or mage.toml
  • Saved keys & plugins
    credentials.toml
  • Organisation policy
    /etc/mage/policy.toml

Project files

The nearest .mage/config.toml or mage.toml, walking up from the working directory (stopping at your home folder), applies over your own config. A project can't set [shell], [network], [memory_service], [voice] or [desktop], and its hooks don't run until you trust them.

Keys in a password manager

Anywhere MAGE takes a key (provider keys, MCP env and headers, media services), name where the secret lives instead. It's fetched once per run and never written to disk.

# 1Password
[provider.anthropic]
api_key = "op://Work/Anthropic/key"
# Bitwarden
[provider.openai]
api_key = "bw://OpenAI"
# secret-tool or the macOS Keychain; pass://dev/github for pass
[provider.zai]
api_key = "keyring://zai/me"
Environment variables
VariableWhat it does
MAGE_CONFIG_DIRWhere the config lives, instead of ~/.config/mage.
MAGE_DATA_DIRWhere sessions, memory, snapshots and usage live, instead of ~/.local/share/mage.
MAGE_PROFILEThe profile to use; --profile sets it for everything MAGE starts.
MAGE_POLICYThe organisation policy file, instead of the platform's default path.
MAGE_THEMEThe theme, over the Settings choice and the config.
MAGE_LOGLog detail, e.g. debug. Logs go to ~/.local/state/mage/mage.<date>.log.
MAGE_BASE_URLAn OpenAI-compatible server for the custom provider.
MAGE_API_KEYThe key for MAGE_BASE_URL.
MAGE_EDITORThe editor for ctrl-x o (then $VISUAL, then $EDITOR).

Model & agent

top level

Which model MAGE talks to, how hard it thinks, and which agent a session starts in.

model

stringdefault: unset
What it does
The model new sessions start with, written as provider/model, e.g. anthropic/claude-opus-5-5, ollama/qwen3-coder or openrouter/x-ai/grok-4.
What it's for
Pin your everyday model so every window and every mage run starts on it. Put a different one in a project's mage.toml when that project suits another model, or in a profile for work vs. personal use.
How to set it
model = "anthropic/claude-opus-5-5"

Also: Settings → Agent, the model picker (ctrl-x m, f2 cycles recent ones), /models, or -m provider/model on the command line.

effort

stringdefault: unset (the model's own)
What it does
The default reasoning effort: default, minimal, low, medium, high, xhigh or max. MAGE sends it the way each provider expects: adaptive thinking with output_config.effort on Claude 4.6 and later, a thinking budget on older Claude, reasoning_effort on OpenAI-style APIs and reasoning.effort on OpenRouter.
What it's for
Higher effort helps on hard debugging and design work; lower effort is faster and cheaper for routine edits.
How to set it
effort = "high"

Also: Settings → Agent, ctrl-t (cycle), ctrl-x e (picker), /effort [level], or -e on the command line.

agent

stringdefault: build
What it does
The agent a session starts in. Build has every tool; Plan is read-only, for exploring and planning without changing anything.
What it's for
Start in Plan when you mostly ask questions or review code, so nothing changes until you switch to Build.
How to set it
agent = "plan"

Also: tab / shift-tab in the prompt, Settings → Agent, or -a plan with mage run.

max_tokens

integerdefault: unset (the model's limit)
What it does
Caps the output tokens of each response. MAGE also shrinks the limit it asks for when the prompt leaves less room than that in the context window.
What it's for
Keep runaway answers short and costs predictable, especially on models with very large output limits.
How to set it
max_tokens = 16000

fallback

list of stringsdefault: []
What it does
Models to carry a turn on with when the chosen one fails for good (after its retries: an outage, overload, a quota, a bad key). The transcript notes the switch and the next turn starts on your chosen model again. A request refused for its content (HTTP 400 or 422) doesn't switch, since another model wouldn't fare better.
What it's for
Keep long or unattended runs going through a provider outage.
How to set it
fallback = ["anthropic/claude-sonnet-5-5", "zai/glm-5.4"]

explorer_model

stringdefault: a smaller model from the same provider
What it does
The model for the explore subagent and for your own agents whose file says model: small. Session titles and the /goal judge use it too. By default it's the provider's small, fast model (Haiku for Claude, a mini or flash model elsewhere). subagent_model is the old name and still works.
What it's for
Codebase searches don't need your biggest model. Point this at a cheap, fast one to save money and time on every exploration.
How to set it
explorer_model = "anthropic/claude-haiku-5-5"

Also: Settings → Agent → Explorer model.

disabled_providers

list of stringsdefault: []
What it does
Built-in provider ids to hide from the provider list and model pickers. Lists from every config layer add up.
What it's for
Declutter the pickers, or keep a project from accidentally using a provider. For a hard, organisation-wide limit use the policy's providers instead.
How to set it
disabled_providers = ["groq", "together"]

auto_title

booleandefault: true
What it does
Has a model name each new session as soon as you send the first prompt: the provider's small model (or your explorer_model), otherwise the session's own. Until then the title is the start of the prompt. A title you set with /rename is never replaced. Headless runs don't name sessions.
What it's for
Turn it off to save the extra request, or if you'd rather titles stay as the first words of your prompt.
How to set it
auto_title = false

How the window looks and behaves when it opens, and the optional web UI and kanban.

theme

stringdefault: dark
What it does
The interface theme: dark, light, or the name of a theme file in ~/.config/mage/themes/ (see Themes). The MAGE_THEME environment variable wins over everything, then the choice made in Settings, then this.
What it's for
Pick light for bright rooms, or make your own palette.
How to set it
theme = "light"

Also: Settings → Appearance (the choice is remembered), or MAGE_THEME=light.

reopen_tabs

booleandefault: false
What it does
Makes a plain launch reopen the tabs that were open when you last quit, instead of the start screen with your five most recent sessions.
What it's for
Pick up exactly where you left off every morning.
How to set it
reopen_tabs = true

desktop_integration

booleandefault: true
What it does
On Linux, installs MAGE's icon (and, unless a package already provides one, a mage.desktop entry) under ~/.local/share at startup. Linux desktops find a window's icon through its desktop entry, which a downloaded or self-built binary doesn't have.
What it's for
Turn it off if you manage desktop entries yourself, or don't want MAGE writing to ~/.local/share.
How to set it
desktop_integration = false

update_check

booleandefault: true
What it does
When the window opens, asks GitHub whether a newer release is out (reusing the answer for an hour) and, if one is, shows an Update available button with a download arrow beside the window buttons. Nothing is downloaded until you click it: a Linux binary or AppImage then updates itself, verifying the signed SHA256SUMS like mage update, and offers Restart to update. Nix, macOS, Windows and development builds open the release page instead.
What it's for
Hear about new releases without checking by hand. Turn it off to never ask GitHub. Air-gapped builds never check.
How to set it
update_check = false

Also: Settings → Appearance → Check for updates; mage update check checks once from the command line.

muse_contributor_mode

booleandefault: false
What it does
Lets Meta train on what the muse provider (your own Muse Code CLI) is sent, in return for more usage from your Muse Code plan (Muse Code's Contributor mode). MAGE turns Contributor mode off for its sessions unless this is set.
What it's for
A coding session sends your project's code, and Meta's terms say not to send confidential code in Contributor mode. Set it only for code you're happy to share.
How to set it
muse_contributor_mode = true

web_ui

booleandefault: false
What it does
Serves MAGE's web UI while the window is open, on this machine only. The page lists the project's sessions, shows transcripts and runs turns, with approvals and questions as cards. Only the link opens it: it carries a random token, new each start, that becomes an HttpOnly, SameSite=Strict cookie.
What it's for
Use MAGE from a phone or another room. To reach it from elsewhere, use an SSH tunnel, or mage serve --tls-cert … --tls-key … to serve HTTPS.
How to set it
web_ui = true

Also: Settings → Access → Web UI; /web copies the link; mage serve runs it without the window.

web_ui_port

integerdefault: 7420
What it does
The port the web UI listens on.
What it's for
Change it when 7420 is taken, or to run several profiles' web UIs side by side.
How to set it
web_ui_port = 8000

Also: mage serve --port 8000.

kanban_server

string (URL)default: unset (this computer's boards)
What it does
A shared kanban server (mage kanban serve running elsewhere) that the window's kanban and the agents' kanban tool use instead of this computer's own boards.
What it's for
Share boards between several MAGE instances or a whole team, with single sign-on and GitHub, GitLab or Jira sync.
How to set it
kanban_server = "https://kanban.example.com"

Also: Settings → Appearance → Kanban boards → A server; This computer switches back.

How MAGE keeps long sessions inside the model's context window and keeps the prompt cache paying off. At 60% of the window, old tool output is trimmed. At 80%, the conversation is summarized and carries on from the summary (/compact does that by hand). If a provider refuses a prompt that no longer fits, MAGE compacts and tries again once.

compact_at

number (0–1)default: 0.8
What it does
Summarizes the conversation once it fills this share of the model's context window, and carries on from the summary.
What it's for
Lower it if the model gets less sharp near the end of its window; raise it to keep more verbatim history.
How to set it
compact_at = 0.75

Also: /compact compacts now.

trim_at

number (0–1)default: 0.6
What it does
Starts trimming old tool output at this share of the context window: all but the most recent results become a one-line note, while the calls themselves stay, so the model knows what it ran and can run it again. Trimming happens in batches so the prompt cache is rewritten once per batch, not every turn.
What it's for
Long sessions full of file reads and test output stay small and cheap. Set it at or above compact_at to turn trimming off.
How to set it
trim_at = 0.6

trim_keep

integerdefault: 6
What it does
How many recent tool results trimming leaves whole.
What it's for
Raise it when the model needs to look back further at what it read.
How to set it
trim_keep = 10

trim_output

booleandefault: true
What it does
Trims long, noisy shell output before the model sees it. Progress bars and repeated lines collapse and build chatter goes. Every error, warning and failure stays with a few lines of context, plus the summary at the end. The full output is saved, and the note says where.
What it's for
A noisy build no longer fills the context. Turn it off if a tool's exact output matters line by line.
How to set it
trim_output = false

server_compaction

booleandefault: false
What it does
On Claude through Anthropic's own API, lets Claude write the compaction summary itself, as a signed block it reads back exactly (beta). If it fails, MAGE falls back to its own summary.
What it's for
Summaries Claude wrote for itself can carry more of what matters.
How to set it
server_compaction = true

Also: Settings → Agent.

clear_tool_results

booleandefault: false
What it does
On Claude through Anthropic's own API, lets the server drop old tool results once the prompt passes half the window, keeping the six most recent (context editing, beta). Each clear costs one prompt-cache rewrite.
What it's for
An alternative to MAGE's own trimming, done server-side.
How to set it
clear_tool_results = true

Also: Settings → Agent.

cache_warm_minutes

integer (minutes)default: unset (off)
What it does
After each turn, a session that sits idle sends a tiny keep-alive request (the same prompt, tools and history, asking for a one-word reply) every 4½ minutes, for up to this many minutes. Each costs a cached read of the history plus a few tokens, and shows in /usage.
What it's for
Providers keep a prompt cached for about five minutes. After a longer pause, the next message pays full price for the whole history. If you often pause to read or test, keeping the cache warm is cheaper.
How to set it
cache_warm_minutes = 30

What MAGE knows before you say anything, and what it learns as you work. Instruction files go into the system prompt in this order: the global ~/.config/mage/AGENTS.md (or ~/.claude/CLAUDE.md), then AGENTS.md in each directory from the project root down (falling back to CLAUDE.md), then the files listed in instructions.

instructions

list of pathsdefault: []
What it does
Extra instruction files added to the system prompt after the AGENTS.md files (~/ allowed). Lists from every config layer add up.
What it's for
Share a house style guide, review checklist or team conventions across projects without copying them into every repository.
How to set it
instructions = ["~/notes/house-style.md", "docs/agent-rules.md"]

skills

list of pathsdefault: []
What it does
Extra folders to look for skills in: folders with a SKILL.md (frontmatter name and description). They're added to the usual places: .mage/skills, .claude/skills and .agents/skills up to the project root, and ~/.config/mage/skills, ~/.claude/skills and ~/.agents/skills.
What it's for
Point MAGE at a shared or team skills repository.
How to set it
skills = ["~/shared-skills"]

Also: mage skills lists what was found; ctrl-x k opens the skills picker.

memory

booleandefault: true
What it does
Project memory: the remember, recall and forget tools, and relevant memories (pinned ones plus the best matches) sent with each message. The system prompt doesn't change, so the prompt cache keeps working. Memories never cross projects, except preferences saved as global, and anything that looks like a credential is refused.
What it's for
MAGE keeps your corrections, the project's quirks and past decisions between sessions. Turn it off for throwaway or sensitive work.
How to set it
memory = false

Also: The Memory panel (/memory, Settings → Project); /remember <text>; /export-memory writes .mage/MEMORY.md.

learning

booleandefault: true
What it does
After a turn, a background review of the conversation may save memories and create or patch skills. It reuses the turn's prompt so the cache covers it. Your next message stops it, and its cost counts toward the session. Memories or skills that try to steer later sessions (overriding instructions, hiding things, piping downloads into a shell, reaching for credentials) are refused. Headless runs skip it unless you pass --learn.
What it's for
MAGE gets better at your project the more you use it. Turn it off to save the extra requests.
How to set it
learning = false

Also: New skills wait for review in the Memory panel; /learn turns the session into a skill now.

learning_memory_turns

integerdefault: 10
What it does
Runs a memory review after this many of your turns without a memory being saved (counted per session, across restarts).
What it's for
Lower it to learn more eagerly; raise it to review less often.
How to set it
learning_memory_turns = 5

learning_skill_steps

integerdefault: 10
What it does
Runs a skill review after this many model requests without a skill written.
What it's for
Tune how often MAGE looks for workflows worth saving as skills.
How to set it
learning_skill_steps = 20

skill_archive_days

integer (days)default: 30
What it does
Moves skills MAGE created itself into .archive beside them when nobody has used them (loaded by the model or run as /name) for this many days. 0 keeps them forever. Discovery skips the archive; move a skill back to restore it.
What it's for
Keeps learned skills from piling up.
How to set it
skill_archive_days = 0

goal_max_turns

integerdefault: 10
What it does
How many turns a goal (/goal <objective> or mage run --goal) may take before it stops. After each turn a judge reads the goal and the turn and decides whether it's done, what to do next, or whether only you can unblock it.
What it's for
Raise it for big, multi-step objectives; lower it to cap spend.
How to set it
goal_max_turns = 25

Also: Settings → Agent.

Subagents

top level

The model hands self-contained jobs to subagents with the task tool. Each starts with a fresh context, its own tools and model, and returns one report, so the main conversation stays small. Several run at once, can message each other, and survive restarts.

max_parallel_agents

integerdefault: 15
What it does
How many subagents may work at once; more queue. Each nesting level has its own slots.
What it's for
Lower it to stay under a provider's rate limit or concurrency cap; raise it for big fan-out jobs.
How to set it
max_parallel_agents = 4

max_agent_depth

integerdefault: 2
What it does
How deep subagents may nest. 1 means only the main agent starts them; 2 lets those start their own.
What it's for
Limit runaway delegation, or allow deeper team structures.
How to set it
max_agent_depth = 1

subagent_max_steps

integerdefault: 60
What it does
How many model requests a subagent may make before it has to stop and report.
What it's for
A safety net against a subagent that loops; raise it for long, autonomous jobs.
How to set it
subagent_max_steps = 120

background_wait_secs

integer (seconds)default: 600
What it does
When a headless run's turn ends with subagents still working, how long it waits for them and carries on with their results instead of exiting with work in flight.
What it's for
Give long-running background agents more time in CI, or less to fail fast.
How to set it
background_wait_secs = 1800

wake_on_background

booleandefault: true
What it does
When the session is idle and a subagent finishes or asks something, the window starts a turn so the main agent can act on it.
What it's for
Turn it off if you'd rather read reports yourself before the agent carries on.
How to set it
wake_on_background = false

Tools

top level

How MAGE's built-in tools behave: web search, the browser, formatting, language servers, undo snapshots, MCP tool loading, and image and video generation.

searxng_url

string (URL)default: unset
What it does
A SearXNG server for websearch. The server must have JSON output (format=json) enabled.
What it's for
Self-hosted, keyless search that doesn't leave your network.
How to set it
searxng_url = "http://localhost:8888"

browser_path

string (path)default: the first Chrome, Chromium, Brave or Edge found
What it does
The browser the browser tool starts, headless, with a profile of its own in MAGE's data folder. The model opens pages, reads them as text with labelled controls, clicks, types, takes screenshots, reads the console and network log, and runs JavaScript.
What it's for
Point MAGE at a browser installed somewhere it doesn't look.
How to set it
browser_path = "/usr/bin/chromium"

browser_attach

string (URL)default: unset
What it does
Uses a browser that's already running with remote debugging instead of starting one.
What it's for
Let the model work in a browser you can watch, or one already signed in to your dev environment. Start it with --remote-debugging-port=9222.
How to set it
browser_attach = "http://127.0.0.1:9222"

formatter

boolean or tabledefault: true
What it does
Formats files after the model edits, writes or patches them, with the formatter the project already uses: rustfmt, gofmt, prettier or biome, ruff or black, clang-format or shfmt. A file is formatted only if it was formatted before the change, or is new, so a one-line edit never rewrites a whole unformatted file. false turns it off; a table sets your own command per file extension, with {file} for the path.
What it's for
Keeps the model's edits in the project's style without a separate formatting step.
How to set it
formatter = { rs = "cargo fmt -- {file}", py = "ruff format {file}" }

lsp

booleandefault: true
What it does
Starts the matching language server when it's installed (rust-analyzer, typescript-language-server, pyright, gopls, clangd), in the sandbox. After every edit the server's errors for that file go straight to the model, which also gets definition, references, hover and rename_symbol.
What it's for
The model notices its mistakes without running the build. Turn it off on machines where language servers are too heavy.
How to set it
lsp = false

Also: The sidebar shows each server's status, with an install link for missing ones.

lsp_wait_ms

integer (milliseconds)default: 3000
What it does
How long to wait for a language server's diagnostics after an edit.
What it's for
Raise it for slow servers on big projects so errors aren't missed; lower it for snappier edits.
How to set it
lsp_wait_ms = 8000

checkpoints

booleandefault: true
What it does
Snapshots the project's files before and after each turn, in a private git store under MAGE's data folder that respects .gitignore and never touches your .git. That's what /undo, /redo, rewinding to any message and /diff restore from. Restoring never overwrites a file you changed after MAGE did. It needs git on PATH.
What it's for
Undo anything the agent did, including shell commands. Turn it off only on huge trees where snapshots are too slow.
How to set it
checkpoints = false

Also: /undo (ctrl-x u), /redo (ctrl-x r), /diff (ctrl-x d).

mcp_on_demand

booleandefault: unset (on when there are more than 30 MCP tools)
What it does
Offers MCP tools through an mcp_search tool instead of sending every schema up front. What the model finds is loaded for the rest of the session. true always does this; false always sends them all.
What it's for
Many MCP servers can fill the context with tool schemas before you've asked anything.
How to set it
mcp_on_demand = true

image_model

stringdefault: the first image service with a key
What it does
The service and model for generate_image, as <service>/<model>: OpenAI (gpt-image-1), xAI, Google (Imagen), fal, Replicate, Black Forest Labs or MiniMax. Images are saved, shown in the transcript and shown to the model so it can check its work. It asks first, since it costs money.
What it's for
Pick the image service you have credits with, or the one whose style suits you.
How to set it
image_model = "openai/gpt-image-1"

Also: allow = ["generate_image"] stops it asking.

video_model

stringdefault: the first video service with a key
What it does
The service and model for generate_video: OpenAI (Sora), Google (Veo), fal, Replicate, Luma, Runway, MiniMax (Hailuo) or Alibaba (Wan). Clips play in the chat with sound, and playing needs ffmpeg.
What it's for
Choose which video service the model uses.
How to set it
video_model = "google/veo-3.0-generate-001"

Every tool call is checked before it runs, and the runtime decides, not the model. Reading the project runs. Edits in the project run. Anything outside the project asks, secrets are refused for the file tools, and shell commands are checked part by part. Rules use Claude Code's syntax, and deny always wins, even in YOLO mode. The allow, ask, deny and sandbox_writable lists add up across config layers; the other keys override.

allow

list of rulesdefault: []
What it does
Tool calls that run without asking, in Claude Code's rule syntax: Bash(npm run *), Edit(src/**), WebFetch(domain:docs.rs), an MCP server (mcp__github) or a tool name (generate_image).
What it's for
Stop being asked about commands you always approve.
How to set it
[permissions]
allow = ["Bash(npm run *)", "Edit(src/**)", "mcp__github", "WebFetch(domain:docs.rs)"]

Also: Press a on an approval card to allow it for the session, or A to save the rule to the project's .mage/config.toml.

ask

list of rulesdefault: []
What it does
Tool calls that always ask, even when they'd otherwise run.
What it's for
Keep a human on commits, deploys or anything with consequences.
How to set it
[permissions]
ask = ["Bash(git commit *)", "Bash(make deploy*)"]

deny

list of rulesdefault: []
What it does
Tool calls that never run. Deny wins over every other rule and mode, including YOLO. In an organisation policy, deny rules can't be undone by anyone.
What it's for
Hard limits: no force pushes, no reading a private folder.
How to set it
[permissions]
deny = ["Bash(git push --force*)", "Read(~/private/**)"]

edits

stringdefault: allow
What it does
Whether file edits inside the project run (allow) or ask first (ask).
What it's for
Set ask to approve every change yourself. For hunk-by-hunk review, use Review edits mode (/review-edits) instead.
How to set it
[permissions]
edits = "ask"

Also: Settings → Permissions. Modes in Settings → Agent: Normal, Accept edits, Review edits, YOLO.

bash

stringdefault: ask
What it does
What happens with shell commands that aren't on the built-in safe list (ls, rg, git status, cargo test, …) or your rules. With the sandbox on, they run anyway, confined to the sandbox. allow lets them run without asking when there's no sandbox, too. Commands MAGE knows are dangerous (rm -rf, git push, sudo, curl, …) ask by default.
What it's for
Set allow in trusted, disposable environments such as CI containers.
How to set it
[permissions]
bash = "allow"

Also: Settings → Permissions.

webfetch

stringdefault: allow
What it does
Whether webfetch (and opening pages in the browser tool) runs (allow) or asks first (ask).
What it's for
Ask before every fetch when working with sensitive code or untrusted prompts.
How to set it
[permissions]
webfetch = "ask"

Also: Settings → Permissions.

sandbox

booleandefault: true
What it does
Runs shell commands in a sandbox. They can write only to the project, /tmp and package caches; the rest of the system is read-only, and ~/.ssh, ~/.aws, ~/.gnupg, cloud credentials and MAGE's keys can't be read. On Linux it uses Landlock (kernel 5.13+), or bubblewrap on older kernels. macOS uses sandbox-exec, and Windows runs commands at low integrity, which is weaker. If no sandbox works, commands outside the safe list ask.
What it's for
Because the sandbox confines them, unknown commands don't need to ask. Turn it off only in containers without user namespaces.
How to set it
[permissions]
sandbox = true

Also: Settings → Sandbox (remembered); mage run --sandbox off. Strict builds and require_sandbox policies force it on.

sandbox_network

booleandefault: true
What it does
Whether sandboxed commands may reach the network. It's allowed by default so builds can fetch dependencies. On Windows, which can't block a program's network without administrator rights, blocking it means commands aren't sandboxed and ask first.
What it's for
Block it for untrusted repositories, so code the model runs can't send anything out.
How to set it
[permissions]
sandbox_network = false

Also: Settings → Sandbox (remembered).

sandbox_writable

list of pathsdefault: []
What it does
Extra paths sandboxed commands may write to. The project, /tmp and package caches (~/.cargo/registry, ~/.cargo/git, ~/.cache, ~/.npm, ~/go/pkg/mod, ~/.local/share/pnpm) always are.
What it's for
Let builds write to a shared output folder or a cache MAGE doesn't know about.
How to set it
[permissions]
sandbox_writable = ["~/.gradle", "/srv/build-cache"]

Providers

[provider.<id>]

Settings for a model provider, keyed by id. An id that matches a built-in provider (anthropic, openai, bedrock, …) overrides its fields; a new id adds a provider, such as your own vLLM box. The easiest way to connect one is the Providers dialog (ctrl-, → Providers, or /connect), which saves keys to ~/.config/mage/credentials.toml (mode 600) and the rest here. Environment variables work too: see the provider table.

Built-in providers, their ids and credentials
ProvideridCredentials (environment)
AnthropicanthropicANTHROPIC_API_KEY (or ANTHROPIC_AUTH_TOKEN), optional ANTHROPIC_BASE_URL
Amazon Bedrock (Claude)bedrockAWS_BEARER_TOKEN_BEDROCK, an AWS profile (AWS_PROFILE; static keys or SSO), or AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY; AWS_REGION
Google Vertex AI (Claude)vertexGOOGLE_CLOUD_PROJECT, CLOUD_ML_REGION (default global); token from GOOGLE_OAUTH_ACCESS_TOKEN or gcloud
Microsoft Foundry (Claude)foundryANTHROPIC_FOUNDRY_API_KEY, ANTHROPIC_FOUNDRY_RESOURCE (or ANTHROPIC_FOUNDRY_BASE_URL)
OpenAIopenaiOPENAI_API_KEY, optional OPENAI_BASE_URL
Azure OpenAIazureAZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_DEPLOYMENTS
Google GeminigoogleGEMINI_API_KEY or GOOGLE_API_KEY
OpenRouter, Groq, xAI, Mistral, Together, Fireworksopenrouter, groq, xai, mistral, together, fireworks<NAME>_API_KEY
Qwen (Alibaba Cloud Model Studio)qwenDASHSCOPE_API_KEY
Kimi (Moonshot AI)kimiMOONSHOT_API_KEY
Z.ai / Zhipu (GLM)zaiZAI_API_KEY (or ZHIPUAI_API_KEY)
MiniMaxminimaxMINIMAX_API_KEY
DeepSeekdeepseekDEEPSEEK_API_KEY
Ollama, LM Studioollama, lmstudionone; used when the server answers on its default port (OLLAMA_HOST to change)
Any OpenAI-compatible servercustomMAGE_BASE_URL (e.g. http://gpu-box:8000/v1), optional MAGE_API_KEY
# A self-hosted vLLM server, as a new provider
[provider.gpu]
kind = "openai"
name = "GPU box (vLLM)"
base_url = "http://10.0.0.5:8000/v1"
api_key_env = ["GPU_BOX_KEY"]
models = ["Qwen/Qwen3-Coder-480B"]
reasoning = "none"

# Change one field of a built-in provider
[provider.bedrock]
region = "eu-west-1"

kind

stringdefault: the built-in's, or required for a new id
What it does
Which API the provider speaks: openai (chat completions, or Responses), anthropic (Messages), bedrock, vertex or azure.
What it's for
Required for a provider you add yourself; most self-hosted servers are openai.
How to set it
[provider.gpu]
kind = "openai"

name

stringdefault: the id
What it does
The display name in the provider list and pickers.
What it's for
Tell your own servers apart at a glance.
How to set it
[provider.gpu]
name = "GPU box (vLLM)"

base_url

string (URL)default: the provider's own
What it does
The API endpoint.
What it's for
Point at a self-hosted server, a proxy or gateway (LiteLLM), a regional endpoint, or a coding plan's URL (for example Z.ai's https://api.z.ai/api/coding/paas/v4).
How to set it
[provider.gpu]
base_url = "http://10.0.0.5:8000/v1"

Also: Providers dialog (Region buttons for the Chinese clouds and coding plans).

api_key

stringdefault: unset
What it does
The key itself, or a password-manager reference (op://, bw://, pass://, keyring://). Prefer api_key_env or a reference over writing the key down.
What it's for
Keys saved from the Providers dialog land in credentials.toml, not here.
How to set it
[provider.anthropic]
api_key = "op://Work/Anthropic/credential"

Also: Providers dialog.

api_key_env

list of stringsdefault: the built-in's variables
What it does
Environment variables to read the key from. The first one that's set wins, and every one that's set is used in turn when a key hits its rate limit.
What it's for
Keep keys out of config files; works well in CI.
How to set it
[provider.gpu]
api_key_env = ["GPU_BOX_KEY"]

api_keys

list of stringsdefault: []
What it does
More keys, used in turn with api_key. A request moves to the next key as soon as one hits its rate limit or quota, instead of waiting.
What it's for
Spread heavy use (many subagents, batch runs) over several keys or accounts.
How to set it
[provider.openai]
api_keys = ["sk-…first", "sk-…second"]

auth

stringdefault: bearer
What it does
How the key is sent: bearer (Authorization: Bearer), x-api-key, api-key (Azure style), google or none.
What it's for
Match whatever your gateway or server expects.
How to set it
[provider.gateway]
auth = "x-api-key"

headers

tabledefault: {}
What it does
Extra HTTP headers sent with every request.
What it's for
Gateways that need a tenant id, tracing headers, or OpenRouter's app attribution.
How to set it
[provider.gateway]
headers = { "X-Team" = "platform" }

query

tabledefault: {}
What it does
Extra query-string parameters added to every request URL.
What it's for
Servers that take an api-version or similar on the URL.
How to set it
[provider.azure]
query = { "api-version" = "2025-04-01-preview" }

models

list of stringsdefault: the built-in list
What it does
Models offered in the picker. OpenAI-compatible servers also list their own.
What it's for
Name the models on a server that doesn't list them, or trim a long list to the ones you use.
How to set it
[provider.gpu]
models = ["Qwen/Qwen3-Coder-480B"]

Also: mage models lists every usable model.

discover

booleandefault: on for OpenAI-compatible servers
What it does
Asks the server for its model list (GET /models).
What it's for
Turn it off for servers that don't implement the endpoint, or list too many models.
How to set it
[provider.gpu]
discover = false

reasoning

stringdefault: the built-in's
What it does
How reasoning effort is sent: effort (reasoning_effort), nested (reasoning.effort) or none.
What it's for
Self-hosted servers often reject effort fields; set none for those.
How to set it
[provider.gpu]
reasoning = "none"

region

stringdefault: from AWS_REGION / CLOUD_ML_REGION
What it does
The region for Amazon Bedrock or Google Vertex AI (Vertex defaults to global).
What it's for
Use the region your account has model access in, or keep data in one place.
How to set it
[provider.bedrock]
region = "eu-west-1"

Also: Providers dialog.

project

stringdefault: from GOOGLE_CLOUD_PROJECT
What it does
The Google Cloud project for Vertex AI.
What it's for
Bill Vertex usage to the right project.
How to set it
[provider.vertex]
project = "my-gcp-project"

Also: Providers dialog (with a Sign in button that runs gcloud auth login).

profile

stringdefault: from AWS_PROFILE
What it does
The AWS profile in ~/.aws for Bedrock, with static keys or SSO.
What it's for
Use the same profile as the rest of your AWS tooling.
How to set it
[provider.bedrock]
profile = "dev-sso"

Also: Providers dialog (with Sign in for aws sso login --profile …).

sigv4_service

stringdefault: Bedrock's own
What it does
The AWS SigV4 service name requests are signed for.
What it's for
Only needed behind an AWS gateway that signs for a different service.
How to set it
[provider.bedrock]
sigv4_service = "bedrock"

replay_reasoning

booleandefault: on where required (DeepSeek, Kimi)
What it does
Sends earlier reasoning back as reasoning_content on each assistant turn, which thinking-mode DeepSeek and Kimi require.
What it's for
Turn it on for a self-hosted model served with the same requirement.
How to set it
[provider.gpu]
replay_reasoning = true

extra_body

tabledefault: {}
What it does
Extra top-level fields merged into every request body.
What it's for
Server-specific switches MAGE doesn't know about.
How to set it
[provider.minimax]
extra_body = { reasoning_split = true }

max_output_tokens

integerdefault: 64000 for local servers; none sent for hosted APIs
What it does
Sends max_tokens, capped at this many output tokens.
What it's for
Small local models can get stuck generating; a lower cap stops them sooner.
How to set it
[provider.custom]
max_output_tokens = 1536

local

booleandefault: true for Ollama and LM Studio
What it does
Marks a local server: it's shown only when it answers.
What it's for
A laptop server that's often off doesn't clutter the pickers.
How to set it
[provider.llamacpp]
local = true

responses

booleandefault: on for GPT-5 and Codex on api.openai.com
What it does
Talks to the server's Responses API (/responses) instead of chat completions. Encrypted reasoning comes back each turn (MAGE keeps the conversation; OpenAI doesn't store it), and apply_patch is a grammar-checked tool.
What it's for
Set false to force chat completions, or true for another server that speaks Responses.
How to set it
[provider.openai]
responses = false

Per-model overrides

[models."provider/model"]

Facts and sampling settings for one model, keyed by its full provider/model name. MAGE knows these for popular models; set them for a model it doesn't know, or to change what it sends. Prices are US dollars per million tokens.

context

integer (tokens)default: built-in table
What it does
The model's context window size.
What it's for
Trimming and compaction work from this, so set it for any model MAGE doesn't know.
How to set it
[models."gpu/Qwen/Qwen3-Coder-480B"]
context = 131072

max_output

integer (tokens)default: built-in table
What it does
The most output tokens the model can produce in one response.
What it's for
Lets MAGE ask for the right amount of room.
How to set it
[models."gpu/Qwen/Qwen3-Coder-480B"]
max_output = 32768

input_price

number ($ / M tokens)default: built-in table
What it does
The price of input tokens, for cost tracking in the sidebar, /stats, mage usage and --max-cost.
What it's for
Track spend on models MAGE has no price for, or your negotiated rates.
How to set it
[models."openrouter/x-ai/grok-4"]
input_price = 3.0

output_price

number ($ / M tokens)default: built-in table
What it does
The price of output tokens.
What it's for
As above.
How to set it
[models."openrouter/x-ai/grok-4"]
output_price = 15.0

cache_read_price

number ($ / M tokens)default: a tenth of the input price
What it does
The price of reading cached input.
What it's for
For providers whose cache discount isn't the usual 90%.
How to set it
[models."openrouter/x-ai/grok-4"]
cache_read_price = 0.75

cache_write_price

number ($ / M tokens)default: 1.25× the input price
What it does
The price of writing the cache.
What it's for
For providers that charge differently (or nothing) for cache writes.
How to set it
[models."openrouter/x-ai/grok-4"]
cache_write_price = 3.0

temperature

numberdefault: what the model's makers recommend, or nothing
What it does
The sampling temperature to send. MAGE sends recommended values where makers publish them (Qwen 0.55, Gemini 1.0, Kimi 0.6, …). Models that refuse sampling settings never get one, even yours: Claude from Opus 4.7 on, gpt-5 and the o-series.
What it's for
Tune creativity vs. determinism for open-weight models.
How to set it
[models."zai/glm-5.4"]
temperature = 0.7

top_p

numberdefault: as recommended, or nothing
What it does
Nucleus sampling (top_p) to send.
What it's for
As above.
How to set it
[models."zai/glm-5.4"]
top_p = 0.9

top_k

integerdefault: unset
What it does
Top-k sampling to send, where the API takes it.
What it's for
Common with local and open-weight servers.
How to set it
[models."ollama/qwen3-coder"]
top_k = 40

MCP servers

[mcp.<name>]

Model Context Protocol servers, keyed by name. Their tools reach the Build agent as mcp__<server>__<tool> (Plan doesn't get them, since they may change things), their resources are @server:uri mentions, and their prompts are /server:prompt commands. Claude Code's .mcp.json files are read too. ${VAR} and ${VAR:-default} expand in commands, arguments, URLs, environment and headers. mage mcp checks every server and exits 1 if one fails, so it works in CI.

command

stringdefault: unset
What it does
The program to start for a local server, which MAGE talks to over stdio.
What it's for
Most MCP servers are distributed as an npx, uvx or binary command.
How to set it
[mcp.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]

Also: /extensions installs popular ones; /mcp shows status and reconnects.

args

list of stringsdefault: []
What it does
Arguments for command.
How to set it
[mcp.fs]
command = "mcp-server-filesystem"
args = ["/srv/docs"]

env

tabledefault: {}
What it does
Environment variables for the server process. Values may be password-manager references.
What it's for
Hand the server its token without putting it on the command line.
How to set it
[mcp.github]
env = { GITHUB_PERSONAL_ACCESS_TOKEN = "${GITHUB_TOKEN}" }

cwd

string (path)default: the project
What it does
The working directory to start the server in.
What it's for
For servers that read config from their own folder.
How to set it
[mcp.tools]
cwd = "~/mcp/tools"

url

string (URL)default: unset
What it does
A remote server over Streamable HTTP. Servers that need a login show needs sign-in: press Enter on one in /mcp or run mage mcp login <server> to sign in through your browser (OAuth with PKCE and dynamic client registration). Tokens are kept in credentials.toml and refreshed automatically.
What it's for
Hosted MCP servers: docs, issue trackers, SaaS tools.
How to set it
[mcp.docs]
url = "https://mcp.example.com/mcp"

Also: mage mcp login|logout <server>.

headers

tabledefault: {}
What it does
HTTP headers for a remote server.
What it's for
Servers that take a static token instead of OAuth.
How to set it
[mcp.docs]
headers = { Authorization = "Bearer ${DOCS_TOKEN}" }

enabled

booleandefault: true
What it does
Set false to keep a server configured but not connected.
What it's for
Switch servers off without deleting their settings.
How to set it
[mcp.old]
enabled = false

timeout

integer (seconds)default: 120
What it does
How long one tool call may take.
What it's for
Raise it for servers that run long jobs.
How to set it
[mcp.docs]
timeout = 300

type

stringdefault: inferred
What it does
The transport, as .mcp.json spells it: stdio, http or sse. Usually inferred from command or url.
What it's for
Needed only for SSE servers, or when copying from .mcp.json.
How to set it
[mcp.legacy]
type = "sse"
url = "https://legacy.example.com/sse"

Hooks

[[hooks.<Event>]]

Commands that run at points in a turn, in Claude Code's format and contract, so existing hook scripts work unchanged. Each hook gets the event as JSON on stdin. Exit 0 continues; exit 2 blocks with stderr as the reason; anything else is a warning. A JSON answer on stdout can allow, deny or ask, rewrite the tool input, add context, or end the turn. When several answer, the strictest wins. Hooks from a project's config don't run until you trust them (mage hooks trust, or Settings → Project).

Session events

SessionStartSessionEndCwdChangedInstructionsLoaded

Turn events

UserPromptSubmitStopStopFailurePreCompactPostCompact

Tools events

PreToolUsePostToolUsePostToolUseFailure

Permissions events

PermissionRequestPermissionDeniedNotification

Subagents events

SubagentStartSubagentStopTaskCreatedTaskCompleted

matcher

string (regex)default: every tool
What it does
For tool events, a regular expression on the tool name, using Claude Code's names (Bash, Edit, Write, …).
What it's for
Run a hook only for the tools it cares about.
How to set it
[[hooks.PostToolUse]]
matcher = "Edit|Write"
command = "cargo fmt"

Also: mage hooks lists every hook.

command

stringdefault: unset
What it does
A shell command to run: the short form for a single command hook.
How to set it
[[hooks.UserPromptSubmit]]
command = "jq -r .prompt >> ~/.mage-prompts.log"

timeout

integer (seconds)default: 60 (up to 600)
What it does
How long a hook may run. Hooks for one event run in parallel.
What it's for
Give slow checks (a test run, a policy service) more time.
How to set it
[[hooks.Stop]]
command = "./scripts/verify.sh"
timeout = 300

hooks

list of hook entriesdefault: []
What it does
The long form: several hooks for one matcher. Each entry has a type: command (default), http (POSTs the event to url with headers and reads the reply), prompt (the session's model judges the event against your prompt) or mcp_tool (calls tool on MCP server with the event as arguments.input). Any entry may take timeout, if (a permission rule the tool call must match, e.g. Bash(git push *)) and async = true (run without waiting).
What it's for
Mix local scripts, audit webhooks and model-judged guards on one event.
How to set it
[[hooks.PreToolUse]]
matcher = "Bash"
hooks = [
  { type = "command", command = "./scripts/check-command.sh", timeout = 10 },
  { type = "prompt", prompt = "Block anything that deletes files outside the project.", if = "Bash(rm *)" },
  { type = "http", url = "https://audit.example.com/hook", async = true },
]

Shell commands can run in a container or on another machine instead of this one. The model is told where its commands run, the sidebar shows it, and permission rules apply as before; the container or other machine takes the place of the sandbox. Containers run as you, so the files commands make are yours.

Read from your own ~/.config/mage/config.toml (or a profile) only. A project's .mage/config.toml can't set it, so a repository you open can't redirect your commands, memories or devices.

backend

stringdefault: local
What it does
local (this machine, sandboxed), docker or podman (a container), ssh (another machine) or modal (a Modal container or sandbox; not in builds without cloud).
What it's for
Run builds in the project's real toolchain image, on a big build box, or on a GPU.
How to set it
[shell]
backend = "docker"

image

stringdefault: unset
What it does
Docker/Podman: run each command in a fresh container from this image, with the project mounted at the same path. Modal: the image for a fresh container.
What it's for
Reproducible, throwaway environments per command.
How to set it
[shell]
backend = "docker"
image = "rust:1.100"

container

stringdefault: unset
What it does
Docker/Podman: run commands in this already-running container instead of a fresh one.
What it's for
Use a long-lived dev container with its caches warm.
How to set it
[shell]
backend = "docker"
container = "dev"

runtime

stringdefault: docker
What it does
The container program to run.
What it's for
Use podman (or another Docker-compatible CLI) with the docker backend.
How to set it
[shell]
backend = "docker"
runtime = "podman"

network

booleandefault: network on
What it does
Docker/Podman: whether the container gets network access.
What it's for
Cut untrusted code off from the network entirely.
How to set it
[shell]
network = false

host

stringdefault: unset
What it does
SSH: where commands run, as user@host. Commands run in the remote copy of the project; the file tools still work on this machine's copy, so keep them in step with a shared filesystem or a sync tool.
What it's for
Offload builds and tests to a more powerful machine.
How to set it
[shell]
backend = "ssh"
host = "me@build-box"

remote_dir

string (path)default: the same path
What it does
SSH and Modal: where the project's copy lives on the other side.
What it's for
When the remote checkout lives at a different path.
How to set it
[shell]
remote_dir = "/srv/app"

sandbox

stringdefault: unset
What it does
Modal: run commands in this running sandbox, where changes stay. Without it, each command gets a fresh container from image with a copy of the project uploaded to /mnt/<folder>, and its changes are thrown away.
What it's for
Keep state between commands on Modal.
How to set it
[shell]
backend = "modal"
sandbox = "sb-abc123"
remote_dir = "/work"

gpu

stringdefault: unset
What it does
Modal: the GPU to attach to fresh containers.
What it's for
Train, fine-tune or run GPU tests from your laptop.
How to set it
[shell]
backend = "modal"
image = "python:3.13"
gpu = "a10g"

volumes

list of stringsdefault: []
What it does
Modal: volumes mounted at /mnt/<name>.
What it's for
Datasets and caches that persist between commands.
How to set it
[shell]
volumes = ["data"]

upload

booleandefault: true
What it does
Modal: whether to upload the project with each command. Large build folders are uploaded too.
What it's for
Set false, with volumes or remote_dir, to work from a Modal volume instead.
How to set it
[shell]
upload = false

Where MAGE's traffic, and that of the commands it runs, may go. MAGE's own requests use it, and so do commands, MCP servers and git, through HTTPS_PROXY and HTTP_PROXY. Programs that ignore those variables aren't held back, so keep the sandbox's network off for those. Local addresses never go through a proxy. An organisation policy's [network] limits everyone.

Read from your own config or the organisation policy only, never a project's, which could loosen it.

proxy

string (URL)default: unset
What it does
Sends MAGE's traffic through this proxy.
What it's for
Corporate networks that require an outbound proxy.
How to set it
[network]
proxy = "http://proxy.corp:3128"

allow

list of hostsdefault: [] (no filter)
What it does
Lets MAGE reach only these hosts. MAGE runs a small filtering proxy on localhost that passes the listed hosts (on to proxy, when set) and refuses the rest, with a note saying which host was blocked. *.example.com covers the domain and its subdomains. If the filter can't start, network access is off.
What it's for
Egress control: only your model provider and code host, nothing else.
How to set it
[network]
allow = ["api.anthropic.com", "*.github.com"]

With two or more models set, the model gets a mixture tool: it asks them all the same question at once, and an aggregator weighs their answers into one, with each answer under it. The other models can't see the project or use tools, so the question carries what they need.

models

list of stringsdefault: []
What it does
The models to ask, as provider/model.
What it's for
A second opinion on hard design choices, a tricky bug's cause, or a plan.
How to set it
[mixture]
models = ["anthropic/claude-opus-5-5", "openai/gpt-5.2", "google/gemini-3-pro"]

Also: Each model's requests show under its own name in /stats.

aggregator

stringdefault: the session's model
What it does
The model that weighs the answers into one.
What it's for
Use your strongest model to judge.
How to set it
[mixture]
aggregator = "anthropic/claude-opus-5-5"

Searches a folder of your markdown notes, and runs Python for arithmetic with the numbers written down first. It's built for small local models, which do better with one search tool that returns the right passage than with grep and glob. The notes tools are offered only when dir is set.

dir

string (path)default: unset (tools off)
What it does
The notes folder to search (relative to the project, or ~/…). Each note is split into sections on its headings, and every section keeps the note's title and opening paragraph.
What it's for
A personal assistant over your own notes, running fully local.
How to set it
[notes]
dir = "~/notes"

embed_url

string (URL)default: unset (keyword search)
What it does
An OpenAI-compatible server with /v1/embeddings. With it, search ranks by meaning as well as keywords (BM25) and merges the two. Embeddings are cached in the data directory, so only new or changed sections are embedded again.
What it's for
Find notes that say the same thing in different words.
How to set it
[notes]
embed_url = "http://localhost:8091"

k

integerdefault: 5
What it does
How many passages each search returns.
What it's for
More context for bigger models; fewer for small ones.
How to set it
[notes]
k = 8

assistant

booleandefault: false
What it does
Replaces MAGE's coding-agent system prompt with a short one for answering from notes, memory and Python.
What it's for
A few thousand tokens of coding guidance cost a small model accuracy on questions about your own life.
How to set it
[notes]
assistant = true

Outside memory service

[memory_service]

Uses mem0, Zep or Honcho alongside MAGE's own memory, which stays the record. Whatever remember saves is also sent to the service. Before each request, what the service finds (within a few seconds) goes to the model, marked as the service's, and recall searches it too. These services are memory across everything you do, not one project. Builds without cloud leave them out.

Read from your own ~/.config/mage/config.toml (or a profile) only. A project's .mage/config.toml can't set it, so a repository you open can't redirect your commands, memories or devices.

kind

stringdefault: unset (off)
What it does
The service: mem0, zep or honcho.
What it's for
Share memory between MAGE and other tools that use the same service.
How to set it
[memory_service]
kind = "mem0"

api_key

stringdefault: unset
What it does
The key, or a password-manager reference.
How to set it
[memory_service]
api_key = "op://Private/mem0/key"

api_key_env

stringdefault: unset
What it does
The environment variable holding the key.
How to set it
[memory_service]
api_key_env = "MEM0_API_KEY"

user

stringdefault: unset
What it does
Whose memory: the mem0 user or Honcho peer (Zep makes one once).
How to set it
[memory_service]
user = "me"

workspace

stringdefault: unset
What it does
Honcho: the workspace.
How to set it
[memory_service]
kind = "honcho"
workspace = "mage"

base_url

string (URL)default: the service's own
What it does
A self-hosted server.
What it's for
Keep memories on your own infrastructure.
How to set it
[memory_service]
base_url = "https://mem0.internal.example.com"

Voice

[voice]

Talk to MAGE and have it answer aloud. ctrl-x v dictates into the prompt; /voice on is a hands-free assistant with a wake word; Speak replies in Settings reads every answer aloud. Sound goes through ffmpeg and ffplay. The wake word only ever listens locally, with whisper.cpp, so nothing leaves the machine until it's heard. Code in an answer isn't read out.

Read from your own ~/.config/mage/config.toml (or a profile) only. A project's .mage/config.toml can't set it, so a repository you open can't redirect your commands, memories or devices.

listen

stringdefault: whisper when whisper_model is set (or in builds without cloud), else openai
What it does
How speech becomes text: whisper (whisper.cpp on this machine) or openai (OpenAI's transcription, with your OpenAI key).
What it's for
Keep dictation fully local, or use the cloud for accuracy without downloading models.
How to set it
[voice]
listen = "whisper"

speak

stringdefault: say on macOS; openai in builds with cloud; else espeak
What it does
How answers are read aloud: openai, piper, espeak, say (macOS) or off.
What it's for
Piper sounds natural and runs locally.
How to set it
[voice]
speak = "piper"

Also: Settings → Voice → Speak replies.

whisper_model

string (path)default: unset
What it does
The whisper.cpp model for local speech to text.
How to set it
[voice]
whisper_model = "~/models/ggml-base.en.bin"

wake_model

string (path)default: unset
What it does
A small, quick whisper.cpp model used only to listen for the wake word.
What it's for
Keeps always-on listening light on CPU.
How to set it
[voice]
wake_model = "~/models/ggml-tiny.en.bin"

wake_word

stringdefault: hey mage
What it does
The phrase that starts the hands-free assistant listening.
How to set it
[voice]
wake_word = "hey mage"

Also: /voice on, /voice off.

voice

stringdefault: the speaker's default
What it does
The voice: a Piper model file, or an OpenAI or espeak voice name.
How to set it
[voice]
voice = "~/voices/en_US-amy-medium.onnx"

input

stringdefault: the system default
What it does
The microphone, as ffmpeg's format:device.
What it's for
Pick a specific microphone (Windows: dshow:audio=Microphone).
How to set it
[voice]
input = "pulse:default"

language

stringdefault: unset (detected)
What it does
The spoken language, as a code like en.
What it's for
Faster, more accurate transcription when it doesn't have to guess.
How to set it
[voice]
language = "en"

Lets the model look at your screen and use the mouse and keyboard, for apps and dialogs no other tool reaches. Every screenshot, click and keypress asks first, unless a rule allows desktop or you're in YOLO mode. Screenshots reach the model scaled to fit 1280×800.

Read from your own ~/.config/mage/config.toml (or a profile) only. A project's .mage/config.toml can't set it, so a repository you open can't redirect your commands, memories or devices.

enabled

booleandefault: false
What it does
Gives the model the desktop tool.
What it's for
Drive GUI apps, installers or anything without an API.
How to set it
[desktop]
enabled = true

backend

stringdefault: this session's
What it does
x11 (xdotool with maim or ImageMagick), wayland (grim or spectacle with ydotool), macos (screencapture and cliclick) or windows (PowerShell).
What it's for
Override detection, e.g. for XWayland.
How to set it
[desktop]
backend = "wayland"

Profiles

profiles/<name>.toml

A profile is a set of settings with its own sessions, memory and usage, for keeping work and personal use (or two clients) apart. ~/.config/mage/profiles/work.toml holds any config.toml settings, applied over your main config and under a project's. Start it with mage --profile work or MAGE_PROFILE=work. The window title shows it, and whatever MAGE starts (scheduled jobs, web UI turns) runs in it too.

Only meaningful in a profile file.

shared_data

booleandefault: false
What it does
Makes the profile use the main sessions, memory and usage instead of its own data folder (profiles/<name> inside MAGE's data directory).
What it's for
A profile that only changes settings (say, a different model and provider) but shares your history.
How to set it
# ~/.config/mage/profiles/fast.toml
model = "groq/llama-4-maverick"
shared_data = true

An administrator can put a policy in /etc/mage/policy.toml (/Library/Application Support/mage/policy.toml on macOS, %ProgramData%\mage\policy.toml on Windows, or $MAGE_POLICY). It applies over every other setting. Its settings win, its [permissions] deny rules can't be undone, its [network] limits traffic, and [policy] turns things off. A policy that doesn't parse turns off everything it could limit.

Only in the policy file.

providers

list of stringsdefault: [] (all allowed)
What it does
The only model providers anyone may use.
What it's for
Keep code going only to approved vendors.
How to set it
[policy]
providers = ["anthropic", "bedrock"]

disable

list of stringsdefault: []
What it does
Tools and groups to turn off: tool names (e.g. execute) and the groups yolo, web_ui, browser, plugins (installing plugins and extensions), mcp, media (image and video generation), schedule and web (fetching and searching). What's off isn't offered to the model, and is refused with the policy's message if asked for anyway.
What it's for
Remove capabilities your organisation doesn't allow.
How to set it
[policy]
disable = ["yolo", "web_ui", "plugins", "media"]

require_sandbox

booleandefault: false
What it does
Shell commands are always sandboxed; nobody can turn the sandbox off.
What it's for
Guarantee commands are confined on every machine.
How to set it
[policy]
require_sandbox = true

message

stringdefault: unset
What it does
Shown whenever something is refused because of the policy.
What it's for
Tell people who to ask.
How to set it
[policy]
message = "Ask #it-help to change these."

Themes

themes/<name>.toml

A theme of your own is a file in ~/.config/mage/themes/<name>.toml: a base (dark or light) and the colors you want different, as hex strings. It shows up in Settings → Appearance next to the built-ins, and theme = "<name>" picks it. An unknown color name gets the list back. These are the colors, with the dark theme's values (which this site uses too):

# ~/.config/mage/themes/forest.toml
base = "dark"
bg = "#0F1A14"
prompt_bg = "#1E3328"
primary = "#7CE0A3"

bg

#15121E · Window background

raised

#1F182C · Panels and cards

raised_high

#2B243D · Hovered and higher panels

raised_max

#312A43 · The highest surfaces

prompt_bg

#2B243D · The prompt box

text

#E8E6F2 · Body text

text_soft

#D7CCF4 · Softer text

muted

#A29EC0 · Hints and secondary text

border

#312A43 · Borders

primary

#C4A9FF · Accent, headers

secondary

#9ED3FF · Second accent

selected_bg

#4C3F73 · Selection and buttons

error

#FF6B6B · Errors

warning

#FFB74D · Warnings

success

#3DDC84 · Success

md_heading

#C4A9FF · Markdown headings

md_code

#A4F0C1 · Inline code

md_strong

#FFCF8E · Bold text

md_emphasis

#BCA8FF · Italic text

md_link

#9ED3FF · Links

md_list

#957FD1 · List markers

diff_added

#3DDC84 · Added lines

diff_removed

#FF6B6B · Removed lines

diff_context

#957FD1 · Diff context

diff_added_bg

#1A2A2A · Added line background

diff_removed_bg

#2E1A2A · Removed line background

chip

#623DA6 · Chips and badges

on_chip

#E8E6F2 · Text on chips

backdrop

#080B12 · Behind dialogs

sub_header

#957FD1 · Sub-headers

Keybindings

keybindings.toml

~/.config/mage/keybindings.toml rebinds or unbinds any key, by action name (as in the help list: CommandPalette, CopyLast, OpenEditor, …). "none" unbinds; a table limits a binding to a context.

"ctrl-y" = "CopyLast"
"ctrl-x h" = "none"                                    # unbind
"space" = { action = "ApproveOnce", context = "Approval" }

A complete example

A realistic personal config, with a project file next to it.

~/.config/mage/config.toml

model = "anthropic/claude-opus-5-5"
effort = "high"
explorer_model = "anthropic/claude-haiku-5-5"
fallback = ["openai/gpt-5.2"]
instructions = ["~/notes/house-style.md"]
update_check = true
cache_warm_minutes = 20

[permissions]
allow = ["Bash(npm run *)", "WebFetch(domain:docs.rs)"]
deny  = ["Bash(git push --force*)"]

[provider.ollama]
local = true

[mcp.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
env = { GITHUB_PERSONAL_ACCESS_TOKEN = "pass://dev/github" }

[network]
allow = ["api.anthropic.com", "api.openai.com", "*.github.com"]

my-project/.mage/config.toml

# Settings for everyone working on this repository
agent = "build"
instructions = ["docs/agent-rules.md"]
formatter = { rs = "cargo fmt -- {file}" }

[permissions]
allow = ["Bash(cargo test *)", "Bash(cargo clippy *)"]
ask   = ["Bash(cargo publish*)"]

[[hooks.PostToolUse]]
matcher = "Edit|Write"
command = "./scripts/lint-changed.sh"

[models."ollama/qwen3-coder"]
context = 131072

Something missing or out of date? MAGE's settings are defined in src/config.rs. Open an issue or send a pull request.