Added
- Configurable Express
trust proxyfor HTTP mode (MCP_HTTP_TRUST_PROXY): When the Streamable HTTP transport runs behind a trusted reverse proxy, setMCP_HTTP_TRUST_PROXYso Express resolves the real client IP fromX-Forwarded-Forbefore computing rate-limit keys and request logs. Acceptstrue, a trusted hop count such as1, or a subnet/preset such asloopbackor10.0.0.0/8; unset,false, or0disables it, which stays the secure default (enabling it without a real proxy in front lets clients spoofX-Forwarded-For). This is distinct from the outboundHTTP_PROXY/HTTPS_PROXYsettings that govern this server's own requests. (FEAT-051, #140)
Fixed
-
HTTP session recovered after a server restart: The Streamable HTTP
sessionsmap is in-memory, so a client that reused itsmcp-session-idacross a server restart got wedged — a freshinitializestill carried the stale header and fell through to400 / -32000.initializeis now accepted regardless of any stale session header, and unknown session IDs on non-initializePOSTs return404 / -32001 "Session not found"(matching the MCP SDK's own shape) so clients can detect a dead session and re-initialize. (BUG-010, #139) -
Search JSON-parse errors keep the real response preview: A
fetchresponse body is single-use, and the old path calledresponse.text()in the catch afterresponse.json()had already consumed it, so a JSON-parse failure always degraded to[Could not read response text]. The body is now read as text first and then parsed, so the error carries the actual response preview — making misconfigured or HTML-returning instances far easier to diagnose. (BUG-008, #131)
Security
SEARXNG_URLcredentials redacted in errors, logs, and provenance: Embedded userinfo (user:pass@host) inSEARXNG_URLno longer leaks into model-visible error messages, client logs, orservedByprovenance. A shared redaction helper is now applied at every instance-URL emission point — the aggregate failover error, theECONNREFUSEDnested message, request/fallback logs, error context, andservedBy. (BUG-007, #136)
Full Changelog: v1.8.0...v1.9.0