MCP server instructions from initialize response not injected into context for HTTP/remote servers
Description
When connecting to an MCP server via HTTP (Streamable HTTP transport with OAuth), the instructions field returned in the server's initialize response is not injected into the model's system prompt/context.
This works correctly for stdio-transport MCP servers (e.g., aws-cloudwatch, context7) — their instructions appear in the ## MCP Server Instructions section of the system prompt. But for HTTP-transport servers (both via Claude Code CLI .mcp.json with type: "http" and via Claude Desktop/claude.ai built-in connectors), the instructions are silently dropped.
Steps to Reproduce
- Set up an MCP server with Streamable HTTP transport that returns
instructionsin theinitializeresponse:
{
"result": {
"protocolVersion": "2025-11-25",
"capabilities": { "tools": { "listChanged": false } },
"serverInfo": { "name": "my-server", "version": "1.0.0" },
"instructions": "These are my server instructions..."
}
}
- Connect to it from Claude Code or Claude Desktop via HTTP transport (with or without OAuth)
- Check the system prompt — the instructions do NOT appear under
## MCP Server Instructions
Server-side logs confirm:
initializeIS being called- Instructions ARE being returned (e.g., 2191 chars)
- The response is valid JSON-RPC with correct
protocolVersionnegotiation
Expected Behavior
The instructions field from the initialize response should be injected into the system prompt, the same way it works for stdio-transport MCP servers.
Observed Behavior
- Tools from the HTTP MCP server ARE registered (appear as deferred tools)
- But
instructionsare NOT surfaced in the system prompt - In some cases, Claude Code/Desktop skips the
initializecall entirely for HTTP servers (server logs showis_init=Falsewith no session ID), going straight totools/call
Environment
- Claude Code v2.1.87 (also tested via Claude Desktop and claude.ai)
- MCP Protocol Version: 2025-11-25
- Server transport: Streamable HTTP with OAuth (RFC 9728)
- OS: macOS (Darwin 25.3.0)
Workaround
We inject a short reminder into every tool response telling the model to call a get_context tool for full instructions. This works but shouldn't be necessary — the MCP spec's instructions field exists for this purpose.
🤖 Generated with Claude Code
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗