Repository navigation
Open
Labels
kind/featureNew feature or capability requestpriority/lowNice to have; do when convenientqueue/queuedHas a queued queue taskstatus/in-reviewstray-workStray work: not tied to a design or roadmap item (AUDIT-7 Lane 7)stray/needs-parentStray work with no appropriate parent/epic/design yet (AUDIT-7 Lane 7)
Description
Self-hosted Desktop Commander MCP endpoint (OAuth 2.1 front door, 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_devis off; the custom hostname is the only public door./mcpuses the OAuth 2.1 / machine-bearer gate, while Access remains on/authorize. - 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— OAuth 2.1 front door (PR feat(desktop-commander): OAuth 2.1 front door for hosted MCP clients (#13404) #13488, merged 2026-11-23). Discovery and registration are public;/authorizeis the only path behind Cloudflare Access and verifies the owner's Google identity./mcpaccepts an OAuth access token or the configuredMACHINE_BEARERWorker secret. The original whole-hostname Access design and public-door service token are retired. - 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. The bridge uses
cloudflare.access.desktop-commander-client-id/-client-secret; the public/mcpmachine fallback usesdesktop-commander.machine-bearer; OAuth client registrations live inOAUTH_KV; deploys usecloudflare.api-token-desktop-commander-worker.
Acceptance
POST https://commander.security.cab/mcpwith an OAuth access token or the configuredMACHINE_BEARERcompletes an MCPinitialize+tools/listagainst the real Desktop Commander on amd.- The same
/mcpURL without credentials returns 401 with the OAuth resource-metadata pointer; Cloudflare Access is used only on/authorize, where the owner authorizes a client. - 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)"
}
}Acceptance criteria
- Delivered: Self-hosted Desktop Commander MCP endpoint (OAuth 2.1 front door, laptop bridge) — the outcome named in the title is demonstrably in place.
- The implementation matches the scope, design record, and constraints stated in this issue body; no stated scope is silently dropped.
- Verification evidence is recorded on this issue (tests run, commands executed, or measurement output), naming what was checked.
- Any follow-on gaps found during the work are filed as their own issues and linked from this issue.
Metadata
Metadata
Assignees
Labels
kind/featureNew feature or capability requestpriority/lowNice to have; do when convenientqueue/queuedHas a queued queue taskstatus/in-reviewstray-workStray work: not tied to a design or roadmap item (AUDIT-7 Lane 7)stray/needs-parentStray work with no appropriate parent/epic/design yet (AUDIT-7 Lane 7)
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.fix(nix): restore the string delimiters on desktop-commander-bridge-s…
dezren39 commentedon Nov 24, 2026
Triage verdict (oc-code-07, 2026-11-24)
Fresh state: open. The Worker, bridge, publish and promote workflows, and the OAuth front door (PR #13488) are merged and verified. The only step that needs a person is the browser approval on the first real client connection.
Remaining, all buildable: (1) the mcpx consumer entry, now a static bearer header; (2) standing down the vendor device agent; (3) disabling the workers.dev subdomain.
Verdict: the build is mostly done. The three remaining items are routed as a small_fix packet against this issue. Item 2 needs a plan so the vendor relay is not cut before the self-hosted path works. The approval click stays with the owner as a hands item. Tracked under #14158.
dezren39 commentedon Nov 24, 2026
Supersession note (register #13964, item F1)
The design described in this issue's body is superseded in part. The body describes the original public-door design — the door behind Cloudflare Access end to end, with a public-door service token. That design was replaced by PR #13488 (merged 2026-11-23T17:08:25Z, "OAuth 2.1 front door for hosted MCP clients"), which is the design as built:
/authorize;Read the body above as the historical record of the superseded design, not as the current architecture. The fleet book chapter (
pkgs/fleet/book/concepts/commander.md) follows the PR #13488 source. The rest of this issue's scope (endpoint, laptop bridge) is unaffected by this note.Recorded for register #13964 item F1; no state change to this issue.
13 remaining items
[-]Self-hosted Desktop Commander MCP endpoint: Worker front door, Access gate, laptop bridge[/-][+]Self-hosted Desktop Commander MCP endpoint (OAuth 2.1 front door, laptop bridge)[/+]developing-today-fleet commentedon Nov 27, 2026
Current-state correction recorded for the Fleet book disagreement register (#13964, F1): this issue body now describes the merged OAuth 2.1 public front door (PR #13488), with Cloudflare Access only on
/authorizeand OAuth orMACHINE_BEARERaccepted by/mcp. The original whole-hostname Access design and public-door service-token pair are retired. #13404 remains open for its separateworkers.devaccount-side hands item; this edit does not close that work.developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix): recheck of this issue (body, all comments, labels, blocker edges).
STRENGTHS: The body is the current architecture, not the original plan — it records the merged OAuth 2.1 public front door (PR #13488), the retired whole-hostname Access design, the bridge door's service-token-only posture, and every secret by name only. Acceptance is five checkable items.
GAPS: A contradictory status pair —
status:in-reviewandstatus/needs-triageat once, on an issue triaged repeatedly since 2026-11-26.FIXES I APPLIED: Removed
status/needs-triage. State per the triage record: the core build is merged and verified live (2026-11-26 — discovery documents answering 200 from the laptop check), and mcpx consumes the endpoint as its first verified client (the.mcpx.jsonentrydesktop-commander-self-hostedwas added under task 24467).REMAINS: The vendor device agent (
desktop-commander-remote.service) stand-down, which the body sequences as a separate recorded step after this endpoint is verified; the publish/promote proofs stand as recorded.developing-today-fleet commentedon Nov 29, 2026
Issue census — 2026-11-29
Audited live on 2026-11-29 against the house label taxonomy: details, labels, blockers, priority.
Gaps found: no ## Acceptance criteria section in the body; carries two status labels at once (status:in-review and status/needs-triage) — owner should leave exactly one current status
Strengths found: detailed body with scope and context a picker-up can start from; links a parent issue and/or design record; active discussion: 12 recent comment(s) skimmed
Comment skim: comments mention blocking; comments show claim/progress (12 comments in the latest page).
Actions taken by the census: appended ## Acceptance criteria section to the body (original text unchanged).
Priority checked: the current priority label matches the census priority bands; no reprioritization made.
developing-today-fleet commentedon Nov 29, 2026
Priority validation 2026-11-29 (Felix): priority/normal → priority/low — the endpoint is built and verified live (OAuth front door merged in PR #13488); the only remainder is the workers.dev account-side disable, a single dashboard hands item the Cloudflare API refuses (405), not time-sensitive work.
developing-today-fleet commentedon Nov 29, 2026
Census remediation — 2026-11-29
Status-label deduplication — already resolved before this remediation pass, verified live:
status:in-reviewandstatus/needs-triage.status/needs-triagewas removed at 2026-11-29T15:18:26Z, recorded in the census recheck by developing-today-fleet[bot] (Felix, 2026-11-29T15:19:00Z): "Removedstatus/needs-triage."status/needs-triageis the stale label: this issue has been triaged repeatedly (2026-11-24 oc-code-07; 2026-11-26 lane code-i with live endpoint checks; 2026-11-27 task 25202), the core build is merged and verified live (PRs feat(desktop-commander): self-hosted MCP endpoint — Worker, bridge package, Actions publish/promote (#13404) #13427, fix(desktop-commander): declare a cf dev-server for the versions flow (#13404) #13443, fix(desktop-commander): treat cf 10007 as no baseline on first publish (#13404) #13447, fix(desktop-commander): resolve uploaded version by tag; drop deployments --message (#13404) #13453, fix(desktop-commander): versions get needs --worker-id (#13404) #13473, and the OAuth 2.1 front door PR feat(desktop-commander): OAuth 2.1 front door for hosted MCP clients (#13404) #13488; endpoint live at commander.security.cab), the mcpx consumer entry was completed under task 24467, and the vendor relay stand-down was recorded complete in the 2026-11-27 triage (PR Stand down vendor Desktop Commander relay (#13404 step 2) #15788). The only remainder recorded in the thread is theworkers.devaccount-side disable — a dashboard hands item the Cloudflare API refuses (405/10405) — not untriaged work.status:in-reviewis therefore the operative status: a built, live system with only that hands item outstanding, not a system awaiting first triage.status:in-review. Kept:status:in-review. Removed (by the earlier Felix pass):status/needs-triage.