Published as @automattic/mcp-remote@0.1.48.
Changes
--instructions-fileflag (#2): load markdown/text from a local file and append it to the upstream server'sInitializeResult.instructions, letting operators surface server-level guidance to MCP clients (e.g. Claude Code session context) without requiring an upstream change. If the upstream response already hasinstructions, the file is appended after a blank line; otherwise the file contents are used as-is. The path is resolved against cwd and read once at startup; a missing/unreadable path or missing flag value exits with an error.- Fix id-0 correlation in the proxy (#2): the message transformer used
if (!messageId), which treated JSON-RPC id0as absent. MCP SDK clients increment request ids from 0, so the very first request — typicallyinitialize— bypassed correlation entirely, silently skipping both instructions injection andtools/listfiltering. Replaced with explicitundefined/nullchecks and added regression tests for numeric id 0.
Spec reference: InitializeResult.instructions is a standard, optional field in the MCP 2025-06-18 lifecycle schema.
Install: npx @automattic/mcp-remote@0.1.48 https://remote.mcp.server/sse