Merge pull request #245 from koic/fix_sse_response_status

Return 202 Accepted for SSE responses per MCP spec
This commit is contained in:
Koichi ITO 2026-03-01 17:17:26 +09:00 • committed by GitHub
commit 76ab822ad7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -288,7 +288,7 @@ module MCP
def send_response_to_stream(stream, response, session_id)
message = JSON.parse(response)
send_to_stream(stream, message)
[200, { "Content-Type" => "application/json" }, [{ accepted: true }.to_json]]
handle_accepted
rescue IOError, Errno::EPIPE => e
MCP.configuration.exception_reporter.call(
e,