Skip to content

v0.1.6 — SSE endpoint rewriter + property-level config merge

Choose a tag to compare

@spranab spranab released this 17 Apr 21:18
· 8 commits to main since this release

v0.1.6 — SSE endpoint rewriter + property-level config merge

Two fixes that together make "everything through Pier" actually work.

Server: SSE upstream proxying, for real

Upstream SSE MCPs (like YantrikDB) open with an event: endpoint\ndata: /messages/?session_id=X event that tells the client where to POST follow-up JSON-RPC messages. Previously, Pier forwarded that path verbatim — so the client tried to POST to the upstream-relative path through Pier, which 404'd.

Fix:

  • rewriteSseEndpoint streams the upstream response and rewrites the first event: endpoint data path to be prefixed with /mcp/<name>/. Subsequent chunks stream through unchanged.
  • Added wildcard /mcp/:name/* (POST/PUT/DELETE) routes that strip the prefix and forward to the upstream origin, preserving query strings.

Net effect: any SSE-upstream MCP can now be proxied through Pier with secrets kept server-side.

CLI: sync no longer wipes user-owned entries

pier sync replaced the whole mcpServers object, which meant any entry you'd added manually to ~/.claude.json (direct connections, local dev servers, experiments) got deleted on every sync.

Fix: property-level merge.

  • Pier tracks which entries it wrote in ~/.config/pier/managed.json, keyed by client.
  • On each sync, only previously-Pier-owned entries are dropped; anything else is left alone.
  • New Pier entries are merged in alongside user-owned ones.

No migration needed. First sync after upgrade will claim whatever names Pier currently writes as its own.

Upgrade with npm i -g mcpier or docker pull ghcr.io/spranab/mcpier:latest.