Skip to content

Commit 5faa758

Browse files
docs: stdio transport - explicit use of stderr for logging (modelcontextprotocol#670)
* docs: stdio transport - explicit use of stderr for logging * docs: clearer instructions for how clients handle stderr --------- Co-authored-by: Felix Weinberger <[email protected]>
1 parent 37faf4e commit 5faa758

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/specification/draft/basic/transports.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ In the **stdio** transport:
2828
to its standard output (`stdout`).
2929
- Messages are individual JSON-RPC requests, notifications, or responses.
3030
- Messages are delimited by newlines, and **MUST NOT** contain embedded newlines.
31-
- The server **MAY** write UTF-8 strings to its standard error (`stderr`) for logging
32-
purposes. Clients **MAY** capture, forward, or ignore this logging.
31+
- The server **MAY** write UTF-8 strings to its standard error (`stderr`) for any
32+
logging purposes including informational, debug, and error messages.
33+
- The client **MAY** capture, forward, or ignore the server's `stderr` output
34+
and **SHOULD NOT** assume `stderr` output indicates error conditions.
3335
- The server **MUST NOT** write anything to its `stdout` that is not a valid MCP message.
3436
- The client **MUST NOT** write anything to the server's `stdin` that is not a valid MCP
3537
message.

0 commit comments

Comments
 (0)