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
OpenCode plugin exposes only 8 agentmemory tools instead of advertised 51 MCP surface (server running, proxy mode not activating) #553
On OpenCode with the agentmemory plugin installed and the agentmemory server running (health endpoint returns {"status":"healthy"} on the default port), the available memory tools are limited to 8 instead of the advertised 51:
Tools available:
memory_consolidate
memory_diagnose
memory_lesson_save
memory_recall
memory_reflect
memory_save
memory_sessions
memory_smart_search
Tools from the documented 7-tool fallback that are MISSING:
memory_export
memory_audit
memory_governance_delete
Tools from the 51-tool set that should be available in proxy mode but are absent:
memory_graph_query
memory_relations
memory_timeline
memory_file_history
memory_patterns
memory_profile
etc.
The README states: "The published @agentmemory/mcp package is a thin shim. It exposes the full 51-tool surface only when it can reach a running agentmemory server via AGENTMEMORY_URL (proxy mode). With no server reachable, the shim falls back to a 7-tool local set."
The server IS reachable, but the tool set doesn't match either the 7-tool fallback OR the 51-tool full set — it's a third, undocumented intermediate state (8 tools, 4 match the fallback, 4 are different).
Users following "22 hooks + MCP + plugin" expectations from the README get only 8 tools with no indication that 43 are missing. Critical tools like memory_export, memory_audit, memory_governance_delete, and all knowledge graph tools are absent without explanation.
To Reproduce
Install agentmemory globally
Start the server (agentmemory or npx @agentmemory/agentmemory)
Verify server is healthy: curl http://localhost:3111/agentmemory/health
Use OpenCode with the agentmemory plugin installed
List available agentmemory tools — only 8 appear
Expected
Either:
The shim detects the running server and proxies all 51 tools (as documented), or
The OpenCode plugin documents its actual tool set and explains why some are missing
Environment
Agent: OpenCode with agentmemory plugin
Server responds at localhost:3111
Default configuration
Notes
This may share a root cause with #400 and #510: the MCP shim's server-probe failing to detect a running server on the default port when launched through certain plugin/hook systems. An OpenCode-specific diagnostic would help narrow down whether it's a shim issue or a plugin registration issue.
Tracked this down — the "8 tools, not 51" state isn't proxy mode failing to activate. It's the opposite: the proxy is reaching the server, and the server is returning its core set.
The tell is the exact 8-tool list (memory_save/recall/consolidate/smart_search/sessions/diagnose/lesson_save/reflect). That's ESSENTIAL_TOOLS in src/mcp/tools-registry.ts — the server-side core surface. The shim's local fallback is a different 7-tool set (IMPLEMENTED_TOOLS: adds memory_export/audit/governance_delete). So seeing the 8-tool core list proves the shim reached the server; the server just answered in core mode.
Every other config reader goes through getEnvVar() → getMergedEnv() ({ ...fileEnv, ...process.env }), which merges ~/.agentmemory/.env. This one call doesn't, so AGENTMEMORY_TOOLS=all set in .env is silently ignored — you only get the full surface if it's exported in the server process's environment (or passed via --tools all). .env.example advertises it as a .env knob, hence the surprise.
Workaround today: export it in the shell that launches the server, e.g. AGENTMEMORY_TOOLS=all agentmemory, or agentmemory --tools all.
Proper fix is up as a PR: #616 — it routes the lookup through getEnvVar() so the documented .env value works (with process.env still taking precedence). This likely also covers #400 (Codex), where a healthy server serves the reduced surface.
Correction to my earlier note: this is a separate bug from #510. #510 is the "literal ${AGENTMEMORY_URL} placeholder defeats the shim's localhost fallback" connection issue, which is already handled on main by the resolveEnvOrEmpty guard in #588 (ships in 0.9.22). #616 only fixes the server-side core-vs-all surface selection.
Activity
ccf commentedon May 23, 2026
Tracked this down — the "8 tools, not 51" state isn't proxy mode failing to activate. It's the opposite: the proxy is reaching the server, and the server is returning its
coreset.The tell is the exact 8-tool list (
memory_save/recall/consolidate/smart_search/sessions/diagnose/lesson_save/reflect). That'sESSENTIAL_TOOLSinsrc/mcp/tools-registry.ts— the server-sidecoresurface. The shim's local fallback is a different 7-tool set (IMPLEMENTED_TOOLS: addsmemory_export/audit/governance_delete). So seeing the 8-tool core list proves the shim reached the server; the server just answered in core mode.Root cause:
getVisibleTools()readsprocess.env["AGENTMEMORY_TOOLS"]directly:Every other config reader goes through
getEnvVar()→getMergedEnv()({ ...fileEnv, ...process.env }), which merges~/.agentmemory/.env. This one call doesn't, soAGENTMEMORY_TOOLS=allset in.envis silently ignored — you only get the full surface if it's exported in the server process's environment (or passed via--tools all)..env.exampleadvertises it as a.envknob, hence the surprise.Workaround today: export it in the shell that launches the server, e.g.
AGENTMEMORY_TOOLS=all agentmemory, oragentmemory --tools all.Proper fix is up as a PR: #616 — it routes the lookup through
getEnvVar()so the documented.envvalue works (withprocess.envstill taking precedence). This likely also covers #400 (Codex), where a healthy server serves the reduced surface.Correction to my earlier note: this is a separate bug from #510. #510 is the "literal
${AGENTMEMORY_URL}placeholder defeats the shim's localhost fallback" connection issue, which is already handled onmainby theresolveEnvOrEmptyguard in #588 (ships in 0.9.22). #616 only fixes the server-side core-vs-all surface selection.fix(mcp): full 51-tool surface by default + env defaults in plugin ma…
rohitg00 commentedon May 26, 2026
Fixed in v0.9.22 — https://github.com/rohitg00/agentmemory/releases/tag/v0.9.22. Thanks for the report.
fix(mcp): full 51-tool surface by default + env defaults in plugin ma…