Skip to content

v0.9.8: Fix Claude.ai POST SSE Initialization

Choose a tag to compare

@ma3u ma3u released this 26 Jul 17:03
· 41 commits to main since this release

What's Fixed

Based on Railway logs analysis, this release fixes Claude.ai's specific SSE initialization protocol.

Issue Identified

Railway logs showed Claude.ai sends:

POST /sse with initialization data:
{'method': 'initialize', 'params': {'protocolVersion': '2025-03-26', 'capabilities': {}, 'clientInfo': {'name': 'Anthropic/ClaudeAI', 'version': '1.0.0'}}, 'jsonrpc': '2.0', 'id': 0}

But our v0.9.7 was treating all requests the same way.

Key Changes

  • Dual SSE Protocol: Different behavior for Claude.ai POST vs browser GET
    • POST requests: Handle JSON-RPC initialization, return structured responses
    • GET requests: Simple endpoint/ping format for browsers
  • Claude.ai Protocol: Returns proper initialization response to POST /sse
  • Initialization Response: Proper JSON-RPC format with capabilities and server info
  • Ping Format: JSON format for Claude.ai, simple timestamp for browsers

Technical Details

// For Claude.ai POST requests:
event: message
data: {"jsonrpc": "2.0", "result": {...}, "id": 0}

event: ping  
data: {"timestamp": "2025-07-26T17:00:00.000Z"}

// For browser GET requests:
event: endpoint
data: /messages/?session_id=...

event: ping
data: 2025-07-26 17:00:00.000000+00:00

This should finally resolve the Claude.ai MCP connector issue by properly handling its specific initialization protocol!