Skip to content

[codex] Add default Origin for streamable HTTP client#2759

Closed
tarunag10 wants to merge 2 commits into
modelcontextprotocol:mainfrom
tarunag10:codex/python-sdk-streamable-origin
Closed

[codex] Add default Origin for streamable HTTP client#2759
tarunag10 wants to merge 2 commits into
modelcontextprotocol:mainfrom
tarunag10:codex/python-sdk-streamable-origin

Conversation

@tarunag10

Copy link
Copy Markdown

Summary

  • derive a default Origin from the streamable HTTP target URL
  • send that origin on streamable HTTP requests when the caller has not configured one
  • preserve caller-provided Origin headers and avoid mutating provided httpx.AsyncClient headers

Validation

  • uv run pytest tests/shared/test_streamable_http.py -k "default_origin or preserves_custom_origin"
  • uv run pytest tests/shared/test_streamable_http.py
  • uv run ruff check src/mcp/client/streamable_http.py tests/shared/test_streamable_http.py
  • uv run ruff format --check src/mcp/client/streamable_http.py tests/shared/test_streamable_http.py

Addresses #2727.

@Kludex

Kludex commented Jun 25, 2026

Copy link
Copy Markdown
Member

You've opened a duplicated pull request, please search opened PRs before creating new ones. Duplicated from #2729.

@Kludex Kludex closed this Jun 25, 2026
@modelcontextprotocol modelcontextprotocol locked as resolved and limited conversation to collaborators Jun 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants