Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ SDK, as well as inspecting MCP traffic.
## Collecting MCP logs

For [stdio](protocol.md#stdio-transport) transport connections, you can also
inspect MCP traffic using a `LoggingTransport`:
inspect JSON-RPC messages using a `LoggingTransport`:

`LoggingTransport` logs re-encoded JSON-RPC messages, not the original byte
stream. Whitespace, JSON member order, and transport framing can differ from
the transmitted bytes. To inspect the exact stdio bytes, record the underlying
reads and writes, for example at the `Reader` and `Writer` of an `IOTransport`.

```go
func ExampleLoggingTransport() {
Expand Down
7 changes: 6 additions & 1 deletion internal/docs/troubleshooting.src.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ SDK, as well as inspecting MCP traffic.
## Collecting MCP logs

For [stdio](protocol.md#stdio-transport) transport connections, you can also
inspect MCP traffic using a `LoggingTransport`:
inspect JSON-RPC messages using a `LoggingTransport`:

`LoggingTransport` logs re-encoded JSON-RPC messages, not the original byte
stream. Whitespace, JSON member order, and transport framing can differ from
the transmitted bytes. To inspect the exact stdio bytes, record the underlying
reads and writes, for example at the `Reader` and `Writer` of an `IOTransport`.

%include ../../mcp/transport_example_test.go loggingtransport -

Expand Down