mcp-data-platform-v0.15.3
Fixes a session expiry bug where API-key and Bearer-token clients become permanently stuck after the session TTL (default 30 minutes) elapses. Also adds diagnostic logging for the session metadata deduplication path.
Bug Fixes
Expired sessions block authenticated clients (#79)
When the AwareHandler's PostgreSQL session expires (TTL reached or server restart), subsequent requests returned HTTP 404 "session not found or expired." The Go MCP SDK client does not auto-recover from 404 (upstream TODO), so the client appeared "connected" but every tool call failed until the user manually reconnected.
handleExisting in pkg/session/handler.go now checks for auth credentials (Bearer token or X-API-Key header) when a session is missing. If credentials are present, it transparently creates a replacement session instead of returning 404. Unauthenticated requests still receive 404.
Touch goroutine context race
The async Touch call in handleExisting used r.Context(), which can be canceled after the HTTP response completes but before the goroutine executes. The Touch would silently fail, preventing session TTL extension. Now uses a detached context with a 5-second timeout.
Improvements
Dedup diagnostic logging
Added slog.Debug tracing at every decision point in enrichTrinoResultWithDedup:
- Whether the session cache is nil
- Whether table keys were extracted from the request
- Per-key cache hit/miss with session ID
- Dedup mode applied when all keys are cached
- Mark-sent confirmations after full enrichment
Set log level to debug to see these in production.
Dedup integration tests
Three new transport-specific integration tests verify session metadata deduplication works correctly across Streamable HTTP (stateful), Streamable HTTP (stateless), and SSE transports.
Configuration
Deployments using session externalization (sessions.store: database) must also set streamable.stateless: true under server: for the AwareHandler to activate:
server:
transport: sse
streamable:
stateless: trueWithout this, the SDK runs in stateful mode with in-memory sessions that are lost on restart.
Upgrading from v0.15.2
Drop-in replacement. Verify server.streamable.stateless: true is set if using database session store.
Changelog
Bug Fixes
Installation
Homebrew (macOS)
brew install txn2/tap/mcp-data-platformClaude Code CLI
claude mcp add mcp-data-platform -- mcp-data-platformDocker
docker pull ghcr.io/txn2/mcp-data-platform:v0.15.3Verification
All release artifacts are signed with Cosign. Verify with:
cosign verify-blob --bundle mcp-data-platform_0.15.3_linux_amd64.tar.gz.sigstore.json \
mcp-data-platform_0.15.3_linux_amd64.tar.gz