Skip to content

Commit b51026c

Browse files
comment abt notifications
1 parent 9f6f0b1 commit b51026c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/mcp/client/streamable_http.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ async def _handle_post_request(self, ctx: RequestContext) -> None:
281281

282282
content_type = response.headers.get(CONTENT_TYPE, "").lower()
283283

284+
# Per https://modelcontextprotocol.io/specification/2025-06-18/basic#notifications:
285+
# The server MUST NOT send a response to notifications.
284286
if isinstance(message.root, JSONRPCRequest):
285287
if content_type.startswith(JSON):
286288
await self._handle_json_response(response, ctx.read_stream_writer, is_initialization)

0 commit comments

Comments
 (0)