Skip to content

feat: add ModifyRequest hook to client transports#569

Closed
n33levo wants to merge 1 commit into
modelcontextprotocol:mainfrom
n33levo:modify-request-hook
Closed

feat: add ModifyRequest hook to client transports#569
n33levo wants to merge 1 commit into
modelcontextprotocol:mainfrom
n33levo:modify-request-hook

Conversation

@n33levo

@n33levo n33levo commented Oct 10, 2025

Copy link
Copy Markdown

Summary

  • add optional ModifyRequest callback to StreamableClientTransport and SSEClientTransport so callers can inject auth headers
  • cover new hooks with transport tests to ensure requests carry custom headers across POST/GET/DELETE

Testing

  • go test ./...

Fixes #533

@manuelibar

Copy link
Copy Markdown
Contributor

@n33levo I think this PR duplicates this one

@jba

jba commented Oct 13, 2025

Copy link
Copy Markdown
Contributor

@n33levo does this add anything new to? #546? If so, what? If not, please close.

@n33levo

n33levo commented Oct 13, 2025

Copy link
Copy Markdown
Author

I implemented the ModifyRequest feature in PR #569, but I see @manuelibar has a more comprehensive implementation in PR #546 that covers the same functionality. I'm closing my PR to avoid duplication. The feature works great and addresses the original request perfectly!

@n33levo n33levo closed this Oct 13, 2025
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.

Proposal: add ModifyRequest func(*http.Request) to HTTP client transports

3 participants