Skip to content

docs: use request summaries for HTTP troubleshooting - #1380

Open
harsh543 wants to merge 1 commit into
modelcontextprotocol:mainfrom
harsh543:codex/privacy-safe-http-observability
Open

harsh543 wants to merge 1 commit into
modelcontextprotocol:mainfrom
harsh543:codex/privacy-safe-http-observability

Conversation

@harsh543

Copy link
Copy Markdown

The troubleshooting guide's HTTP example buffered and printed each complete JSON-RPC body. That is useful during local debugging, but it also encourages recording tool arguments and other potentially sensitive request data.

Use StreamableHTTPOptions.OnRequestSummary in the example instead. The callback exposes the decoded method and message kind without exposing params. The guide also explains the callback's coverage boundary and recommends body-free HTTP middleware for failures rejected before decoding.

The example remains executable, and the generated docs/troubleshooting.md is updated from its source.

Tests:

  • go test ./mcp ./internal/docs
  • go build ./...
  • go test ./...

AI assistance disclosure: I used Codex to inspect the newly added request-summary API and draft the documentation change; I reviewed the resulting code, generated docs, and test output.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T05:32:11.832985Z 097945f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 097945fefa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


%include ../../mcp/streamable_example_test.go httpmiddleware -
The callback runs before validation and dispatch. It does not run for batches
or requests rejected before message decoding. To observe those failures, wrap

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Describe every pre-callback rejection gap

For a stateless or ephemeral request whose EventStore.Open fails, ephemeralConnectOpts has already decoded the valid single-message body before connectStreamable returns without calling StreamableServerTransport.ServeHTTP, so OnRequestSummary is skipped even though this is neither a batch nor a pre-decoding rejection. The stated boundary therefore gives operators the wrong expectation for connection failures; describe the gap as any HTTP, authorization, session-routing, or connection rejection before the callback, then regenerate the published page.

AGENTS.md reference: AGENTS.md:L55-L58

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant