Title: mcpx docs: plugin pages -- plugins, compatibility, interface and config, opencode v1 and v2, vibeMcp · Issue #1855 · developing-today/code · GitHub
Open Graph Title: mcpx docs: plugin pages -- plugins, compatibility, interface and config, opencode v1 and v2, vibeMcp · Issue #1855 · developing-today/code
X Title: mcpx docs: plugin pages -- plugins, compatibility, interface and config, opencode v1 and v2, vibeMcp · Issue #1855 · developing-today/code
Description: Relocated from dezren39/darwin-nix#148 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/ni...
Open Graph Description: Relocated from dezren39/darwin-nix#148 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 referenc...
X Description: Relocated from dezren39/darwin-nix#148 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 refe...
Opengraph URL: https://github.com/developing-today/code/issues/1855
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx docs: plugin pages -- plugins, compatibility, interface and config, opencode v1 and v2, vibeMcp","articleBody":"Relocated from dezren39/nix#148 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).\n\nParent: #94\n\n## Summary\n\nThis issue covers the level-2 plugin pages: plugins, plugin compatibility, plugin interface & config, the opencode v1 plugin, the opencode v2 plugin, and vibeMcp. Anchors are under `plugins#…` in #146's page map. The pages may split into a plugins index plus an `opencode` page, with the same anchors either way.\n\n\"Plugin\" means two different things in this project, and the pages must say which one each section means:\n\n| meaning | direction | exists today | where it is designed |\n| --- | --- | --- | --- |\n| **harness plugin**: code that plugs mcpx *into* an agent harness (the opencode plugin) | a consumer of mcpx | yes: `plugin/opencode/` | this issue; #47, #48 |\n| **mcpx plugin**: an extension *of* mcpx (Go, binary, script or remote plugins, hooks, variables) | extends mcpx | no: \"There is no plugin concept in the daemon at all\" (#80) | extensibility theme: #80, #82, #83 |\n\nNearly everything in the notes' plugin lines is about the first meaning. \"vibeMcp\" appears nowhere in the repo, and its meaning is the first open question.\n\n## Original notes\n\nSource-notes lines 1, 2, 7, 49-52 (parents) and 72-77 (this issue). The lines in between are quoted in sibling issues.\n\n> - documentation\n> - make a book using whatever is the most common and simple modern choice\n> - 3 main things, not book sections jsut like levels of detail-\n> - the 'ok i just installed this thing what even is it' layer\n> - basically a more normal set of docs\n> - new person might assume this is all there is and wont be upset\n> - a page or section in a page for\n> - plugins\n> - plugin compatibility\n> - plugin interface & config\n> - opencode v1 plugin\n> - opencode v2 plugin\n> - vibeMcp\n\n## Current state (what mcpx does today, with file refs)\n\nPaths are relative to `pkgs/mcpx/` on `main` (`d0b7e01`); re-checked at `05c78b2` in the 2026-09-30 issues pass, after #171 changed the plugin settings.\n\n- **What ships:**\n - `plugin/opencode/mcpx-session.ts`, the opencode adapter: hooks, tools, toasts, session id.\n - `plugin/opencode/mcpx/daemon.ts`, the portable core: `DaemonClient`, the discovery ladder, the remembered-choice file. It imports nothing from opencode.\n - `mcpx-tui.tsx`, an optional TUI picker.\n - Four skills: `mcpx-basics`, `mcpx-observability`, `mcpx-browser`, `mcpx-daemon`.\n\n Source: `plugin/opencode/README.md` \"The files\".\n- **How it is installed:** by hand with `cp -R` into `~/.config/opencode/plugin/`, and `mcpx/` must stay a subdirectory (README \"Install\"). Nothing in `~/.config/nix` outside `pkgs/mcpx` references it (`git grep mcpx-session origin/main` finds nothing), so the Nix config does not install it.\n- **Versions:** opencode v1 is `1.18.31`; the v2 CLI `opencode2` is `2.0.3` (`docs/opencode-plugin.md` §1). v1 plugins do not load in v2 (#47). v1.18.31 runs both plugin systems, so a v2 plugin file dropped into v1 is loaded by the v2 host and rejected, harmlessly, by the v1 loader (§1).\n- **No binary needed:** the plugin needs no `mcpx` on `PATH` (#44, closed, fixed in #53). It reaches the daemon over the unix socket. It spawns `mcpx --json status` only at rung 4 of discovery, the last fallback, used when a binary exists and the daemons are too old to answer `GET /v1/resolve` (`plugin/opencode/README.md:99-112`, `plugin/opencode/mcpx/daemon.ts`). `backend: v1` never spawns, and `bin: \"\"` forbids spawning (README:83-85). The pages say \"never needs the binary\", not \"never runs it\".\n- **Two sources for plugin configuration** (as written at `d0b7e01`, struck where #171 changed it):\n - ~~The registry has 9 `plugin.*` settings: `backend`, `bin`, `binArgs`, `discoveryRetry`, `env`, `instructions`, `skills`, `toolTiming`, `tools` (`docs/configuration.md` \"plugin\").~~ At `05c78b2` the registry has **10**: those minus `skills` (deleted, since nothing registers skills), plus `remember` and `annotate` (added) (`internal/settings/plugin.go`; `docs/configuration.md:346-355`).\n - The README's options table has 13 (`plugin/opencode/README.md:79-93`). ~~Six of them are not `plugin.*` settings: `endpoint` and `socket` (mapped to `MCPX_DAEMON_ENDPOINT`/`MCPX_ENDPOINT` and `MCPX_SOCKET`), `remember`, `daemonTools`, `annotate`, `headless`.~~ Four of them are not `plugin.*` settings: `endpoint` and `socket` (mapped to `MCPX_DAEMON_ENDPOINT`/`MCPX_ENDPOINT` and `MCPX_SOCKET`), `daemonTools` and `headless`. #171 allowlisted all four with a reason each (`pluginEnvAllowed`, `internal/settings/consumed_test.go:188-200`). `headless` and `daemonTools` have defaults computed at boot, so a declared default would be wrong in one realm.\n - `discoveryRetry` is in the registry, and since #171 actually read (`mcpx-session.ts:196`), but is still missing from the README table. ~~`skills`~~ is gone.\n - `docs/configuration.md:85-86` says \"The plugin reads `process.env` directly, so the variable names are the contract between the two and a test pins them\". ~~The test pins only the registry's names.~~ Since #171 this holds in both directions. `TestEverySettingIsReadSomewhere` requires every `plugin.*` variable to appear in the plugin's sources, and `TestThePluginReadsNoUndeclaredSetting` (`consumed_test.go:209`) fails on any variable the plugin reads that is neither a setting nor allowlisted. What no test pins is the README table itself.\n- **Stale variable name:** `docs/opencode-plugin.md:406` (§6) says the plugin sets \"`MCPX_SESSION`, `MCPX_CALL` and friends\". The code sets `MCPX_SESSION_ID` (`mcpx-session.ts:670`), `MCPX_CALL_ID` (`:677`) and `MCPX_PARENT_SESSION_ID` (`:713`), which are the names `session` and `parent-session` scopes read (story.md \"Sharing and scope\"). The pages use the code's names. This is a doc fix only. `MCPX_SESSION` is a different, live variable: mcpx sets it for each script and the generated client reads it (`internal/codegen/emit.go:253`). It must not be renamed. `MCPX_CALL` exists nowhere (#159 item 13, struck and corrected).\n- **Other harnesses:** codex, claude code, pi and manus have no plugin. #48 designs a harness-free core plus adapters. `docs/opencode-plugin.md` §5 lists what an adapter must provide. Only (1) a directory and (2) a session identifier are required; everything else degrades.\n- **Commands referenced below** that are dispatched but missing from `Commands()`: `mcpx api` and `mcpx adapter` (see #147 Finding 1). All others are in `Commands()`.\n\n## Content per item\n\n### `plugins#plugins`\n\n**Approaches: naming the two meanings.**\n\n- **A (least recommended): use \"plugin\" for both and rely on prose to tell them apart.** A reader who arrives from a search engine at \"plugin config\" has no way to know whether it is about opencode or about extending mcpx. The confusion then spreads into issues, and into the agent twin (#120), where an agent will happily mix them up.\n- **B (middle): rename one of them everywhere, for example harness plugins become \"integrations\",** including `plugin/` in the repo. This is clear, but it fights every harness's own vocabulary (opencode calls them plugins, and so will its users). It also needs a code-and-path rename that belongs to #48, not to docs.\n- **C (recommended): keep the word and qualify it every time.** The page is titled \"Plugins\" and has two top-level sections: **\"Harness plugins: mcpx inside your agent\"** and **\"mcpx plugins: extending mcpx\"**. The second is a short status stub (\"not built; designed in #80\") until #80 lands. A glossary entry and a one-line callout at the top of every plugin page say which meaning the page uses. This matches the words users will search for, needs no rename, and scales when #80 ships.\n\n**Content** for the harness-plugin section:\n\n- **What a harness plugin adds, and that it is optional.** Any harness with a shell can use mcpx through `AGENTS.md` alone. The plugin adds:\n - the session id, so `session`-scoped servers persist across commands (README \"Why\");\n - the socket fast path (0.17 ms versus a 23 ms spawn);\n - optional tools, a system-prompt line, timing records and the daemon picker.\n- **Hosts that only speak MCP** need no plugin: `mcpx serve --transport stdio` or `/mcp`, linking `modes#server-modes` (#146).\n\n### `plugins#plugin-compatibility`\n\nA matrix. Every cell cites a source or says \"unknown\", with nothing guessed:\n\n| harness | plugin | how mcpx reaches it today | session id | source |\n| --- | --- | --- | --- | --- |\n| opencode v1 (1.18.31) | yes, `plugin/opencode` | plugin, or shell + `AGENTS.md` | injected by the `shell.env` hook | README; `docs/opencode-plugin.md` §2, §6 |\n| opencode v2 (2.0.3) | no: v1 plugins do not load | shell + `AGENTS.md`, or mcpx as an MCP server in its `mcp` config | not injected; needs the v2 session environment API (#47) | `docs/opencode-plugin.md` §4; #47 |\n| codex | no | shell + `AGENTS.md`; MCP | unknown | #48 |\n| claude code | no | shell + `AGENTS.md`; MCP | unknown | #48 |\n| pi | no | unknown | unknown | #48 |\n| manus | no | unknown | unknown | #48 |\n| any MCP host | not needed | `/mcp` or stdio | none (MCP carries no harness session) | #147 `mcp#mcp` |\n\nAlso one runtime note from the README: the core dials the socket with Bun's `fetch(url, {unix})`. A Node-based harness has to use `MCPX_DAEMON_ENDPOINT` and the TCP listener instead.\n\n### `plugins#plugin-interface-and-config`\n\nTwo interfaces and one configuration surface:\n\n1. **Plugin to harness.** The four opencode hooks mcpx uses (`docs/opencode-plugin.md` §2.2), and what each one degrades to without it (§6).\n2. **Plugin to daemon.** `DaemonClient` / `connect()`, and the discovery ladder (`plugin/opencode/README.md:104-112`): 0 a named endpoint or socket; 1 the choice remembered for this directory; 2 the `daemon-*.json` info files (the usual case, no binary); 3 `GET /v1/resolve`; 4 spawn `mcpx --json status`, the only rung that runs the binary, used as a last fallback and never under `backend: v1` or `bin: \"\"`; 5 ask the user; 6 the best candidate, with a warning (`docs/plugin-discovery.md` §2-§5).\n3. **For authors of plugins for other harnesses:** the adapter contract (§5's six items, two of them required). This is what #48 builds on.\n4. **Configuration:**\n - precedence is plugin option > environment variable > default;\n - options reach the plugin only when it is named in opencode config as a two-element array (README \"Passing options\");\n - the options table must be generated from one list.\n\n **Approaches for that one list** (revised 2026-09-30: #171 settled part of this. It registered `remember` and `annotate`, deleted `skills`, and allowlisted the other four with reasons. The original C, \"declare every plugin option in the registry\", is kept below as B because #171 rejected it for two of the four):\n - **A (least): the README table stays the source.** It already disagrees with the registry: it omits `discoveryRetry`.\n - **B (middle): register the remaining four too** (the original recommendation): `endpoint` and `socket` as aliases of `daemon.endpoint` and a socket setting, and `headless` and `daemonTools` as settings. The existing plugin-variable test then pins all of them, and #144 generates the table. The cost is the one #171 recorded: `headless` and `daemonTools` default to something computed at boot, so any declared default is wrong in one of the two realms the plugin runs in. `MCPX_SOCKET` is also read before any settings exist.\n - **C (recommended): generate the table from the registry's `plugin.*` settings plus a declared list of the non-setting options.** Move `pluginEnvAllowed` out of the test into a non-test declaration that gives each entry its option name, variable, default description and effect. The test and the generator both read it. That declaration is the plugin slice of #172's table of non-setting variables, so use #172's shape rather than inventing one. This keeps #171's reasoning, needs no behaviour change, and makes the README and docs table impossible to leave incomplete, which is exactly how `discoveryRetry` went missing.\n\n### `plugins#opencode-v1-plugin`\n\nWhat ships today:\n\n- the files, the install commands and why `mcpx/` must stay a subdirectory;\n- skills installation;\n- options via config;\n- what gets injected (README \"What gets injected\"; `minimal`/`standard`/`full` via `plugin.env`);\n- the tools: `mcpx_discover`, `mcpx_exec` and `mcpx_observe`, off by default because each adds a tool to every request; plus the daemon tools;\n- `instructions`, `toolTiming`, trace ids, the TUI picker.\n\nOne paragraph on interplay with opencode's own code mode (`OPENCODE_EXPERIMENTAL_CODE_MODE`, #149 `faq#opencode-code-mode`): the two do not conflict, and the plugin needs nothing in opencode's `mcp` config.\n\nInstall friction is real: `cp -R` by hand, and the Nix config does not install it. Open question 4 asks whether the page should promise a packaged install.\n\n### `plugins#opencode-v2-plugin`\n\n**Approaches: documenting something not yet built.**\n\n- **A (least recommended): leave it out until #47 ships.** The notes list it, and a v2 user who lands on the plugin pages would find nothing about their version, not even that nothing exists.\n- **B (middle): document the planned design** (the §4 lists: unnecessary / possible / breaks / same). This is accurate as a design, but it reads as a feature, and a reader will try it.\n- **C (recommended): a short status section.** It says: \"Not built; tracked in #47. On opencode v2 today:\"\n 1. shell + `AGENTS.md` works, with no session id, so `session`-scoped servers are isolated per call;\n 2. alternatively add `mcpx serve --transport stdio` to v2's `mcp` config.\n\n It also states what the rewrite will change, in four bullets taken from §4, and links the compendium (#152) for the full design.\n\n One caveat for option 2: v2 defaults MCP servers to code mode, so mcpx's own tools end up wrapped inside v2's code mode. `OPENCODE-V2.md` records that v2 ships `mcp-codemode-defaults.ts` to turn that off for servers that are themselves code mode. Whether it recognises mcpx is unknown (open question 3).\n\n This is honest, useful today, and cannot be mistaken for a shipped feature.\n\n### `plugins#vibemcp`\n\nThe term does not appear in the repo, in `~/git`, or in the other notes (`rg -il 'vibe.?mcp'` finds only the notes files). A web search on 2026-09-30 found four unrelated projects with the name:\n\n| project | what it is | relevance |\n| --- | --- | --- |\n| [VibeTensor/vibemcp](https://github.com/VibeTensor/vibemcp) (`@vibetensor/vibemcp`) | a Gmail + Microsoft 365 MCP server that returns TOON rather than JSON, \"One server. Two ecosystems. Half the tokens.\" | the same concern as mcpx (tokens), addressed inside one server's output format |\n| [VibeTechnologies/vibe-mcp](https://github.com/VibeTechnologies/vibe-mcp) (`@vibebrowser/mcp`) | browser automation that lets \"multiple AI agents control the same browser simultaneously\" through a relay daemon | the Chrome problem again, solved the opposite way: a *shared* browser, where mcpx gives each session its own |\n| [VibeCodingInc/vibe-mcp](https://github.com/VibeCodingInc/vibe-mcp) (`slashvibe-mcp`) | presence and DMs between developers across coding sessions | none |\n| [Jinjos/vibe-mcp](https://github.com/Jinjos/vibe-mcp) | AI coding-rules management for `vibe-cli` | none |\n\nCandidate readings, for the user to choose from (open question 1):\n\n1. **\"Vibe-coding an MCP server\": getting tools without writing a server.** mcpx already does three versions of this:\n - a command-line program becomes tools through `paths.adapters` (`mcpx adapter`);\n - an OpenAPI document becomes tools through `mcpx api --spec` or `paths.apis`;\n - a saved script or recipe runs by name (`mcpx recipes`, `mcpx run`).\n\n Caveat: adapter and OpenAPI tools are MCP tools, not script namespaces, so they are absent from `tools.\u003cns>` (#102). #83 plans to make them first-class. If this is the reading, the page probably moves out of the plugin block, to `configuration#server-config` or an \"extending mcpx\" page.\n2. **A named external project**, most plausibly the multi-agent browser (VibeTechnologies). It would appear as a comparison, or as a server known to work behind mcpx.\n3. **Vibe-coding *with* mcpx:** the user describes a task and gets a script back (`mcpx prompt`, recipes, `POST /v1/intent`; `docs/consumer.md`).\n4. **A planned name** for an mcpx mode or product not yet written down anywhere.\n\nUntil this is answered, the page map keeps the item verbatim at `plugins#vibemcp`, and the page holds a one-line placeholder rather than a guess.\n\n## Open questions\n\n1. **What does \"vibeMcp\" mean?** One of the four readings above, or something else? This decides whether the page stays under plugins.\n2. **Plugin config source (Approach C in interface & config):** ~~register the six extra plugin options in the registry?~~ #171 registered two and allowlisted four with reasons. Is that split final? And should the README table be generated from the registry plus #172's declared list, as C proposes?\n3. **opencode v2 as an MCP host of mcpx:** does v2's code-mode default wrap mcpx's `mcpx_exec`, and should mcpx declare itself so `mcp-codemode-defaults.ts` turns code mode off for it?\n4. **Packaging:** should the v1 plugin be installable from the Nix config or a release artifact before the page describes installing it? Or does the page document the `cp -R` flow as-is (#158)?\n5. **The compatibility matrix:** who fills in the \"unknown\" cells for codex, claude code, pi and manus? #48 is where the work lives. The docs should not claim support before an adapter exists.\n\nDocs checks run in CI; see the testing trackers under #91 (CI pipeline #95, integration/environments #97).\n\n## Ease · Impact · Related\n\n**Ease** S-M (mostly assembly from `plugin/opencode/README.md` and `docs/opencode-plugin.md`; the config table waits on the registry decision; vibeMcp waits on the user) · **Impact** med: it matters to every opencode user and to anyone porting to another harness · **Depends on / related:** #94, #44 (closed, fixed in #53), #47, #48, #80, #82, #83, #102, #88, #146, #147, #149, #144, #158, #152, #153, #159 (item 9: the plugin option sources; item 13: the `MCPX_SESSION` doc line), #172 (the declared list of non-setting variables that Approach C builds on)\n\nSecurity/auth deferred; see tracker.\n\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-28T22:04:56Z","url":"https://github.com/developing-today/code/issues/1855"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:088adb0c-8f1c-30ca-1d14-38d840bb546a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A61C:3D2C49:354371:45F982:6B0617F4 |
| html-safe-nonce | e4376fe117683710370fd014dc37fd2fa3b6ce860062c2105a5c9941075cd660 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjFDOjNEMkM0OTozNTQzNzE6NDVGOTgyOjZCMDYxN0Y0IiwidmlzaXRvcl9pZCI6IjM0MzE5OTI2NDg3MjUzMDUzMzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 8f77fd19311db4abc0d948be4e54bafbd2a705d422899e4743170e773f4ab898 |
| hovercard-subject-tag | issue:6088337851 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/1855/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5f699f31b96304aeec92a95788870b9d49e82d36773d6314bc4f6614b92c46da/developing-today/code/issues/1855 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5f699f31b96304aeec92a95788870b9d49e82d36773d6314bc4f6614b92c46da/developing-today/code/issues/1855 |
| og:image:alt | Relocated from dezren39/darwin-nix#148 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 referenc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 866f202ebf7ac5aff8f633417d9fd8a53818a977 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width