You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f98f5f3
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/client/transports.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ environment variables or pass an explicit `verify=ssl_context` to your `httpx2.A
82
82
83
83
The transport connects to the URL you gave it, and only that origin.
84
84
85
-
* A redirect that stays on the same scheme, host and port is followed. That covers the usual `/mcp` → `/mcp/`trailing-slash redirect, and `http://` → `https://`on the same host.
85
+
* A `307`/`308`redirect that stays on the same scheme, host and port is followed, and so is `http://` → `https://`on the same host. That covers the usual `/mcp` → `/mcp/`trailing-slash redirect.
86
86
* A redirect anywhere else is **not** followed. The call fails with:
87
87
88
88
```text
@@ -136,7 +136,7 @@ A **transport** is any async context manager that yields a `(read, write)` pair
136
136
*`Client(mcp)` (the server object) connects in memory. Use it for tests and for embedding.
137
137
*`Client("http://.../mcp")` (a URL) connects over Streamable HTTP, the production transport.
138
138
* Headers, auth, proxies and timeouts belong on an `httpx2.AsyncClient` you pass to `streamable_http_client(url, http_client=...)`. There is no `headers=` keyword.
139
-
* Redirects are followed only within the URL's own origin (trailing slash, `http`→`https`). Anything else fails with `Redirect to … not followed`; configure the final URL.
139
+
* Redirects are followed only within the URL's own origin (a trailing-slash`307`/`308`), plus `http`→`https` on the same host. Anything else fails with `Redirect to … not followed`; configure the final URL.
140
140
* stdio is `Client(StdioServerParameters(...))`. Wrap it in `stdio_client(...)` yourself only to redirect the child's stderr.
141
141
* The subprocess gets an allow-listed environment, not yours; `env=` adds to it.
142
142
* A transport is anything you can `async with x as (read, write)`. `Client` hands anything that isn't a server object, a URL or `StdioServerParameters` straight to that protocol.
0 commit comments