Use Codex With a Background Windows Desktop Over MCP
Register backdesk as a stdio MCP server in the Codex config, then Codex can call backdesk's operations. This was run with Codex CLI 0.172.0 on the test machine: Codex filled and saved the fixture form in 50 s through 17 backdesk calls. The transcript is in bench/results/2026-11-30-codex-cli-form-demo.md.
Why Use It
Codex's own computer use on Windows works on the active desktop, according to the OpenAI documentation: "On Windows, Computer Use runs on the active desktop." It may move the pointer, type and bring a window to the foreground. Source: Codex computer use. backdesk runs apps on a separate hidden desktop and does not touch your pointer or foreground window. See isolation options.
Configure
Codex reads ~/.codex/config.toml, or a project .codex/config.toml in a trusted project. Source: Codex MCP. Add:
[mcp_servers.backdesk]
command = '<path-to>\backdesk.exe'
args = ["mcp"]
Or from a terminal:
codex mcp add backdesk -- <path-to>\backdesk.exe mcp
<path-to> is the folder where you put backdesk.exe (install). A copy of the config is in examples/codex/config.toml.
Allow the Tools
If your Codex config has approval_policy = "never", Codex rejects every backdesk call with "MCP tool call requires approval, but approval policy is never". Pre-approve each agent tool you want:
[mcp_servers.backdesk.tools.session_start]
approval_mode = "approve"
examples/codex/config.toml lists all 19 agent tools. Human-only operations (takeover, handback) are not MCP tools. For a single run you can pass the same settings on the command line: codex exec -c 'mcp_servers.backdesk.tools.observe.approval_mode="approve"' ....
Check It
- Run
backdesk doctorfirst. - Start Codex and list its MCP servers.
backdeskshould be listed. - Ask for a small task in an app you allowed, for example the fixture form on the examples page.
Steps 1 to 3 were run on the test machine with Codex CLI 0.172.0. Codex CLI 0.118.0 could not parse that machine's config; updating the CLI fixed it.
What the Agent Must Do
The agent calls session_start with allowedApps as full paths, takes a lease with lease_acquire, launches the app with app_launch, then uses observe, click, type_text, key and the other operations. Anything not listed in the session spec is denied. See the API page and permissions and privacy.