Repository navigation
Open
Labels
Description
Self-hosted Desktop Commander MCP endpoint (Worker front door, Access-gated, laptop bridge)
Build a self-hosted replacement for the vendor's metered Remote Desktop Commander relay, following the fleet's existing Worker patterns (atlas-search Worker, id-mail publish/promote).
Shape
- Worker
desktop-commanderinpkgs/desktop-commander/worker/(atlas-search worker layout:wrangler.toml+cloudflare.config.ts+src/): a transparent streamable-HTTP MCP proxy.workers_devoff — the only door is the Access-gated custom hostname. - Deploys: Cloudflare version deployments with the
cfbinary (cf workers versions create), driven by GitHub Actions publish + promote workflows modeled onid-mail-worker-publish.yml/id-mail-worker-promote.yml(upload version with provenance artifact; promote the verified upload to 100%). - Public door:
commander.security.cab— Cloudflare Access app (self-hosted, 24h session) with (1) an Allow policy for the owner's Google identity via the existing Google IdP (client saved under Google sign-in for pm.security.cab: create the OAuth client (hands: interactive login) #12417, wiring under fix(pm-stack): the console is the gate for the whole public hostname #12412) and (2) a service-token policy for machine MCP clients that can send Access headers. - Bridge door:
commander-link.security.cab— Access app, service-token-only (the atlas-search pattern), token held by the Worker as version secrets. Ingress added to the existing sandbox-link tunnel ->http://localhost:8931on amd. - Laptop bridge: the packaged Desktop Commander (
pkgs/desktop-commander, stdio) wrapped by supergateway in streamable-HTTP mode on127.0.0.1:8931, run as a systemd user service; the service definition is added to the Nix home config in the same change so it survives rebuilds. - Secrets: by name only, in fleet secrets / GitHub environment secrets; values never in the repo or logs. New names:
cloudflare.access.desktop-commander-client-id/-client-secret(bridge door), a public-door client token pair, and a dedicated deploy tokencloudflare.api-token-desktop-commander-worker.
Acceptance
POST https://commander.security.cab/mcpwith the public-door service token completes an MCPinitialize+tools/listagainst the real Desktop Commander on amd.- The same URL without credentials is stopped by Access (login wall / 401).
- A publish run uploads a new Worker version without promoting it; a promote run moves exactly that version to 100%.
- mcpx on the laptop consumes the endpoint as a remote server (first verified client).
- The vendor device agent (
desktop-commander-remote.service) is left running until this endpoint is verified, then stood down as a separate recorded step.
Non-goals
- No use of the vendor's hosted relay or its pairing.
- No changes to the local stdio Desktop Commander wiring in mcpx (that path stays as-is).
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-23T15:31:25Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": null,
"model": null,
"lane_start_issues": [],
"workspace_ref": null,
"auth_subject": "archer",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Activity
developing-today commentedon Nov 23, 2026
CODE-4883
Merge pull request #13427 from developing-today/feat/desktop-commande…
Merge pull request #13443 from developing-today/fix/dc-worker-dev-ser…
Merge pull request #13447 from developing-today/fix/dc-worker-first-p…
Merge pull request #13453 from developing-today/fix/dc-worker-tag-res…
Merge pull request #13473 from developing-today/fix/dc-promote-worker…
dezren39 commentedon Nov 23, 2026
Build complete — endpoint live, pipeline proven end to end
The self-hosted Desktop Commander endpoint is live at
https://commander.security.cab/mcpand the full delivery pipeline has now run green end to end:a2bbae9bserves version37e2f6a3.Chain: client → Access (owner Google identity, or the public service token) → Worker
desktop-commander(refuses anything without an Access assertion; swaps caller material for its egress token) → Access service-token-only bridge door → sandbox-link tunnel → supergateway bridge on the laptop → packaged Desktop Commander 0.2.52. Real tool calls (initialize, tools/list, list_directory) verified through the whole chain before the pipeline proof.Fixes landed on the way: PR #13427 (the build), #13443 (wrangler dev-server declaration the cf versions flow requires), #13447 (first-publish baseline: a missing Worker reads as no baseline, not an error), #13453 (uploaded version resolved by its unique tag — versions-create stdout is a human panel in this cf build; plus the recorded operator promotion of run 45216887574's genuine orphaned version), #13473 (
versions getneeds--worker-id).Secrets live only in Bitwarden, by name:
cloudflare.access.desktop-commander-link-client-id/-client-secret(Worker egress),cloudflare.access.desktop-commander-client-id/-client-secret(public door clients),cloudflare.api-token-desktop-commander-worker(scoped deploy token: Workers Scripts Write + Tail Read). The sandbox build copies were shredded after the build.Remaining, deliberately separate steps (this issue stays open for them):
desktop-commander-remote.servicestill runs as the fallback until the self-hosted door has soaked; standing it down is its own recorded step.Merge pull request #13488 from developing-today/feat/dc-oauth-13404
dezren39 commentedon Nov 23, 2026
OAuth front door — built, deployed, verified
Hosted MCP clients (Claude, ChatGPT) connect server-side and could not pass the Cloudflare Access login at the public door: every path on commander.security.cab answered them with a 302 to the Access login, and there was no OAuth discovery to find. The Worker now runs an OAuth 2.1 authorization server, and the Access app moved to guard only the approval page.
Code — PR #13488, merged
4421467c3776. Newsrc/oauth.ts:/.well-known/oauth-protected-resource(both shapes) and/.well-known/oauth-authorization-server.POST /register— dynamic client registration (RFC 7591), public clients (token_endpoint_auth_method: "none"), https / loopback-http redirect URIs; clients stored in the new KV namespacedesktop-commander-oauth(ea675d3c…) underclient:<id>.GET/POST /authorize— the approval page. The Worker verifies the Access JWT itself (RS256 against the team JWKS, the app audience, owner email) before rendering; approval is a CSRF-nonce form POST to the same path issuing a single-use, PKCE-bound code (10 min).POST /token— authorization-code exchange (PKCE S256; the code is consumed on any exchange attempt) issuing an opaque access token (1 h) plus a rotating refresh token (30 d). Codes and tokens are stored in KV under their SHA-256 (code:/at:/rt:)./mcpaccepts a live OAuth Bearer or the machine bearer (constant-time compare); anything else gets 401 with theresource_metadatapointer. Bridge door and proxy core unchanged./healthzpublic as before; everything else 404.Access restructure (applied via API, in place) — the public app
c84b6ade…was re-scoped from the whole hostname tocommander.security.cab/authorize; its service-token policy was removed (the public service token8430d758…still exists but is no longer accepted at this door — the machine bearer replaces it for the owner's tooling); the owner-email policy is the only one left; the app audience is unchanged (c6ddf0a5…), which is what the Worker verifies asACCESS_AUD. The bridge-door app (commander-link) was not touched.Secrets — machine bearer generated on the laptop, stored in Bitwarden Secrets Manager as
desktop-commander.machine-bearer, set as the GitHub environment secretMACHINE_BEARERondesktop-commander-production, and staged into the version secrets file by the publish workflow (PR #13488). Values never printed or committed.Deploy — publish run 45224460919 (success, head
4421467c), promote run 45224874110 (success). Active deployment3cd1134d, versionffcc823a.External verification (from the sandbox, no credentials):
GET /mcp→ 401 withWWW-Authenticate: Bearer resource_metadata="https://commander.security.cab/.well-known/oauth-protected-resource"(not a 302).GET /authorize(no creds) → 302 to the Access login — the approval page is still behind the owner's sign-in./register→ 201; an authorization code seeded in KV in exactly the record shape/authorizewrites →/tokenexchange 200; code reuse → 400; MCPinitializewith the access token → desktop-commander 0.2.52;tools/list→ the real tool names (get_config,read_file,write_file,list_directory, …); refresh rotation → 200 with a new pair, old refresh token reuse → 400; machine bearer →initialize200. All test clients/tokens were deleted from KV afterwards (namespace verified empty).The one piece only the owner completes: the browser approval click. On the first real connection from Claude or ChatGPT, the client registers itself and redirects the owner to
commander.security.cab/authorize, where the Access Google sign-in plus the approval page (naming the client) issue the first real code. That leg cannot be simulated from here — everything before and after it is verified live.Still open on this issue: the mcpx consumer entry (now simpler — a static
Authorization: Bearerheader with the machine bearer, no Access header pair needed), the vendor device-agent stand-down, and the workers.dev subdomain disable.