Niapyaya on X reaches their own MCP servers through the MCP hub from a
remote machine, but not magpie-memory: memory answered the agents on
this computer alone, on /mcp/magpie/memory (547585cd9) and in the hub
(HereOnly), whatever key came. That was on purpose: a friend's key
could read every memory or plant a global rule the digest writes into
every agent's instructions here.
So it stays off for every key, and the user can let one key of their
own use it:
- access.Key.Memory, set by "memory-key" (`magpie gateway-key memory
<id> on|off`, or the key's ... > Advanced > Magpie Memory). As Admin,
only a key the user made can have it (memoryOf): never the sharing
key, a read-only or Browser key, nor an issued or expiring one.
Read-only takes it away; the management API can't set it.
- memoryMCP lets a caller from elsewhere in only while magpie is
shared, by such a key, and never from a page by hubFromPage (Origin,
Sec-Fetch-Site, a Mozilla/ agent; Node's fetch sends Sec-Fetch-Mode,
#5522). This computer's check is unchanged.
- The hub gives magpie-memory (HubServer.Memory, from isMemory) to an
Away visitor only by such a key (HubVisitor.Memory), listed and run,
in the gateway and again in the library's Call.
- Advanced in the key's menu now opens Management API and Magpie
Memory, each its own pick; a key with it says so in its row. Strings
in zh, zh-TW, ja, de. Docs: memory.md, mcp-router.md, and the site's
remote page (en, zh, ja) with its index rebuilt.
Image already answers a key directly (/mcp/magpie/image, held to the
key); sessions stays this computer's. There is no skills MCP server.
Tests: TestMemoryMCPToAKeyGivenIt, TestHubGivesMemoryToAKeyLetUseIt,
TestMemoryKey, the hubServerOf Memory column, and gateway-key-admin's
GUI file now goes through Advanced > Management API and covers Memory.
Run (mote unless said; base d01e0a465, rebased onto c4bae0724, which
only touches the Settings keep guard):
- Red on the old code (mica): TestMemoryMCPToAKeyGivenIt (403 to the
key) and TestHubGivesMemoryToAKeyLetUseIt (hub listed [docs] only).
- go test -count=1 -timeout 45m ./internal/access ./internal/gateway
./internal/library ./internal/cli ./internal/gui: access, library ok.
Reds, each the same at a clean origin/main c4bae0724 and filed:
gateway TestOpenCodeGoOwnFreeModelGetsNothingOfOpenCodes (#7117) and
the doneHold panic log (#6505); cli TestHealthcheck…/TestUpdate…
WithoutMagpieAddr, TestUpdateFindsAMagpieThatWroteNoRecord (#6471,
#6223); gui TestSettingsSaveKeepsWhatItDoesNotSend (fixed by
c4bae0724).
- GUI, both engines, every language, at this head: 64 files (every
caller-keys / gateway-plugin file and i18n-*): 1008 of 1024 pass;
api-key-theme (#6444) and connect-address-kept (#6755) fail the same
at clean origin/main c4bae0724.
- gofmt -l clean; go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./... ok; builds for all three OSes ok.
- Broken by hand: drop !hubFromPage -> the Sec-Fetch-Site case gets 200,
red; drop the key's Memory check -> another key gets 200, red. Drop
sharedWith -> still green: serveMCP's share guard refuses first, so
memoryReaches' check is a second line, not the only one.
Not tried: a real remote agent against a real shared magpie (tests use
httptest with 192.0.2.7 as the remote address); the full suite runs
after the push.