GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — mcpx docs: interface pages -- abstract and client interfaces, CLI, MCP, binary, script, /v1 and the SDKs · Issue #1851 · developing-today/code Closed Labels source/creatorFiled by the new-issue-creator jobtask/triageQueue packet kind: verify, reproduce, and route this item DescriptionRelocated from dezren39/darwin-nix#147 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: #94 SummaryThis issue covers the level-2 pages for every way into mcpx: the abstract interface (one ops table behind every surface), client interfaces, the CLI (overview, arguments, commands), MCP (overview, SDK, compatibility), the binary, scripts, Four facts found while reading the code change what these pages can promise:
Details are in "Current state". Original notesSource-notes lines 1, 2, 7, 49-52 (parents) and 60-71 (this issue). The lines in between are quoted in sibling issues.
Current state (what mcpx does today, with file refs)Paths are relative to Finding 1:
|
| document | produced by | describes | state |
|---|---|---|---|
GET /v1/openapi.json |
api.OpenAPI (internal/api/openapi.go:8-17), from the ops table |
the daemon API (/v1/*) |
correct; the source for http-api#v1 |
mcpx schema --format openapi |
CmdSchema (internal/cli/publish.go) |
the tools of your MCP servers, as operations for a client generator | correct; a different subject |
mcpx openapi |
cli.OpenAPI (internal/cli/openapi.go:14-100) |
/mcp, /health, /openapi.json, /v1/tools/*, with server http://127.0.0.1:8787 labelled "mcpx serve --transport http" |
stale: docs/protocol.md §5 says that separate server was removed, /health became /v1/health and /openapi.json became /v1/openapi.json |
The comment at internal/api/openapi.go:15-17 also still refers to "mcpx serve --http ... at /openapi.json".
Recommendation: point mcpx openapi at api.OpenAPI. Then the docs build can produce the /v1 spec with no daemon running, and the CLI name means what a reader assumes. Until then, the pages name each document explicitly.
cmd/mcpx/main.go:61-104): --json, --tui, --profile <a,b>, --skip-default, --all-profiles, --config <file>, --version/-v, --help/-h.parseFlags calls BindFlags(fs, cmd), which calls sch.Bind(fs, cmd) over ForCommand(cmd) (internal/cli/root.go:52-67, internal/settings/bind.go:69-88). A command only accepts the settings it reads. Plumbing flags are marked [plumbing] rather than hidden.The generated "cli arguments" page therefore has two parts: the global list, and a per-command flag list. It is not one global table.
docs/dependencies.md says "Go libraries: One. modernc.org/sqlite". go.mod:5-11 also requires bubbletea, bubbles, lipgloss and yaml.v3. story.md "The browser › The dependency" records the TUI libraries: 1.2 MB, taking the stripped binary from 11.2 to 12.4 MB. The binary page must use go.mod, not that sentence.
internal/api/ops*.go declares 60 operations (60 Method: entries across ops.go, ops_consumer.go, ops_exec.go, ops_proto.go, ops_resolve.go, ops_settings.go). From it come the mcpx_<op> MCP tools and /v1/openapi.json. Routes are not generated: they are registered by hand with mux.HandleFunc (e.g. internal/daemon/ops.go:28-38), and internal/api/parity_test.go:21 reads them out of the daemon source with a regex and checks them against the table. parity_test.go enforces three of the four parity columns this way, and the plugin column is not enforced (docs/parity.md).go.mod has no MCP module. The MCP client (internal/mcpclient), the server (internal/mcpserver) and the JSON-RPC framing are its own code. docs/dependencies.md says so.2025-03-26, 2025-06-18, 2025-11-25 and 2026-07-28. Upstream it speaks 2025-11-25 by default (docs/protocol.md §1). The matrix lives as data in internal/mcpserver/revisions.go and is served by GET /v1/protocol: "the document defers to the endpoint". There is no CLI command for it (Update Rust crate clap to 4.5.4 - autoclosed #76)./v1 SDK today is the plugin's DaemonClient (plugin/opencode/mcpx/daemon.ts:338): generic raw/get/text/post/postRaw/putRaw plus 22 typed methods (status, exec, call, logQuery, tasks, putSetting, ...), and connect() for discovery. It is not published as a package..ts, .js, .mts, .mjs, or an existing file) or like source code runs without run/exec (cmd/mcpx/main.go:25-50, :164-179). Bare mcpx opens the TUI, or prints help when there is no terminal.interfaces#abstract-interfacesExplain the design in one diagram: one declaration (Op in internal/api/ops.go) produces the mcpx_<op> MCP tool and the OpenAPI entry, and a test holds the hand-registered /v1 route to it (the diagram must not show the route as generated). The CLI and the plugin sit on top of /v1. Quote the parity claim word for word: "Everything the CLI can do can be done from a plugin, can be done over /v1, can be done from MCP." Then state honestly what enforces it (parity_test.go, three of four columns) and what does not (the plugin column, and the CLI gaps in #76). The parity table is generated (#144). This page is the map. The other interface pages are the territory.
interfaces#client-interfacesEvery way code can drive mcpx, with one runnable snippet each:
| client interface | for | reference |
|---|---|---|
generated TypeScript client: tools.<ns>.<fn>(args); globals tools, log, emit; namespaces as bare identifiers in exec; import tools from "./mcpx-client.ts"; in-script search() / describe() |
scripts | AGENTS.md "Scripts"; mcpx client [-o file] [--ns a,b] prints it; mcpx types shows signatures |
| the CLI | people, shells, CI | cli#cli |
mcpx call <ns>.<tool> [json] |
one call, no JS runtime needed | docs/dependencies.md "External programs" |
DaemonClient / connect() |
harness plugins, and any Bun/TypeScript program | plugin/opencode/README.md "Talking to the daemon directly" |
any MCP client, through /mcp or mcpx serve --transport stdio |
MCP hosts | mcp#mcp |
raw HTTP on /v1 |
curl, other languages | http-api#v1 |
cli#clils, then search, then types, then run/exec (AGENTS.md "The loop").--json for machines; never parse human output.EX_TEMPFAIL) when a call is waiting on an elicitation (manual.go, elicit Detail); 2 for an unknown command or a settings conflict (cmd/mcpx/main.go).mcpx man, installed by package.nix to share/man/man1/mcpx.1) and shell completions (mcpx completion bash|zsh|fish). Both commands are dispatched but not in Commands() (Finding 1).cli#cli-argumentsGenerated (#144), in two parts (Finding 3): the global flags, then each command's registry flags with their aliases (--runtime for --script-runtime, and so on). Short prose around the tables covers:
configuration#common-config;bind.go ApplyTo);--daemon-lease-t-t-l).cli#cli-commandsGenerated from Commands(), grouped as help groups them (running, discovery, daemon, configuration, inspection). Each command gets its usage, detail and examples. Blocked on Finding 1's prerequisite. Without it, the page leaves out serve, api, registry, adapter, openapi, man and completion.
mcp#mcpdocs/protocol.md §4)./mcp and stdio, the small tool surface and why (story.md "mcpx speaks MCP"), and subscriptions/listen.Link modes#server-modes and modes#transport-options rather than repeating them.
mcp#mcp-sdkThe item is ambiguous. The page answers the first two readings and routes the third:
http://127.0.0.1:<port>/mcp, or spawns mcpx serve --transport stdio. Include one tested snippet using the official TypeScript SDK client.d956689 to 2901d28 #80 and chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 36464cf #83.mcp#mcp-compatibilityinternal/mcpserver/revisions.go rather than copied from docs/protocol.md §1, since the document itself says it defers to the code. 🎨 Palette: Improve accessibility of editor search panel #144 decides the mechanism.docs/protocol.md §6, linked to fix(deps): update rust crate leptos to v0.8.22 #77.binary#binarymodernc.org/sqlite), so CGO_ENABLED=0 builds a fully static binary. Phase 5: tag event bodies must travel with the event #182 verified one: a 21 MB linux/arm64 ELF, "statically linked". The shipped artifacts are not static, by choice. The nix package uses the nixpkgs cgo default and is wrapped with a PATH suffix, and the Containerfile keeps CGO_ENABLED=1. Whether to ship static is a policy question owned by Update dependency happy-dom to v21 [SECURITY] #136: pure-Go os/user reads /etc/passwd rather than NSS/LDAP, and the pure-Go resolver bypasses NSS modules -- on Linux only; on macOS CGO_ENABLED=0 changes nothing, since Go 1.20 uses the system resolver and user database there without cgo. The page states what is shipped, not what is possible, and never says os/user or net prevent a static build.docs/dependencies.md table: git for the repo/worktree scopes (git rev-parse, internal/config/scope.go:152-159; GIT's in-flight native resolution may remove this dependency, so re-check when it merges); deno/bun/node for run/exec only (call, ls, types, catalog and search work without one); the configured servers.git, deno, bun-bin and nodejs to PATH (--suffix, package.nix:96-104), so a runtime already on the user's PATH wins.pkgs/mcpx/Containerfile (added in Phase 5: tag event bodies must travel with the event #182; docs/container.md). It is Debian bookworm-slim, ships bun, and sets MCPX_SCRIPT_RUNTIME=bun. The page links docs/container.md rather than restating it, because GIT is still changing the container.0.1.0 (package.nix:19, :61; cmd/mcpx/main.go:18). Release and install channels belong to amd host fails at evaluation: no outputHashes for p2panda-core-0.7.1 #158. This page only states what the binary needs.scripts#scriptThe page a script writer lives on:
AGENTS.md "Script contract"; story.md "The script contract"): stdout is the result, stderr is diagnostics; a default export is the entry point; --export <name> spreads arguments; emit() streams; log.info("…{x}", {x}); --json gives one envelope..mcpx/scripts/<name>.ts, searched upward, then ~/.config/mcpx/scripts/, nearest wins; mcpx scripts lists them and marks shadowed ones..raw for the envelope, ToolError on isError.script.runtime, --runtime). Node runs only erasable TypeScript: an enum fails. --typecheck / script.typecheck runs deno check and only applies on Deno. Link Update dependency @playwright/test to v1.64.1 #79.faq#is-it-safe (⚡ Bolt: Optimize msgpackr structuredClone #149).exec.where, linking modes#client-modes.mcpx diagnose, and the automatic preflight (diagnose.preflight).// @param), and pointers onward to the launcher and placeholders (Bump build/buck/preludes/buck2-prelude from 3a02ea3 to c77fc97 #7), artifacts (docs/exec.md, Bump openssl from 0.10.54 to 0.10.55 in /sources/pavex/examples/realworld #40) and mcpx prompt.http-api#v1/v1/openapi.json (🎨 Palette: Improve accessibility of editor search panel #144), ideally produced without a daemon (Finding 2's recommendation).curl --unix-socket <sock> http://mcpx/v1/health, or the TCP port); the X-Mcpx-Settings header for call-scoped settings; GET /v1/events as SSE with ?since=N; which operations are admin (Op.Admin); request body limits (http.*).http-api#v1-sdkThere is no /v1 SDK beyond the plugin's unpublished DaemonClient.
Approaches:
internal/api/ops.go's header comment exists to prevent. It also carries release and packaging cost per language before there is one outside user.DaemonClient as the TypeScript SDK. It already exists, is tested (daemon.test.ts) and knows the discovery ladder, which no generated client will. But it is Bun-first (fetch(url, {unix})), only 22 of the 60 operations have typed methods, and its natural home is the harness-free core in Update Rust crate anyhow to 1.0.75 #48, not a general SDK. Worth doing as part of Update Rust crate anyhow to 1.0.75 #48, not as the answer to this item./v1/openapi.json with standard tools, and test it. Name the tools: openapi-typescript + openapi-fetch, openapi-generator, oapi-codegen for Go, openapi-python-client. Show the one mcpx-specific step: most generated clients assume a TCP base URL, so use daemon.port or MCPX_ENDPOINT, or a transport that can dial a unix socket. A CI job generates one client and compiles it against the current spec, so the promise cannot rot (docs checks; see the testing trackers under Bump github/codeql-action from 2 to 3 #91 (CI pipeline Bump golang.org/x/crypto from 0.16.0 to 0.17.0 in /sources/launcher #95, integration/environments Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /sources/chat #97)). It adds no new code to maintain, works for every language at once, and stays correct because the spec is generated. Mention DaemonClient (B) as the option for harness plugins.Warning for the page: mcpx schema --format openapi describes tools, while /v1/openapi.json describes the daemon. A reader who feeds the wrong one to a generator gets a working client for the wrong thing. Say so in a callout.
Commands() with a dispatch-parity test? Some of them (openapi, adapter) may be meant as plumbing. Then Command needs a Plumbing/hidden group, not an omission.mcpx openapi to the daemon spec, or remove it in favour of mcpx schema plus /v1/openapi.json?AGENTS.md says run arguments "arrive in Deno.args". The scripts page needs the rule for bun and node. Is Deno.args shimmed on those runtimes, or does a default export's main(args) cover it?Docs checks run in CI; see the testing trackers under #91 (CI pipeline #95, integration/environments #97).
Ease M (the prose is mostly assembly from existing docs; the two generated pages wait on #144 and on the Finding 1 fix) · Impact high: these are the pages people use daily, and Findings 1-2 make generated reference wrong if left alone · Depends on / related: #94, #76, #77, #79, #7, #40 (closed, fixed in #57), #48, #80, #83, #146, #148, #149, #144, #145, #158, #159 (Findings 1, 2 and 4 are filed there as items 1, 3 and 12), #136 (static-binary policy)
Security/auth deferred; see tracker.
History carried over from dezren39/darwin-nix#147 (verbatim, oldest first):
@dezren39 · 2026-09-30T07:20:27Z
Integration pass. Placed in the DAG rooted at #181.
@dezren39 · 2026-09-30T11:58:48Z
Issues pass (2026-09-30, at 05c78b2). I edited the body in place. The page plan and the /v1 SDK approaches are unchanged.
binary#binary was wrong about static linking. It said "One static Go binary, CGO-free". That sentence now separates what is possible from what ships. CGO_ENABLED=0 gives a fully static binary (verified in Phase 5: tag event bodies must travel with the event #182). The shipped nix package uses the nixpkgs cgo default and the Containerfile keeps CGO_ENABLED=1, both by choice. The policy question (NSS os/user, the pure-Go resolver and macOS/VPN DNS) belongs to Update dependency happy-dom to v21 [SECURITY] #136. The page must never say os/user or net prevent a static build.pkgs/mcpx/Containerfile / docs/container.md and links it rather than restating it, because GIT is still changing it. The nix wrapper appends runtimes to PATH (--suffix), so it no longer reads as "puts them on PATH".daemon/ops.go:28-38) and held to the table by parity_test.go:21. The abstract-interfaces diagram must not show the route as generated.git dependency: internal/config/scope.go:152-159 still shells out to git rev-parse. GIT's in-flight native resolution may remove this, so re-check it when that merges.DaemonClient is at daemon.ts:338 (still 22 typed methods) and parseFlags at root.go:52-67. Checked and unchanged: the 32/39 command counts, the three OpenAPI documents, go.mod:5-11, the four protocol revisions, and bare invocation./v1/complete or plugin-spawning errors.@dezren39 · 2026-09-30T12:17:26Z
Issues pass (2026-09-30, architect follow-up). The binary-page note said the pure-Go resolver ignores the macOS resolver. It does not: since Go 1.20, net and os/user on macOS use the system resolver and user database without cgo (https://go.dev/doc/go1.20#cgo), so CGO_ENABLED=0 changes nothing there. The trade-off is Linux-only; the sentence now says so.
🤖 Agent note · picked up
🤖 Agent note · done — triage verdict: scope CONFIRMED with corrections — all four findings' code prerequisites are already resolved on current main; implementation split into sub-issues #2108 / #2109 with packets 3063 / 3064
pkgs/mcpx/docs on main has no interfaces/cli/mcp/binary/scripts/http-api pages.82b019a0 (2026-10-29, via GitHub API) — the body's "Current state" is stale in the pages' favour:
internal/cli/parity.go generates docs/parity.md and its guard set includes TestEveryDispatchedCommandIsDeclared — dispatch and declaration are held equal by test.internal/cli/openapi.go is now generated from the /v1 operation table, the settings registry and the MCP tool list; its header comment records the stale hand-written serve-surface document it replaced. The /v1 spec is producible with no daemon running, as this issue recommended.05c78b2 and have moved twice since), never hand-copy generated tables, and the mcpx docs: markdown emitters in the binary and a drift check for every generated page #1846-fragment rule for split B.🤖 Agent note · picked up
pkgs/mcpx/scripts/openapi-sdk-check.sh already pushed on branch queue/8022-1851-sdk-gen-check (787476d, verified locally by the prior slice: 87 paths, oapi-codegen v2.4.1, go build pass). Remaining: wire the script into .github/workflows/mcpx.yml, demonstrate failure on a broken spec, open a PR, and post evidence on issue mcpx docs: interface pages -- abstract and client interfaces, CLI, MCP, binary, script, /v1 and the SDKs #1851.queue/8022-1851-sdk-gen-checkMerge pull request #4959 from developing-today/queue/8022-1851-sdk-ge…
🤖 Agent note · done — SDK-generation CI proof landed in PR #4959 (merged, merge commit e7510b9)
pkgs/mcpx/scripts/openapi-sdk-check.sh now generates a full client (models + client) from the current /v1/openapi.json with pinned oapi-codegen v2.4.1 and go builds it; .github/workflows/mcpx.yml runs the script in the basic: lint job's existing nix develop .#mcpx-lint block next to go vet/gofmt.server path template variable to serverName (it redeclared oapi-codegen's server string builder parameter on /v1/call/{server}/{tool} and /v1/writes/{server}/clear; a template variable name is a label, not URL structure), and the generator config sets output-options.client-type-name: APIClient (the spec's Client enum constant collided with the generated Client struct). The published spec is untouched.go build pass; generated package also go vet clean). Fail — the same script against a deliberately broken spec (response schema $ref to a nonexistent DoesNotExist schema via a stub mcpx) exits 1 at generation (failed to load OpenAPI specification). Shellcheck (-x -P SCRIPTDIR --severity=warning): clean.mcpx workflow is currently disabled_manually in Actions, so PR feat(mcpx): OpenAPI SDK-generation CI proof — generate + compile a client in CI (#1851 remainder) #4959 got no live lint run; the only PR check, basic: production line limit (2500), was still pending at merge (unrelated line-count guard; this change is +50/−15 across 2 files). The check runs on the next enabled mcpx run touching pkgs/mcpx/**. Codex review on PR feat(mcpx): OpenAPI SDK-generation CI proof — generate + compile a client in CI (#1851 remainder) #4959 failed on Codex usage limits and posted zero findings — disposition recorded on PR feat(mcpx): OpenAPI SDK-generation CI proof — generate + compile a client in CI (#1851 remainder) #4959.🤖 Agent note · picked up
🤖 Agent note · done
/v1/openapi.json and compile it in CI) — PR docs(mcpx): level-2 MCP and /v1 (http-api) pages B (#2109) #2484 documents Approach C generation but adds no such proof, and a fresh gh search this shift found no issue or task covering it.repo-health:v1:fix:developing-today/code:issue:1851, packet packet-1851-sdk-ci.json in the goal hidden_files): design the CI check deliberately (it does not fit the Go-docs-test pattern), pin the generator, prove it fails on spec drift, post evidence here. mcpx docs: interface pages -- abstract and client interfaces, CLI, MCP, binary, script, /v1 and the SDKs #1851 stays open until task 8022 lands, then closes — its page work is complete.