Commit 47018e5
fix(opencode): disable repo-level MCP entry by default + venv-python fallback (#108)
* fix(opencode): use .venv/bin/python in repo MCP config so spawn doesn't fail
Upstream PR MemPalace#1567's `.opencode/opencode.json` uses bare `python -m
mempalace.mcp_server`. That only works if mempalace is installed in
the python that resolves on PATH — which on JP's box (and any
uv-managed clone) it isn't, because mempalace lives in the editable
`./.venv/` and PATH-resolution finds system python instead.
Result: opencode launched from the repo root tries to spawn the
local MCP server, fails with `MCP error -32000: Connection closed`
+ a ModuleNotFoundError on mempalace, and logs ERROR every session.
The user-level `~/.config/opencode/opencode.jsonc` wrapper still
works in parallel, but the repo-level entry is noisy and broken.
Switch to `.venv/bin/python` — relative path, resolves against the
opencode cwd (the repo root), works for every contributor who ran
`uv sync` (which the README already tells them to do).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(opencode): disable repo-level MCP entry by default — avoid double-server
A user-level `~/.config/opencode/opencode.jsonc` with a daemon-routed
wrapper is the canonical way to wire mempalace on this fork. When the
repo-level `.opencode/opencode.json` is ALSO enabled and points at a
local `mempalace.mcp_server` spawn, opencode connects to BOTH:
- user wrapper → palace-daemon at disks.jphe.in:8085 (309K production
drawers, healthy)
- repo subprocess → `~/.mempalace/palace` (legacy katana store, 24K
drawers, HNSW capacity divergence — 63% invisible to vector search)
Result: opencode's UI surfaces 'HNSW capacity divergence' + 'routing
to BM25 fallback' INFO-stderr lines that look like errors, and any
mempalace_* tool call non-deterministically lands on whichever server
opencode picked.
Flip `enabled` to false on the repo entry so the user-level wrapper
is the sole source of truth. Contributors who want a local-only
spawn (no daemon set up) flip back to true; the previous commit
already pointed the spawn at `.venv/bin/python` so it works for them
when uv-managed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6ca0670 commit 47018e5
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | | - | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
0 commit comments