ferock on Discord: with "使用 magpie 的全部 MCP 服务器" on, a chat got
only the servers in library.json, never magpie's own web search, image
recognition or image generation.
ownMcp (lib/gateway.mjs) asks the gateway's GET /v1/magpie/mcp (magpie
v0.1.2397) for the ones on now and mounts each at the gateway's address
with the gateway key. readMcp adds them after the Library's, which every
route takes its MCP list from: the page's list (libraryView), a chat's
tools, a tool call and the connection check; a Library server of the
same name (an installed magpie-image) is used in its place. One turned
off in magpie's Settings is left out of the next chat. An older magpie
(404), a gateway that doesn't answer, or a bad reply lists none, as
before. lib/mcp.mjs loadServers (library.json only) is unchanged; the
page calls listTools/callTool with server objects, never by name.
Run (mote): bun test chat.test.mjs, 29 pass; the new test is red on the
old lib (Expected 2 more tools, Received 0), checked by hand.
bun scripts/check.mjs ok. magpie's side was run against its real binary
(magpie commit cac655c14's body).
Not tried: the page in magpie's window against a real magpie with the
switch on (the test drives the page's service with a fake gateway).