Blazorise Version
2.2
Summary
The hosted docs MCP server at https://mcp.blazorise.com/mcp responds to JSON-RPC requests with an SSE-framed body (event: message\ndata: {…}) while setting the response header Content-Type: application/json. Clients that honor the declared content type try to JSON.parse the body, hit the leading event: token, and fail. In Claude Code this surfaces as:
Failed to reconnect to blazorise-docs: JSON Parse error: Unexpected identifier "event"
Environment
- Server: Blazorise.Docs.Mcp v1.0.0.0 (reported in serverInfo), hosted on Microsoft-IIS/10.0 / ASP.NET
- Endpoint: https://mcp.blazorise.com/mcp
- Client: Claude Code MCP client, transport type: "http" (Streamable HTTP)
- Client config (.mcp.json):
{
"mcpServers": {
"blazorise-docs": { "type": "http", "url": "https://mcp.blazorise.com/mcp" }
}
}
Steps to reproduce
curl -i -X POST "https://mcp.blazorise.com/mcp"
-H "Content-Type: application/json"
-H "Accept: application/json, text/event-stream"
--data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"0.0.0"}}}'
Actual response
HTTP/1.1 200 OK
Content-Type: application/json <-- declares JSON
Server: Microsoft-IIS/10.0
mcp-session-id: c2293eb794bf48d0a4c3d801f0f284b9
X-Powered-By: ASP.NET
event: message <-- but body is SSE framing
data: {"result":{"protocolVersion":"2025-06-18","capabilities":{"logging":{},"tools":{"listChanged":true}},"serverInfo":{"name":"Blazorise.Docs.Mcp","version":"1.0.0.0"}},"id":1,"jsonrpc":"2.0"}
The header and the body disagree: the payload is an event:/data: SSE event, but the Content-Type says application/json.
Expected behavior
Per the MCP Streamable HTTP spec, the server must make the body match the content type:
- If it streams events → set Content-Type: text/event-stream (so the client runs its SSE parser), or
- If it sets Content-Type: application/json → return the bare JSON-RPC object with no event:/data: lines.
Currently it does neither (SSE body + JSON header), so any client that picks its parser from Content-Type fails to initialize.
Suggested fix
Set the response Content-Type to text/event-stream whenever the handler emits SSE framing (this is almost certainly a content-negotiation/content-type bug in the IIS/ASP.NET MCP transport layer — the body is correct, only the header is wrong). Echoing back the Accept negotiation correctly would also resolve it.
Blazorise Version
2.2
Summary
The hosted docs MCP server at https://mcp.blazorise.com/mcp responds to JSON-RPC requests with an SSE-framed body (event: message\ndata: {…}) while setting the response header Content-Type: application/json. Clients that honor the declared content type try to JSON.parse the body, hit the leading event: token, and fail. In Claude Code this surfaces as:
Failed to reconnect to blazorise-docs: JSON Parse error: Unexpected identifier "event"
Environment
{
"mcpServers": {
"blazorise-docs": { "type": "http", "url": "https://mcp.blazorise.com/mcp" }
}
}
Steps to reproduce
curl -i -X POST "https://mcp.blazorise.com/mcp"
-H "Content-Type: application/json"
-H "Accept: application/json, text/event-stream"
--data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"probe","version":"0.0.0"}}}'
Actual response
HTTP/1.1 200 OK
Content-Type: application/json <-- declares JSON
Server: Microsoft-IIS/10.0
mcp-session-id: c2293eb794bf48d0a4c3d801f0f284b9
X-Powered-By: ASP.NET
event: message <-- but body is SSE framing
data: {"result":{"protocolVersion":"2025-06-18","capabilities":{"logging":{},"tools":{"listChanged":true}},"serverInfo":{"name":"Blazorise.Docs.Mcp","version":"1.0.0.0"}},"id":1,"jsonrpc":"2.0"}
The header and the body disagree: the payload is an event:/data: SSE event, but the Content-Type says application/json.
Expected behavior
Per the MCP Streamable HTTP spec, the server must make the body match the content type:
Currently it does neither (SSE body + JSON header), so any client that picks its parser from Content-Type fails to initialize.
Suggested fix
Set the response Content-Type to text/event-stream whenever the handler emits SSE framing (this is almost certainly a content-negotiation/content-type bug in the IIS/ASP.NET MCP transport layer — the body is correct, only the header is wrong). Echoing back the Accept negotiation correctly would also resolve it.