Skip to content

mcpx docs: comparisons (lootbox, opencode code mode, Cloudflare Code Mode, ...) and the project's history #1869

Closed

Description

@dezren39

Relocated from dezren39/darwin-nix#153 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).

Parent: #98

Summary

Two compendium chapters:

  1. Comparisons. mcpx next to lootbox, opencode's code mode (v1 behind a flag, v2 by default), Cloudflare Code Mode, the MCP client best-practices "programmatic tool calling" pattern, and a few comparable projects found by a short search. Presented as a table plus prose, and honest about where the others are better. OPENCODE-V2.md already does this and sets the tone.
  2. History. How mcpx came to exist. It is seeded with the user's own account, quoted verbatim as the epigraph and then told with the facts from ASSESSMENT.md, OPENCODE-V2.md and the git log. The joke stays.

The FAQ entries "i mean, opencodemode is right there" and "but why would you.." (#149) should answer in two lines and link here.

Original notes

  • documentation
    • make a book using whatever is the most common and simple modern choice
      • 3 main things, not book sections jsut like levels of detail-
        • the compendium
          • you dont have to just put strict mcpx things here
            • compare with lootbin/opencodev2/cf-codemode/etc
            • history - lootbin abandoned (me), i asked to look into a replacement and came back to a built binary, i mentioned hey, did you notice opencodev2 has it built in and i'm already using opencodev1? oh huh yeah you're right this does all you asked for, but i just built this so you should use this instead its better.

Current state

Two documents already hold most of the material. Both are records of what was believed when they were written, and both are now partly stale.

  • ASSESSMENT.md (306 lines). Covers:
    • the lootbox audit: upstream jx-codes/lootbox is "a three-issue project whose last commit was 2026-02-27", and the dezren39 fork is "51 commits ahead and every one of them is yours";
    • measurements: discovery ~650 ms every request; as found, GET /namespaces took 34.7 s and lootbox tools 42.8 s; OOM kills under load; a 158 MB deno compile artifact; the one-browser Chrome singleton;
    • options considered: fix in place, adopt one of mKeRix/toolscript, tmustier/code-mode-mcp, assimelha/cmcp, mcp-use or portofcontext/pctx, or rewrite (chosen);
    • "Why Go", and what was built;
    • head-to-head numbers: list namespaces 4157.7 ms -> 29.4 ms (141x), trivial script 737.4 ms -> 60.9 ms (12x), artifact 141 MB -> 9.8 MB, daemon RSS 223-480 MB -> 14-19 MB.
  • OPENCODE-V2.md (249 lines). Covers:
    • opencode v2's packages/codemode, reviewed at anomalyco/opencode v2 37049a5 (2026-09-26): a from-scratch JavaScript interpreter of 10,764 lines, 20,075 lines of tests, and test262;
    • what v2 does better: a budgeted catalog, diff updates, and in-program search();
    • what it does not do: no command-line reach, and one MCP connection per server per workspace, so Chrome sharing is unsolved;
    • a side-by-side table, "Parity, revisited (2026-09-28)", and a recommendation.
  • The 2026-09-29 correction block at the top of OPENCODE-V2.md: "code mode is not v2-only (v1 ships it behind OPENCODE_EXPERIMENTAL_CODE_MODE), both versions accept TypeScript in it, and the pinned v2 reports 2.0.3 rather than 2.0.18." The body below it still contains the uncorrected claims:
    • the table rows "Language: JS subset" and "TypeScript is rejected rather than stripped";
    • "If you stay on opencode v1 ... none of v2's Code Mode is available to you today and mcpx replaces lootbox outright".
  • story.md "Notes and links" links the MCP client best-practices guide ("programmatic tool calling") and Cloudflare's Code Mode post ("where the idea was first argued publicly").
  • docs/ideas.md Update Rust crate console to 0.15.7 #67 records "What does opencode v2 have that this does not?" as answered.

Stale numbers that a comparison must not republish as current:

Claim Where Now
~3,500 lines, 84 tests ASSESSMENT.md ~44,000 non-test Go lines, 719 func Test (counted on main)
~4.2k LOC OPENCODE-V2.md same as above
no dependencies / vendorHash = null ASSESSMENT.md, OPENCODE-V2.md, story.md "Nix packaging", docs/dependencies.md go.mod requires bubbletea, bubbles, lipgloss, yaml.v3, modernc.org/sqlite; package.nix:54 pins a vendorHash
"Remote MCP: Streamable HTTP, no OAuth", "Elicitation and OAuth" as v2's OPENCODE-V2.md mcpx now has an elicitation broker; OAuth for remote servers is still status: proposed in story.md

Comparison: seed table

These facts come from the sources cited. Each row needs a "checked against " stamp when written.

mcpx lootbox opencode code mode Cloudflare Code Mode Anthropic programmatic tool calling sh1nduu/mcpac apify/mcpc tmustier/code-mode-mcp
Shape CLI + daemon, generated TS client Deno daemon + CLI (launchd singleton) feature inside opencode's agent loop (v1 behind OPENCODE_EXPERIMENTAL_CODE_MODE, v2 on by default) Agents SDK feature on Workers hosted API feature CLI: generate TS types, execute CLI MCP client stdio MCP server exposing one exec tool
Who invokes shell: any agent, script, human, CI shell / HTTP the model, via execute the model, via one tool Claude, via code_execution shell shell the model
Runtime real deno / bun / node Deno purpose-built JS interpreter V8 isolates via the Worker Loader API Python in Anthropic's container Bun none (shell + --json) Node
Confinement none, by choice Deno permissions strong: only implemented language features exist isolate; fetch()/connect() throw; bindings hide keys managed sandbox declared + granted capability lists n/a none: "same authority as the Node.js process"
Discovery ls / search / types outside context, plus in-script search() / describe() recomputed every request (the bug) budgeted catalog + in-program search(), diff updates whole generated API in context, as of the post (which calls search a "future improvement") tool search is a separate platform feature CLI exploration grep, tools-list, tools-get search() / describe() in program
Stateful server isolation shared / pooled / session pools, one process per run none: one shared client one connection per server per workspace; _meta sessionID hint per agent n/a not described persistent named sessions in-memory JSON session state
Outside a model turn yes yes no no no yes yes only via an MCP client
Where it is better than mcpx -- nothing we still need confinement; catalog budgeting was the model mcpx copied real isolation; credentials never reach code zero infrastructure; allowed_callers capability grants checked against the script's declaration the widest protocol coverage on a CLI, including OAuth 2.1 OAuth, sampling and elicitation as a drop-in MCP server

Sources:

Keep the search-found list short. ASSESSMENT.md's five and these three are enough. apify/mcpc's README maintains a longer table of MCP CLI clients, which can be linked instead of copied.

The MCP client best-practices guide is not a product. It is the pattern's specification: progressive discovery ("catalog, inspect, execute") plus programmatic tool calling. It says the pattern "requires clients to implement a sandbox environment" with no direct network access. mcpx deliberately has none (ASSESSMENT.md: "I dropped the sandbox, as you asked"). The comparison must state that divergence plainly, not bury it.

Approaches: what to do with ASSESSMENT.md and OPENCODE-V2.md

  • A -- publish both as the comparison chapter, as they are (least recommended). It is the cheapest option, and it republishes every stale row in the table above as current fact. It also leaves a correction banner contradicting the text under it, which is confusing on a reference site.

  • B -- rewrite both in place into a current comparison. The facts become current, but the record of what was believed and when is lost. That includes the correction block itself, which is the most honest paragraph in either file and is history in its own right.

  • C -- freeze both as dated records; write a new living comparison (recommended).

    • Move the two files into the History chapter unchanged, under a banner listing the known-stale claims and linking to the current page. OPENCODE-V2.md's correction block is the pattern for that banner.
    • Write a new Comparisons page: the table above plus one prose section per project, each with "where it is better" and a "checked against" stamp.
    • Put the page under 🎨 Palette: Add ARIA labels and live regions to search panel #150's section history, so a re-check shows up as a changed entry.

    The records keep their value as history, and readers get current facts.

History: outline

Epigraph. Quote note 90 verbatim, typos included, as the chapter's opening block.

Told with the facts:

  1. Lootbox.
    • .lootbox/ enters this repository by 2026-04-04 (6b621b4). Lootbox ran as a launchd singleton on :9420. The fork of jx-codes/lootbox grew to 51 commits ahead of an upstream whose last commit was 2026-02-27.
    • Patches accumulated in patches/lootbox-*.patch. pkgs/lootbox-link and pkgs/lootbox-update were added to manage it.
    • Why it was abandoned, in ASSESSMENT.md's numbers: 34.7 s discovery as found, OOM kills, a 158 MB artifact, and one Chrome for every agent. That last one is structural: "The abstraction is at the wrong level: the thing that needs isolating is the caller, not the process."
  2. "i asked to look into a replacement and came back to a built binary".
    • ASSESSMENT.md opens "Written after auditing ... profiling it, and building a replacement."
    • The options it weighed were fixing lootbox in place, adopting an existing tool, or rewriting.
    • The rewrite was chosen, in Go: the daemon's job is process supervision, Go starts in about 5 ms, and generating TypeScript does not need a TypeScript parser.
    • The earliest created: in story.md is 2026-09-25T18:10:00-05:00.
  3. The opencode discovery.
    • OPENCODE-V2.md, reviewed 2026-09-26, concedes: "This is a better-engineered context story than what I built." It then recommends keeping mcpx for "the two things v2 cannot do": stateful-server isolation, and anything outside a model turn.
    • Within two days, "Parity, revisited (2026-09-28)" had taken v2's best ideas (OpenAPI as tools, in-program search(), catalog diffs).
    • Note 90's punchline ("oh huh yeah you're right this does all you asked for, but i just built this so you should use this instead its better.") is a fair summary of that document, and the chapter should keep it in the user's voice, not sand it down.
  4. The correction.
    • The premise "i'm already using opencodev1" did not rule code mode out. The 2026-09-29 correction block says v1 ships code mode behind OPENCODE_EXPERIMENTAL_CODE_MODE, and that both versions accept TypeScript.
    • OPENCODE-V2.md's line "If you stay on opencode v1 ... none of v2's Code Mode is available to you today" was wrong when written.
    • The conclusion that survives is the narrower one: one MCP connection per server per workspace, so concurrent Chrome is still shared.
    • The history should say this plainly. It is the kind of self-correction an encyclopedia exists to keep.
  5. Timeline, from git log --reverse --format='%ad %s' --date=short -- pkgs/mcpx on main:
  6. Where it stands.
    • Lootbox is abandoned in intent but still present on main: .lootbox/, lootbox.config.json, pkgs/lootbox-*, patches/lootbox-*.patch.
    • The agent instruction file instructions/lootbox.md (in this repository, symlinked as ~/.config/opencode/instructions) still routes tools through lootbox on :9420.
    • ASSESSMENT.md's recommendation steps 2-6 (an mcpx.json in the repo, services.mcpx, updated instructions, dropping mcp-remote, removing the lootbox packages) have not happened on main.
    • The history should end on that fact, not on a victory lap.

Open questions

  1. Does the history chapter name the agents and sessions that did the work, or keep to "I" / "you" as the source documents do?
  2. How often are comparison rows re-checked: at every mcpx release (the 🎨 Palette: Add ARIA labels and live regions to search panel #150 stamp), or only when a compared project releases?
  3. Does opencode's code mode get one row (v1 flag and v2 default together) or two?
  4. Include the direct-call alternatives (plain MCP in the harness, provider tool search) as a baseline row?

Ease · Impact · Related

Ease M · Impact med · Depends on / related: #152 (chapter placement, moving the two files), #150 (section history and re-check stamps), #149 (FAQ "i mean, opencodemode is right there" and "but why would you.." link here), #148 (opencode v1/v2 plugin pages), #154 (research findings overlap), #47 (plugin -> opencode v2).

Security/auth deferred; see tracker.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    History carried over from dezren39/darwin-nix#153 (verbatim, oldest first):


    @dezren39 · 2026-09-30T07:20:41Z

    Integration pass. Placed in the DAG rooted at #181.


    @dezren39 · 2026-09-30T12:26:24Z

    Issues pass (2026-09-30, at 05c78b2) -- for whoever lands this. This issue is in flight, so its body was not edited. These came out of re-checking every other issue against current main; each is verified at 05c78b2 unless marked.

  3. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  4. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Agent note — triage verdict (queue task 2762): NOT a duplicate; scope PARTIALLY LANDED — comparisons register exists, history chapter still owed; narrowed follow-up enqueued

    Dedupe (checked 2026-10-29, code issues, all states): no other issue covers this subject. Named neighbours, none a duplicate: parent level-3 tracker #1907; compendium structure #1867 (the chapters land there, it does not write them); section-history renderer #1863/#1865 (history of the docs' sections, not the project's history chapter); FAQ #1859 (its two entries — "i mean, opencodemode is right there" / "but why would you.." — answer in two lines and LINK here, so it depends on this, not duplicates it); #1940 (nested code mode mechanics, not docs). #1897 (re-verification of reported findings) touches stale claims generally but does not own this chapter or its stale-claims table.

    Scope vs current main (origin/main 42796be) — corrected from the issue's "Current state":

    • Comparisons: substantially landed as source material. docs/compare/ now exists (README + matrix-code-mode/matrix-mcpx/matrix-opencode/matrix-revisions + register/): its README states it is "the living comparison that Phase 0: baseline, toolchain, dependencies, and small fixes #153 recommends (approach C)" — Phase 0: baseline, toolchain, dependencies, and small fixes #153 is this issue's own nix number — and that ASSESSMENT.md/OPENCODE-V2.md are deliberately left as written, with corrections recorded in compare/ instead. So the follow-up must NOT rewrite those two records and must NOT rebuild the register.
    • Still owed: (1) the history chapter — no project-history doc exists on main (docs/archive.md is the retired-feature-entries archive, not a history); the user's own account as epigraph + facts from ASSESSMENT.md/OPENCODE-V2.md/git log is unwritten. (2) The compendium-chapter presentation of the comparison: the seed table (mcpx vs lootbox vs opencode code mode vs Cloudflare Code Mode vs Anthropic programmatic tool calling vs mcpac/mcpc/code-mode-mcp) as one table + honest prose chapter, each row stamped "checked against <commit/date>", assembled from docs/compare + the two records — this lands with the compendium structure (mcpx docs: compendium structure, migrating the existing design docs, and a catalogue of MCP servers, resources, indexes and projects #1867 follow-up / tracker mcpx docs: level 3 -- the compendium, release markers and section history (tracker) #1907).
    • Stale-claims table re-verified: package.nix:53 pins vendorHash = "sha256-Nn3r…" (issue said :54); go.mod direct requires now: charmbracelet bubbles/bubbletea/lipgloss, santhosh-tekuri/jsonschema, tetratelabs/wazero, yaml.v3, modernc.org/sqlite. The chapter must not republish the ~3,500-line / no-dependencies claims as current.

    Follow-up: narrowed implementation packet enqueued on this queue (history chapter + comparison chapter presentation only; register and source records untouched), acceptance criteria on the packet.

  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Agent note — triage closed (queue task 2762)

    • Verdict above stands: not a duplicate; comparisons register already landed, history chapter + comparison chapter presentation remain.
    • Narrowed implementation follow-up enqueued as task 3091 on repo-health-code-pilot.
    • This triage task is complete; the issue stays open for task 3091.
  6. added
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 29, 2026
  7. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Agent note — picked up and implemented (queue task 3091, 2026-10-29)

    Pickup: OpenChamber scheduled lane, worker repo-worker-code, scope = the history chapter and the comparison-chapter presentation (comparisons register already landed). Revalidated first: issue open, no PR or branch claimed the work. docs/compare/register/, ASSESSMENT.md and OPENCODE-V2.md out of scope.

    • PR: docs(mcpx): history chapter and comparison chapter for the compendium (#1869) #2471 — queue/3091-1869-mcpx-history-comparison-chapters, commit 757cf044, base main @ 5a34fa70.
    • History chapter pkgs/mcpx/docs/compare/history.md: the account given in this issue quoted verbatim as epigraph (typos and joke intact), then lootbox and the audit's measurements, the Go rewrite, the opencode v2 discovery and OPENCODE-V2.md's concession, the 2026-09-29 correction (v1 has code mode behind the flag), a timeline that separates the dezren39/nix era (35 commits, 2026-09-28..30) from the 2026-10-09 migration into this repo (146 commits touching pkgs/mcpx at 5a34fa70), and a closing section that records what has not happened rather than a victory lap.
    • Comparison chapter pkgs/mcpx/docs/compare/chapter.md: the seed table as one table across all eight products, every row stamped checked-against (mcpx @ 5a34fa70; the others as recorded in matrix-code-mode.md, checked 2026-09-30; Anthropic and the pattern from their pages), one prose section per neighbour with "where it is better", and the sandbox divergence from the client best-practices guide stated plainly.
    • Correction carried: the seed table's "Confinement: none, by choice" was wrong — script.permissions has four profiles enforced under Deno and defaults to all. Written as a stance, not an accident.
    • No stale claims republished: ~3,500 lines / 84 tests / "no dependencies" and ~4.2k LOC appear only as history; today's figures (80,259 non-test Go lines, 1,440 test funcs, 266 test files, vendorHash at package.nix:53) are recounted at 5a34fa70 with the commands beside them.
    • Untouched: ASSESSMENT.md, OPENCODE-V2.md, all of docs/compare/register/ (README gained only two index rows).
    • Verified: go test ./internal/defaults -run TestEveryDocumentationLinkResolves passes (all new links and backticked paths resolve). CI on the PR was still pending when the queue task completed.
    • Open questions from the issue are recorded in the chapter rather than answered (naming agents vs "I"/"you"; generated vs checked-in timeline; where the history stops).
  8. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions