The memory tools had no target-project argument and no way to see the
caller context they resolved, so a scoped migration run from one project
couldn't keep memories for another or check where they went.
- memory_search and memory_save take `project`: a folder on this
computer (absolute, or relative to the caller's own folder), or the key
of a project memory knows (github.com/owner/repo, with or without
project:, or a project's one name). A project named goes with scope
project (a save's default then) or a search's all; global or agent with
a project is refused, and an unknown project says which ones memory
knows.
- Answers name what was used: a memory reads "this project (<key>)" and
"only for you (<agent>)", and a search ends "(looked in: everywhere,
project <key>, agent <id>)".
- New read-only memory_context: the agent the server takes the caller
for and how it was found (router _meta, magpie mcp memory's initialize,
key/User-Agent, the session's initialize), the project with its folder
and source, the scopes a search looks in and the server version, as
text and structuredContent. Given `project`, it shows that one.
- HTTP and stdio are the same server (magpie mcp memory relays), and
OwnMCPTools lists memory_context with the others.
Run (mote, -tags nogui unless noted):
- TestMemoryMCPProjectArgumentAndContext (new): folder, key and relative
folder; the caller's own project untouched; refusals; memory_context's
text and structuredContent; tools/list. Red with the project argument
ignored by hand.
- TestMemoryBridgeContextAndProject (new): the real gateway behind
magpie mcp memory over stdio, initialized as codex as in the report.
- go test ./internal/browsermcp ./internal/cli ./internal/library: ok;
go test -run 'Memory|OwnMCP|Hub|RootDirs|Tool' ./internal/gateway: ok.
- Windows (xiaomi-gpu, win-run): the new gateway, browsermcp and cli
tests ok (a test's own unquoted Windows path was fixed on the way).
- go vet darwin, linux nogui, windows for the four packages; gofmt.
Not tried: Codex desktop itself over /mcp/run/magpie-memory; the full
suite runs after the tag.