Skip to content

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 28 Jul 12:56
· 25 commits to main since this release

Bug Fixes

  • Session expiry reconnection (#1): MCP Streamable HTTP sessions that expire (HTTP 404 "Session not found") now trigger automatic reconnection. The dead client is evicted from the connection cache, a fresh transport is created, and the failed tool call is retried exactly once. Previously, expired sessions caused the sentinel to fail permanently with no recovery path.

    Per the MCP Streamable HTTP spec § Session Management, clients MUST re-initialize when receiving HTTP 404 with a session ID. The @modelcontextprotocol/sdk throws StreamableHTTPError on 404 but does not auto-reconnect — this plugin now fulfills that obligation.

Features

  • Resilient reconnection: callTool handles transient network errors (ECONNREFUSED, ECONNRESET, ETIMEDOUT, fetch failed) and server faults (5xx) by reconnecting and retrying once.
  • Concurrency safety: getOrCreateClient uses promise-sharing to deduplicate concurrent connection attempts. A WeakMap fallback prevents the second concurrent poll from failing when another poll already evicted the dead client — critical for multi-session environments.
  • Mock server HTTP mode: tests/mock-mcp-server.ts --transport=http supports Streamable HTTP with configurable session expiry for integration testing.

Internal

  • Full TSDoc/JSDoc comments on all 9 source modules
  • 84 tests, typecheck + build green

Full Changelog: v0.4.0...v0.4.1