You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP shim: --tools all returns only 7 tools due to IMPLEMENTED_TOOLS hardcode #234
agentmemory mcp --tools all (and AGENTMEMORY_TOOLS=all env var) silently returns only 7 tools instead of 51. The issue is in src/mcp/standalone.ts — even though getVisibleTools() correctly returns all 51 when mode is "all", the result is filtered through a hardcoded IMPLEMENTED_TOOLS set of 7 tool names.
Even with --tools all, getVisibleTools() returns all 51, then the filter reduces it to 7.
Impact
Every non-Claude-Code user (OpenCode, Cursor, Gemini CLI, Cline, etc.) is affected. Users get 7 tools and have no path to the remaining 44 (actions, graphs, signals, sentinels, slots, lessons, etc.) without writing a custom HTTP→stdio bridge.
Proposed fix
When in proxy mode (detected server via AGENTMEMORY_URL), delegate tools/list to the server: GET <base>/agentmemory/mcp/tools and return its response directly, bypassing the local filter. The server already has all 51 tools registered.
Thanks @cl0ckt0wer — root cause is exactly right. Confirmed:
src/mcp/standalone.ts hardcodes a 7-name IMPLEMENTED_TOOLS set
tools/list filters getVisibleTools() through that set even when AGENTMEMORY_TOOLS=all is configured
Result: every non-Claude-Code MCP client gets 7 tools regardless of the config flag
Fix is in #238 — switches tools/list and validate() to proxy-aware behavior: when running against a reachable server (AGENTMEMORY_URL set + livez ok), delegate to the server's tool list (gets all 51), with a fallback to the local 7-tool list when the server is unreachable. Has tests covering the proxy path including auth-header passthrough.
I've already approved #238 — holding for @rohitg00 to land. Once it does, will close this with the merge.
Good catch on the impact framing too — every non-Claude-Code user (OpenCode, Cursor, Gemini CLI, Cline) was hitting this silently.
It appear that version 0.9.6 didn't work because I'm seeing only 4 tools. If I'm reading the github comments right then it would have been fixed in version 0.9.6.
I'm running VS Codeium in Flatpak with the MCP server in RooCode.
It seems that the RooCode MCP startup is able to escape the flat pack though because the place where I find it running the AgentMemory MCP server is on the host. So that seems to go well.
So I check on the host and see this version:
$ npm exec @agentmemory/mcp --version
10.9.7
And I get these four tools whether or not I have the regular process running on the host, which was very confusing until I figured out or remembered that you've got a Docker container. So that makes sense that it's coming from the Docker container:
I'm not sure how to check the version inside of the Docker container which is actually pod man on my machine because I can't find bash or sh inside but I assumed that this should be up to date and the bug would be fixed right?
@jcalfee thanks for the detail — the 4-tool count is the smoking gun. Two things going on:
1. Version check is misleading npm exec @agentmemory/mcp --version reports 10.9.7 because --version is consumed by npm itself (your npm CLI version), not the package. To check the package version:
npx -y @agentmemory/mcp@latest 2>&1| head -3
# or
npm view @agentmemory/mcp version
Both should show 0.9.6.
2. The 4 tools come from the container, not the shim
The shim flow is:
The last startup was a bit strange that it had to re-install:
user@s1max:~/dev/vendor/stt (master)
$ AGENTMEMORY_TOOLS=all npx @agentmemory/agentmemory
Need to install the following packages:
@agentmemory/agentmemory@0.9.6
Ok to proceed? (y) y
┌ agentmemory
which: no iii in (/home/user/.npm/_npx/076f5982d055bff5/node_modules/.bin:/home/user/dev/vendor/stt/node_modules/.bin:/home/user/dev/vendor/node_modules/.bin:/home/user/dev/node_modules/.bin:/home/user/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/usr/lib/node_modules_22/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/user/.cargo/bin:/home/user/.local/share/mise/installs/http-mise-inpower/1.0.0:/home/user/.local/bin:/home/user/bin:/usr/local/bin:/usr/bin:/run/host/usr/bin:/run/host/sbin:~/dev/ipall/bin:node_modules/.bin:../node_modules/.bin:../../node_modules/.bin:../../../node_modules/.bin:../../../../node_modules/.bin:~/.cargo/bin:~/dev/ipall/bin:node_modules/.bin:../node_modules/.bin:../../node_modules/.bin:../../../node_modules/.bin:../../../../node_modules/.bin:~/.cargo/bin)
│
◇ Docker compose started
│
◇ iii-engine is ready
[agentmemory] Starting worker v0.9.6...
[agentmemory] Engine: ws://localhost:49134
[agentmemory] Provider: openrouter (anthropic/claude-sonnet-4-20250514)
[agentmemory] Embedding provider: openrouter (1536 dims)
[agentmemory] REST API: http://localhost:3111/agentmemory/*
[agentmemory] Streams: ws://localhost:3112
[OTel] Traces initialized: engine=ws://localhost:49134, service=agentmemory
[OTel] Metrics initialized: interval=30000ms
[OTel] Global fetch instrumentation enabled
[OTel] Logs initialized: delay=100ms, batch=1
[agentmemory] Consolidation pipeline: registered (CONSOLIDATION_ENABLED=false)
[agentmemory] Auto-compress: OFF (default, #138) — observations indexed via zero-LLM synthetic compression. Set AGENTMEMORY_AUTO_COMPRESS=true to opt-in to LLM-powered summaries (uses your API key).
[agentmemory] WARNING: AGENTMEMORY_INJECT_CONTEXT=true — the PreToolUse and SessionStart hooks will inject up to ~4000 chars of memory context into every tool turn. On Claude Pro this burns session tokens proportional to your tool-call frequency (see #143). Set AGENTMEMORY_INJECT_CONTEXT=false to disable.
[agentmemory] v0.6 advanced retrieval: sliding-window, query-expansion, temporal-graph, retention-scoring
[agentmemory] Orchestration layer: actions, frontier, leases, routines, signals, checkpoints, flow-compress, mesh, branch-aware, sentinels, sketches, crystallize, diagnostics, facets
(node:476815) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[iii] Worker registered with ID: 683ce8e0-136a-43f7-8a28-78790cd6e9e5
[OTel] Connected to engine at ws://localhost:49134/otel
[agentmemory] Ready. Triple-stream (BM25+Vector+Graph) search active.
[agentmemory] Endpoints: 107 REST + 51 MCP tools + 6 MCP resources + 3 MCP prompts
[agentmemory] Auto-forget: enabled (every 60m)
[agentmemory] Lesson decay sweep: enabled (every 24h)
[agentmemory] Viewer: http://localhost:3113
You're right — my "rebuild the container" advice missed the actual root cause. Re-read the trace carefully now. Server is fine; the shim is what's degraded. Walking through what your output proves:
Shim side: silently in local mode.@agentmemory/mcp v0.9.6 has a two-mode flow (src/mcp/rest-proxy.ts):
probe GET http://localhost:3111/agentmemory/livez (500ms timeout)
probe OK → proxy mode → forward tools/list to server → 51 tools
probe fails → local mode → return IMPLEMENTED_TOOLS (7) from src/mcp/standalone.ts:16
You see 7 tools in Roo Code, so the shim instance Roo Code spawned is in local mode. The probe failed for that process — even though it works from your host shell.
Likely cause: Roo Code spawns the shim inside the VS Codeium Flatpak sandbox. Even though Flatpak normally shares the host network namespace, two things commonly break the probe:
VS Codeium's Flatpak manifest restricts --share=network or routes localhost to a sandboxed loopback
The 500ms probe timeout is aggressive for first-call cold-start inside the sandbox
The probe error is currently swallowed (catch {} in rest-proxy.ts:39), so there's no log line telling you what happened — that's a shim DX bug I'll fix.
Confirm the diagnosis — run this from inside the Flatpak (not your host shell):
flatpak run --command=sh com.vscodium.codium # or whatever your VS Codeium flatpak id is# inside the sandbox:
curl -v --max-time 1 http://localhost:3111/agentmemory/livez
If that fails or hangs, the probe is being blocked at the sandbox layer.
Workarounds while I land a fix:
Option A — point Roo Code at a tunnel that the Flatpak can reach (replace localhost with the host's LAN IP, e.g. 192.168.x.x):
Then fully quit VS Codeium and re-add the MCP server in Roo Code so the shim re-probes. (Roo Code, like most MCP clients, calls tools/list once per session and caches the result; restarting Codeium isn't enough — the MCP server entry needs to be removed/re-added.)
What I'm going to land in a follow-up PR:
rest-proxy.ts — surface probe failures to stderr with URL + reason (not silent), bump probe timeout from 500ms to 2000ms.
Add AGENTMEMORY_FORCE_PROXY=1 env so sandboxed clients can skip the probe entirely.
Separate issues you flagged (filing these so they don't get lost):
Data dir empty after docker compose down — volume binding bug. Will open a separate issue.
which: no iii in ... plus reinstall every npx run — @agentmemory/agentmemory not finding the iii CLI on PATH. Separate.
Sorry for the misdirected first reply. Reopen this if the workarounds don't get Roo Code to 51 tools — I'd rather keep one thread on the shim/probe bug.
@jcalfee Found data-loss bug! Config writes to ./data/ (relative — inside container's $PWD) but volume mounts at /data (absolute). Mismatch → data goes to ephemeral layer → lost on docker compose down.
@jcalfee follow-up PR #280 — adds AGENTMEMORY_FORCE_PROXY=1 escape hatch for the Flatpak / Roo Code probe failure, plus probe-failure stderr logging, plus fixes the related volume-mount bug (state was being written to the ephemeral container layer instead of iii-data — that's why your data dir came up empty after docker compose down). Once it lands and v0.9.7 ships, try AGENTMEMORY_FORCE_PROXY=1 in your Roo Code env and you should see 51 tools.
[📦 com.vscodium.codium agentmemory]$ curl http://localhost:3111/agentmemory/mcp/tools | jq '.tools | length'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 21443 100 21443 0 0 4352k 0 --:--:-- --:--:-- --:--:-- 5235k
51
I removed the extension, stopped VSCodium, ensured there are no agentmemory process, started everything up and re-added the MCP server. Still 7 tools. It has to be in the extension format. maybe that change to reveal an error will help
Here again it's using the host network so this should show that it is going to the right server:
user@s1max:~/.npm/_npx/076f5982d055bff5/node_modules/@agentmemory/agentmemory
$ flatpak run --command=sh com.vscodium.codium
[📦 com.vscodium.codium agentmemory]$ curl -v --max-time 1 http://localhost:3111/agentmemory/livez
* Host localhost:3111 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
* Trying [::1]:3111...
* connect to ::1 port 3111 from ::1 port 46036 failed: Connection refused
* Trying 127.0.0.1:3111...
* Connected to localhost (127.0.0.1) port 3111
* using HTTP/1.x
> GET /agentmemory/livez HTTP/1.1
> Host: localhost:3111
> User-Agent: curl/8.15.0
> Accept: */*>* Request completely sent off
< HTTP/1.1 200 OK
< content-type: application/json
< vary: origin, access-control-request-method, access-control-request-headers
< content-length: 39
< date: Mon, 11 May 2026 10:07:57 GMT
<* Connection #0 to host localhost left intact
{"service":"agentmemory","status":"ok"}
AGENTMEMORY_TOOLS=all is required. AGENTMEMORY_TOOLS=all npx @agentmemory/agentmemory and in pr-280 AGENTMEMORY_TOOLS=all npm start to see the full list (certainly not on by default).
Local build of pr-280:
Adding "AGENTMEMORY_FORCE_PROXY": "1" still yields only 7 tools (expected, I think it is established that the API is already returning all 51 tools and that there is not a zombie process).
Grok looked at the list of 7 that did parse and all of the 51 in the json: "there are no inconsistencies or structural patterns in the 51-tool JSON that would cause the Roo Code plugin (or its MCP server integration) to fail parsing the other 44 tools."
I'm not confident that I would see this error if it happened:
// Lines 372-396case"tools/list": {consthandle=awaitresolveHandle();// Probes /agentmemory/livez ✓ succeedsannounceMode(handle);if(handle.mode==="proxy"){try{constremote=(awaithandle.call("/agentmemory/mcp/tools",{method: "GET",}))as{tools?: unknown}|null;if(remote&&Array.isArray(remote.tools)){return{tools: remote.tools};// ← Should return 51 tools}}catch(err){// Falls back to local mode (7 tools)process.stderr.write(`[@agentmemory/mcp] tools/list proxy failed: ${err}\n`);invalidateHandle();}}// FALLBACK: Only 7 toolsreturn{tools: getVisibleTools().filter((t)=>IMPLEMENTED_TOOLS.has(t.name))};}
There is nothing under Roo Code itself:
Also, it's not straightforward to test it by stopping everything and reloading the tool list in Roo Code MCP because, even with "AGENTMEMORY_FORCE_PROXY": "1", the MCP tool list still loads the seven tools even while the docker container is down and AGENTMEMORY_TOOLS=all npm start is not running.
The docker volume has data files in it now. Thank you!
Of course the PR is not running inside of the Flatpak environment and that's still running under NPX (npm release I presume). I'm not even I'm not too clear on how that even works because when try suggestions I'm getting about this environment is not working so well.
[📦 com.vscodium.codium agentmemory]$ flatpak-spawn --host npx -y @agentmemory/mcp
Portal call failed: org.freedesktop.DBus.Error.ServiceUnknown
Hint: --host only works when the Flatpak is allowed to talk to org.freedesktop.Flatpak
But yet the Roo Code MCP server seems to be able to do this... I do know why the Roo Code plugin succeeds while a manual command in the integrated terminal does not.
@jcalfee — I just found out, bug isn't in agentmemory/mcp at all. Roo Code itself is dropping 44 of the 51 tools before showing them to you. I have a clean repro proving the shim returns 51.
Reproduction (just ran this against #280's branch)
(51 tools + 1 serverInfo.name = 52 — confirms shim returns all 51 over the wire.)
The shim is correct. Roo Code is dropping tools after parsing them.
What's happening on the Roo Code side
Three signals point at Roo Code, not us:
You see 7 tools when docker is down. If the shim were doing it, you'd see 7 only when the shim's fallback path triggers. With docker down → engine down → livez 404 → shim falls back to 7. But with docker UP and AGENTMEMORY_TOOLS=all set, the shim returns 51 (proven above). The fact that 7 persists across both states is Roo Code caching its own MCP tool list, independent of what the shim reports.
Always exactly 7, never anything else. If Roo Code rendered what the shim sent, you'd see 51 (with server up) or 7 (with server down). The fact that the count is stuck at 7 means Roo Code is reading from cache, not from the wire.
The 7 are the IMPLEMENTED_TOOLS set, not the ESSENTIAL_TOOLS set.IMPLEMENTED_TOOLS (7) is the shim's local-fallback list; ESSENTIAL_TOOLS (8) is the server's default when AGENTMEMORY_TOOLS is unset. If Roo Code were getting the server's default, you'd see 8. The fact that you see exactly the 7 IMPLEMENTED_TOOLS strongly suggests Roo Code cached a prior (server-down) tools/list response from before you set AGENTMEMORY_TOOLS=all, and is replaying it.
What to do on your side
Clear Roo Code's MCP cache and re-add the server. The cache likely lives under one of:
# stop everything first
flatpak kill com.vscodium.codium
pkill -9 -f '@agentmemory/mcp'2>/dev/null
# nuke the Roo Code state for this workspace
rm -rf ~/.var/app/com.vscodium.codium/config/VSCodium/User/globalStorage/rooveterinaryinc.roo-cline/
# bring everything back up clean
docker compose up -d
AGENTMEMORY_TOOLS=all npx @agentmemory/agentmemory # in one shell# then start Codium and re-add the agentmemory MCP server entry
AGENTMEMORY_DEBUG=1 — shim now logs handle.mode, response shape, and tool count to stderr on every tools/list. Set it in your Roo Code env block and Roo Code will route the shim's stderr to its output panel; you'll see whether 51 or 7 is leaving the shim.
Loud stderr warning if /agentmemory/mcp/tools ever returns a JSON shape that isn't {tools: Array} (previously: silent local fallback).
Plus the things already on this branch: probe stderr logging, AGENTMEMORY_FORCE_PROXY=1, AGENTMEMORY_PROBE_TIMEOUT_MS, absolute volume paths (you've confirmed this one works), which iii stderr leak fix, 30 MB compose log cap.
You may still have a bug but we'll see if someone else reports it. Why do you need filtering at all into the seven tools? I definitely see the request is getting proxied out to the actual memory storage container, Docker container, and it's being logged properly on the host logs. But I still think you have MCP filtering that gets triggered where you don't expect it to be triggered. There's no way that Roo Code is caching this result and filtering out tools. Grok tells me Row Code doesn't filter memory tool commands and does not have any meaningful cache..
Activity
rohitg00 commentedon May 8, 2026
Thanks @cl0ckt0wer — root cause is exactly right. Confirmed:
src/mcp/standalone.tshardcodes a 7-nameIMPLEMENTED_TOOLSsettools/listfiltersgetVisibleTools()through that set even whenAGENTMEMORY_TOOLS=allis configuredFix is in #238 — switches
tools/listandvalidate()to proxy-aware behavior: when running against a reachable server (AGENTMEMORY_URLset +livezok), delegate to the server's tool list (gets all 51), with a fallback to the local 7-tool list when the server is unreachable. Has tests covering the proxy path including auth-header passthrough.I've already approved #238 — holding for @rohitg00 to land. Once it does, will close this with the merge.
Good catch on the impact framing too — every non-Claude-Code user (OpenCode, Cursor, Gemini CLI, Cline) was hitting this silently.
chore(release): v0.9.6 — search recall + MCP shim + hook latency (#272)
fix: MCP standalone shim proxies full server tool set (rohitg00#234) (r…
jcalfee commentedon May 10, 2026
◇ iii-engine is ready
[agentmemory] Starting worker v0.9.6...
rohitg00 commentedon May 10, 2026
@jcalfee what should I see here?
jcalfee commentedon May 10, 2026
It appear that version 0.9.6 didn't work because I'm seeing only 4 tools. If I'm reading the github comments right then it would have been fixed in version 0.9.6.
I'm running VS Codeium in Flatpak with the MCP server in RooCode.
It seems that the RooCode MCP startup is able to escape the flat pack though because the place where I find it running the AgentMemory MCP server is on the host. So that seems to go well.
So I check on the host and see this version:
$ npm exec @agentmemory/mcp --version 10.9.7And I get these four tools whether or not I have the regular process running on the host, which was very confusing until I figured out or remembered that you've got a Docker container. So that makes sense that it's coming from the Docker container:
I'm not sure how to check the version inside of the Docker container which is actually pod man on my machine because I can't find bash or sh inside but I assumed that this should be up to date and the bug would be fixed right?
agentmemory-iii-engine-1
rohitg00 commentedon May 10, 2026
@jcalfee thanks for the detail — the 4-tool count is the smoking gun. Two things going on:
1. Version check is misleading
npm exec @agentmemory/mcp --versionreports10.9.7because--versionis consumed by npm itself (your npm CLI version), not the package. To check the package version:Both should show
0.9.6.2. The 4 tools come from the container, not the shim
The shim flow is:
http://localhost:3111/agentmemory/livez(500ms)GET /agentmemory/mcp/toolsfrom the server → return whatever the server lists (8 essentials by default, 51 whenAGENTMEMORY_TOOLS=all)IMPLEMENTED_TOOLS4 ≠ 8 and ≠ 7, so your container is older than v0.9.6 and its
/agentmemory/mcp/toolspredates the currentESSENTIAL_TOOLSset.Fix — rebuild the container (swap
docker→podmanif that's your runtime)To get all 51 tools add to your compose env:
Then
curl ... | jq '.tools | length'should return 51, and RooCode will see the same set via the shim.If after rebuild you still see 4 tools from the curl, post the curl output and
docker compose ps(orpodman compose ps) and I'll dig further.rohitg00 commentedon May 10, 2026
Reopening pending @jcalfee confirmation on Docker rebuild — original fix landed in v0.9.6 (#270) but his container appears to predate the change.
jcalfee commentedon May 11, 2026
I don't think it was the rebuild that was required. It was that I had to put all in the tool names here on the host:
AGENTMEMORY_TOOLS=all npx @agentmemory/agentmemoryI did the rebuild anyways because I was still having problems getting that list of tools into the Flatpak and Roo code in VS Codeium:
ADDED: user@s1max:~/.npm/_npx/076f5982d055bff5/node_modules/@agentmemory/agentmemory
$ egrep AGENTMEMORY_TOOLS docker-compose.yml AGENTMEMORY_TOOLS: allNow the issue persists:
I did a pkill -9 and docker compose down then restarted the npx host and the MCP server:
Still 51 tools on the host but 7 in Roo Code.
Also, I loose everything when I restart docker and the data dir is empty:
$ find /home/user/.local/share/containers/storage/volumes/agentmemory_iii-data/_data
/home/user/.local/share/containers/storage/volumes/agentmemory_iii-data/_data
The last startup was a bit strange that it had to re-install:
rohitg00 commentedon May 11, 2026
You're right — my "rebuild the container" advice missed the actual root cause. Re-read the trace carefully now. Server is fine; the shim is what's degraded. Walking through what your output proves:
Server side: correct.
curl http://localhost:3111/agentmemory/mcp/tools | jq '.tools | length'→51. Server-side endpoint,AGENTMEMORY_TOOLS=all, healthy.Shim side: silently in local mode.
@agentmemory/mcpv0.9.6 has a two-mode flow (src/mcp/rest-proxy.ts):GET http://localhost:3111/agentmemory/livez(500ms timeout)tools/listto server → 51 toolsIMPLEMENTED_TOOLS(7) fromsrc/mcp/standalone.ts:16You see 7 tools in Roo Code, so the shim instance Roo Code spawned is in local mode. The probe failed for that process — even though it works from your host shell.
Likely cause: Roo Code spawns the shim inside the VS Codeium Flatpak sandbox. Even though Flatpak normally shares the host network namespace, two things commonly break the probe:
--share=networkor routeslocalhostto a sandboxed loopbackThe probe error is currently swallowed (
catch {}inrest-proxy.ts:39), so there's no log line telling you what happened — that's a shim DX bug I'll fix.Confirm the diagnosis — run this from inside the Flatpak (not your host shell):
If that fails or hangs, the probe is being blocked at the sandbox layer.
Workarounds while I land a fix:
Option A — point Roo Code at a tunnel that the Flatpak can reach (replace
localhostwith the host's LAN IP, e.g.192.168.x.x):{ "command": "npx", "args": ["-y", "@agentmemory/mcp"], "env": { "AGENTMEMORY_URL": "http://192.168.x.x:3111" } }Option B — give the Flatpak network permission explicitly (run on host):
Then fully quit VS Codeium and re-add the MCP server in Roo Code so the shim re-probes. (Roo Code, like most MCP clients, calls
tools/listonce per session and caches the result; restarting Codeium isn't enough — the MCP server entry needs to be removed/re-added.)What I'm going to land in a follow-up PR:
rest-proxy.ts— surface probe failures to stderr with URL + reason (not silent), bump probe timeout from 500ms to 2000ms.AGENTMEMORY_FORCE_PROXY=1env so sandboxed clients can skip the probe entirely.Separate issues you flagged (filing these so they don't get lost):
docker compose down— volume binding bug. Will open a separate issue.which: no iii in ...plus reinstall everynpxrun —@agentmemory/agentmemorynot finding theiiiCLI on PATH. Separate.Sorry for the misdirected first reply. Reopen this if the workarounds don't get Roo Code to 51 tools — I'd rather keep one thread on the shim/probe bug.
rohitg00 commentedon May 11, 2026
@jcalfee Found data-loss bug! Config writes to
./data/(relative — inside container's $PWD) but volume mounts at/data(absolute). Mismatch → data goes to ephemeral layer → lost on docker compose down.rohitg00 commentedon May 11, 2026
@jcalfee follow-up PR #280 — adds
AGENTMEMORY_FORCE_PROXY=1escape hatch for the Flatpak / Roo Code probe failure, plus probe-failure stderr logging, plus fixes the related volume-mount bug (state was being written to the ephemeral container layer instead ofiii-data— that's why your data dir came up empty afterdocker compose down). Once it lands and v0.9.7 ships, tryAGENTMEMORY_FORCE_PROXY=1in your Roo Code env and you should see 51 tools.rohitg00 commentedon May 11, 2026
Hey @jcalfee, can you try a local build with this #280? Thanks, really appreciated.
jcalfee commentedon May 11, 2026
flatpack is and was already using share=network
Also, in flatpack:
I removed the extension, stopped VSCodium, ensured there are no agentmemory process, started everything up and re-added the MCP server. Still 7 tools. It has to be in the extension format. maybe that change to reveal an error will help
Here again it's using the host network so this should show that it is going to the right server:
AGENTMEMORY_TOOLS=all is required.
AGENTMEMORY_TOOLS=all npx @agentmemory/agentmemoryand in pr-280AGENTMEMORY_TOOLS=all npm startto see the full list (certainly not on by default).Local build of pr-280:
Adding
"AGENTMEMORY_FORCE_PROXY": "1"still yields only 7 tools (expected, I think it is established that the API is already returning all 51 tools and that there is not a zombie process).Grok looked at the list of 7 that did parse and all of the 51 in the json: "there are no inconsistencies or structural patterns in the 51-tool JSON that would cause the Roo Code plugin (or its MCP server integration) to fail parsing the other 44 tools."
I'm not confident that I would see this error if it happened:
There is nothing under Roo Code itself:
Also, it's not straightforward to test it by stopping everything and reloading the tool list in Roo Code MCP because, even with
"AGENTMEMORY_FORCE_PROXY": "1", the MCP tool list still loads the seven tools even while the docker container is down andAGENTMEMORY_TOOLS=all npm startis not running.The docker volume has data files in it now. Thank you!
jcalfee commentedon May 11, 2026
Of course the PR is not running inside of the Flatpak environment and that's still running under NPX (npm release I presume). I'm not even I'm not too clear on how that even works because when try suggestions I'm getting about this environment is not working so well.
But yet the Roo Code MCP server seems to be able to do this... I do know why the Roo Code plugin succeeds while a manual command in the integrated terminal does not.
fix(mcp): AGENTMEMORY_DEBUG flag + loud unexpected-shape warning
rohitg00 commentedon May 11, 2026
@jcalfee — I just found out, bug isn't in
agentmemory/mcpat all. Roo Code itself is dropping 44 of the 51 tools before showing them to you. I have a clean repro proving the shim returns 51.Reproduction (just ran this against #280's branch)
Set up:
Drive the shim over stdio exactly the way Roo Code does, with full debug:
Shim's stderr trace:
Shim's stdout to the MCP client:
(51 tools + 1
serverInfo.name= 52 — confirms shim returns all 51 over the wire.)The shim is correct. Roo Code is dropping tools after parsing them.
What's happening on the Roo Code side
Three signals point at Roo Code, not us:
You see 7 tools when docker is down. If the shim were doing it, you'd see 7 only when the shim's fallback path triggers. With docker down → engine down →
livez404 → shim falls back to 7. But with docker UP andAGENTMEMORY_TOOLS=allset, the shim returns 51 (proven above). The fact that 7 persists across both states is Roo Code caching its own MCP tool list, independent of what the shim reports.Always exactly 7, never anything else. If Roo Code rendered what the shim sent, you'd see 51 (with server up) or 7 (with server down). The fact that the count is stuck at 7 means Roo Code is reading from cache, not from the wire.
The 7 are the
IMPLEMENTED_TOOLSset, not theESSENTIAL_TOOLSset.IMPLEMENTED_TOOLS(7) is the shim's local-fallback list;ESSENTIAL_TOOLS(8) is the server's default whenAGENTMEMORY_TOOLSis unset. If Roo Code were getting the server's default, you'd see 8. The fact that you see exactly the 7IMPLEMENTED_TOOLSstrongly suggests Roo Code cached a prior (server-down)tools/listresponse from before you setAGENTMEMORY_TOOLS=all, and is replaying it.What to do on your side
Clear Roo Code's MCP cache and re-add the server. The cache likely lives under one of:
What v0.9.7 ships for you regardless
Already pushed to #280 since you last commented:
AGENTMEMORY_DEBUG=1— shim now logshandle.mode, response shape, and tool count to stderr on everytools/list. Set it in your Roo Code env block and Roo Code will route the shim's stderr to its output panel; you'll see whether 51 or 7 is leaving the shim./agentmemory/mcp/toolsever returns a JSON shape that isn't{tools: Array}(previously: silent local fallback).AGENTMEMORY_FORCE_PROXY=1,AGENTMEMORY_PROBE_TIMEOUT_MS, absolute volume paths (you've confirmed this one works),which iiistderr leak fix, 30 MB compose log cap.fix(mcp): probe diagnostics + sandbox escape hatch (#234, #278) (#280)
fix(mcp): local fallback exposes all 7 IMPLEMENTED_TOOLS, not 4 (#234) (
jcalfee commentedon May 11, 2026
I'll just work with the 7 tools until the successor, Zoo Code, is released then try again. Thank you..
docs: merge guidance + per-host shapes for MCP install snippets (#282)
jcalfee commentedon May 11, 2026
You may still have a bug but we'll see if someone else reports it. Why do you need filtering at all into the seven tools? I definitely see the request is getting proxied out to the actual memory storage container, Docker container, and it's being logged properly on the host logs. But I still think you have MCP filtering that gets triggered where you don't expect it to be triggered. There's no way that Roo Code is caching this result and filtering out tools. Grok tells me Row Code doesn't filter memory tool commands and does not have any meaningful cache..
rohitg00 commentedon May 11, 2026
If 51 tools are exposed at once, That's token pollution to agent windows.
fix(mcp): proxy all server tools through standalone shim (rohitg00#234)
fix(mcp): proxy all server tools through standalone shim (rohitg00#234)