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
Project scoping not honored by MCP search tools (memory_smart_search / memory_recall) or /smart-search #787
Project scoping (added in v0.9.23, #662) is wired into mem::search, but the MCP search tools and the /smart-search HTTP route do not honor project, so MCP-based clients (e.g. Claude Code via the memory_smart_search / memory_recall tools) get unscoped reads even after correctly writing project-tagged memories. Writes are scoped; reads via MCP are not.
Environment
@agentmemory/agentmemory0.9.24 (deployed via the deploy/railway Dockerfile, iii-engine 0.11.2)
Verified empirically against a live deployment.
What works (writes + HTTP /search)
memory_save (and POST /agentmemory/remember) accept and store project — confirmed, the returned memory object now includes "project": "...".
POST /agentmemory/search filters correctly: a query with project: "A" does not return a memory stored under project: "B". ✅
The gap (MCP search tools + /smart-search)
memory_smart_search (src/mcp/tools-registry.ts) exposes only query, expandIds, limit — no project param. The dispatch in src/mcp/server.ts forwards only those three, so a project can't reach the search layer.
Even internally, mem::smart-search (src/functions/smart-search.ts) passes project only to lesson-recall, not to the observation/memory hybrid search — so /smart-search is unscoped for memories/observations regardless of caller.
memory_recall internally calls the project-capable mem::search, but its MCP schema exposes no project param, so the filter can't be set.
Impact
Any agent that retrieves via the MCP tools (the documented Claude Code integration path) cannot get project-isolated reads — memories from every project are returned. The only project-isolated read surface today is the raw POST /agentmemory/search HTTP route.
Requested
Add a project parameter to the memory_smart_search and memory_recall MCP tool schemas, forwarded through src/mcp/server.ts.
Thread project into the observation/memory hybrid search inside mem::smart-search (not just lesson-recall), reusing the existing wildcard-compatible guard (!project || !m.project || m.project === project).
Happy to test a patch against a live deployment. Thanks for the recent scoping work!
PR #869 addresses this for the /smart-search path (and the MCP memory_smart_search / memory_recall tools that route through it). mem::smart-search accepted project but never applied it to its observation results; it now resolves each hit's project the same way mem::search already does (session → memory fallback). Verified live: a project-scoped smart-search returns only that project's observations.
Activity
jwfaye commentedon Jun 9, 2026
PR #869 addresses this for the
/smart-searchpath (and the MCPmemory_smart_search/memory_recalltools that route through it).mem::smart-searchacceptedprojectbut never applied it to its observation results; it now resolves each hit's project the same waymem::searchalready does (session → memory fallback). Verified live: aproject-scoped smart-search returns only that project's observations.fix(mcp): address CodeRabbit review on rohitg00#1195
fix(mcp): thread project param through standalone MCP bridge
fix(mcp): address CodeRabbit review on rohitg00#1195
fix(governance): report ids governance-delete did not remove