Conversation
… bridge
The local stdio process already holds the delegate key. Forwarding every
tools/call over a long-lived GET /api/mcp/sse session added a second
protocol, a second occupancy slot, and a class of failures SDK clients
never see (ip_active_cap 429, handshake 503, idle stream, 240s orphan).
stdio MCP now answers initialize/tools/list locally, keeps memwal_login
and memwal_logout on this machine, and implements remember/recall/bulk/
analyze/restore/health as MemWal.create({ key, accountId, serverUrl })
signed REST. Relayer 401 is a retryable error and does not wipe
credentials.json. Logout still drops the in-process client. The Claude.ai
Streamable HTTP /api/mcp path is unchanged.
Tests cover remember/recall with an SDK stub (no SSE mock) and a spawn
path that hits GET /health without opening /api/mcp/*. Follow-up: 410
/api/mcp/sse once plugin traffic is off it.
…ials The CLI still cloned credentials when --relayer/--dev disagreed with the file, but the clone never reached MemWal.create. Memory tools always dialled credentials.json, so a prod file plus --local still signed against prod. Pass the flag through as an in-memory override, same as the old bridge, and keep the saved URL untouched.
|
Parking note — this one isn't waiting on review. Per the internal discussion on Sep 18: we're keeping the SSE bridge for now, so the "drop the SSE bridge" half of this PR is on hold. It's backlogged together with WALM-652 ( @ducnmm flagging so it stops sitting in the review queue — feel free to convert it to draft whenever convenient. The SDK-backed stdio tools can come back up for review once we actually schedule the SSE cutover. |
|
Thanks @nikola0x0 — parking this. Keeping the SSE bridge for now; the drop-SSE half of this PR is on hold with WALM-652. I'll convert to draft so it drops out of the review queue. SDK-backed stdio tools can come back as a smaller PR once we schedule the SSE cutover. |
|
Closing this parked draft. We are keeping the SSE bridge; the drop-SSE half of this change stays on hold with WALM-652. The branch was conflicting with The two commits remain on this closed PR if we pick the work back up:
|
Summary
stdio
@mysten-incubation/memwal-mcpalready holds the delegate key, then used to open a long-lived SSE session to/api/mcp/sseand forwardtools/callto the sidecar. That session is a second protocol, a second occupancy slot, and a second auth story next to the SDK — which is why Teo hitsip_active_cap, handshake 429/503, 240s “connection dropped” on a healthy/health, and bulk saves that store nothing.This PR cuts that layer. Login/logout stay local (
credentials.json, dashboard loopback). Memory tools callMemWal.create({ key, accountId, serverUrl })the same way researcher and noter already do.GET /api/mcp/sse, noPOST /api/mcp/messages, no occupancy slot on this path.credentials.json.memwal_logoutdeletes the file and destroys the in-process client./api/mcp(OAuth) is unchanged./api/mcp/sseonce plugin traffic is off it.Linear: WALM-629
Why SSE is the wrong layer here
SDK clients POST
/api/rememberper call. They do not have this class of bug. Community feedback on#walrus-memwal-buildwas the same: REST was fine; the Claude Code plugin orphaned tool calls after ~240s. Harry’s investigation of Dio’s 3–8 min saves found no slow request on the relayer — the wait was client-side handshake backoff.Live check against
relayer.memory.walrus.xyzwith this branch (stdio MCP, no SSE mock):/api/mcp/sse28 s remember is the write pipeline (embed / SEAL / Walrus), not the transport. That stays WALM-621. This PR only removes the session.
Test plan
pnpm --filter @mysten-incubation/memwal-mcp test(90 pass)memwal_healthhitsGET /healthonly/api/mcp/ssein this PR