Repository navigation
Description
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:
- 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.mdalready does this and sets the tone. - 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.mdand 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/lootboxis "a three-issue project whose last commit was 2026-02-27", and thedezren39fork is "51 commits ahead and every one of them is yours"; - measurements: discovery ~650 ms every request; as found,
GET /namespacestook 34.7 s andlootbox tools42.8 s; OOM kills under load; a 158 MBdeno compileartifact; the one-browser Chrome singleton; - options considered: fix in place, adopt one of
mKeRix/toolscript,tmustier/code-mode-mcp,assimelha/cmcp,mcp-useorportofcontext/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.
- the lootbox audit: upstream
OPENCODE-V2.md(249 lines). Covers:- opencode v2's
packages/codemode, reviewed atanomalyco/opencodev237049a5(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.
- opencode v2's
- The 2026-09-29 correction block at the top of
OPENCODE-V2.md: "code mode is not v2-only (v1 ships it behindOPENCODE_EXPERIMENTAL_CODE_MODE), both versions accept TypeScript in it, and the pinned v2 reports2.0.3rather than2.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.mdUpdate 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:
- Cloudflare: https://blog.cloudflare.com/code-mode/ (2025-09-26).
- Anthropic: https://www.anthropic.com/engineering/code-execution-with-mcp (2025-11-04) and https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling. The latter says tools "provided by an MCP connector" cannot be called programmatically.
- MCP guide: https://modelcontextprotocol.io/docs/2026-07-28/develop/clients/client-best-practices.
- Projects: https://github.com/sh1nduu/mcpac, https://github.com/apify/mcpc, https://github.com/tmustier/code-mode-mcp.
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
changedentry.
The records keep their value as history, and readers get current facts.
- Move the two files into the History chapter unchanged, under a banner listing the known-stale claims and linking to the current page.
History: outline
Epigraph. Quote note 90 verbatim, typos included, as the chapter's opening block.
Told with the facts:
- Lootbox.
.lootbox/enters this repository by 2026-04-04 (6b621b4). Lootbox ran as a launchd singleton on:9420. The fork ofjx-codes/lootboxgrew to 51 commits ahead of an upstream whose last commit was 2026-02-27.- Patches accumulated in
patches/lootbox-*.patch.pkgs/lootbox-linkandpkgs/lootbox-updatewere 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."
- "i asked to look into a replacement and came back to a built binary".
ASSESSMENT.mdopens "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:instory.mdis 2026-09-25T18:10:00-05:00.
- 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.
- 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.
- 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
- Timeline, from
git log --reverse --format='%ad %s' --date=short -- pkgs/mcpxonmain:- 2026-09-28
#4"configurable, inspectable, and documented" lands mcpx onmainas a squash of a longer branch. Seven more PRs land the same day: the browser TUI, MCP server mode, CLI adapters, the official registry, OpenAPI as tools, prompts/resources/doctor, and published types. - 2026-09-29 brings both protocol eras, elicitation, credentials, the protocol audit, the vendorHash repair workflow, plugin docs (build(deps): bump build/buck/preludes/buck2-prelude from
d956689tof46550f#45), one ops table for/v1(build(deps): bump build/buck/preludes/buck2-prelude fromd956689to4a718b8#46), every constant as a setting (chore(deps): bump rustix from 0.37.19 to 0.37.25 in /sources/pavex/examples/realworld #56), exec over/v1and artifacts (chore(deps): bump build/buck/preludes/buck2-prelude fromd956689to677e9eb#57), diagnostics and recipes (chore(deps): bump rustix from 0.38.3 to 0.38.21 in /build/nix/setup #58), and--typecheck(Update Rust crate bimap to 0.6.3 #66). - 2026-09-30
#75"exec honours the flags it accepts". - In total, 33 commits touching
pkgs/mcpxonmainin three days. The generator can render the timeline from git, because this is a list of dated PRs, not per-section history, so 🎨 Palette: Add ARIA labels and live regions to search panel #150's objections to git-derived history do not apply here.
- 2026-09-28
- 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 (anmcpx.jsonin the repo,services.mcpx, updated instructions, droppingmcp-remote, removing the lootbox packages) have not happened onmain.- The history should end on that fact, not on a victory lap.
- Lootbox is abandoned in intent but still present on
Open questions
- Does the history chapter name the agents and sessions that did the work, or keep to "I" / "you" as the source documents do?
- 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?
- Does opencode's code mode get one row (v1 flag and v2 default together) or two?
- 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
developing-today commentedon Oct 28, 2026
CODE-796
dezren39 commentedon Oct 28, 2026
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 currentmain; each is verified at05c78b2unless marked.script.permissionsdefaults toall, has profiles (net/read/read-net/strict), and takes effect only under Deno (internal/settings/registry.go:183,docs/container.md§2).05c78b2it is 44,916 lines and 735func Test, not ~44,000 and 719.dezren39 commentedon Oct 29, 2026
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":
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 thatASSESSMENT.md/OPENCODE-V2.mdare 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.docs/archive.mdis 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).package.nix:53pinsvendorHash = "sha256-Nn3r…"(issue said :54);go.moddirect 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.
dezren39 commentedon Oct 29, 2026
Agent note — triage closed (queue task 2762)
dezren39 commentedon Oct 29, 2026
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.mdandOPENCODE-V2.mdout of scope.queue/3091-1869-mcpx-history-comparison-chapters, commit757cf044, basemain@5a34fa70.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 andOPENCODE-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 touchingpkgs/mcpxat5a34fa70), and a closing section that records what has not happened rather than a victory lap.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 inmatrix-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.script.permissionshas four profiles enforced under Deno and defaults toall. Written as a stance, not an accident.vendorHashatpackage.nix:53) are recounted at5a34fa70with the commands beside them.ASSESSMENT.md,OPENCODE-V2.md, all ofdocs/compare/register/(README gained only two index rows).go test ./internal/defaults -run TestEveryDocumentationLinkResolvespasses (all new links and backticked paths resolve). CI on the PR was still pending when the queue task completed.