HTTP MCP servers with SSE require Accept header - web-search-prime returns empty results
Resolved 💬 3 comments Opened Mar 16, 2026 by russianoracle Closed Mar 20, 2026
Problem
MCP HTTP servers using Server-Sent Events (SSE) fail silently in Claude Code when the Accept header is not properly set.
Expected Behavior
HTTP MCP servers should automatically set required Accept headers for SSE streams:
Accept: application/json, text/event-stream
Actual Behavior
Claude Code returns empty results ([]) for tools like web-search-prime from Z.AI API that require SSE streaming.
Workaround
Using curl with proper headers works:
curl -H 'Authorization: Bearer TOKEN' -H 'Accept: application/json, text/event-stream' https://api.z.ai/api/mcp/web_search_prime/mcp -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
System
- Claude Code: latest
- OS: macOS
- MCP Config Type: http/sse
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗