MCP server instructions from initialize response not injected into context for HTTP/remote servers

Resolved 💬 2 comments Opened Apr 1, 2026 by ben1787 Closed May 7, 2026

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

  1. Set up an MCP server with Streamable HTTP transport that returns instructions in the initialize response:
{
  "result": {
    "protocolVersion": "2025-11-25",
    "capabilities": { "tools": { "listChanged": false } },
    "serverInfo": { "name": "my-server", "version": "1.0.0" },
    "instructions": "These are my server instructions..."
  }
}
  1. Connect to it from Claude Code or Claude Desktop via HTTP transport (with or without OAuth)
  2. Check the system prompt — the instructions do NOT appear under ## MCP Server Instructions

Server-side logs confirm:

  • initialize IS being called
  • Instructions ARE being returned (e.g., 2191 chars)
  • The response is valid JSON-RPC with correct protocolVersion negotiation

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 instructions are NOT surfaced in the system prompt
  • In some cases, Claude Code/Desktop skips the initialize call entirely for HTTP servers (server logs show is_init=False with no session ID), going straight to tools/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

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗