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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The [Model Context Protocol](https://modelcontextprotocol.io) lets you build ser

- **Build MCP servers** that expose tools, resources, and prompts to any MCP host
- **Build MCP clients** that connect to any MCP server
- Speak every standard transport: stdio, Streamable HTTP, and SSE
- Speak every standard transport: stdio and Streamable HTTP, plus the deprecated legacy HTTP+SSE

## Requirements

Expand Down
2 changes: 1 addition & 1 deletion docs/client/session-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Create a `ClientSessionGroup` and call **`connect_to_server`** once per server:
--8<-- "docs_src/session_groups/tutorial003.py"
```

* `connect_to_server` takes transport parameters, not a server object: `StdioServerParameters` (from `mcp`) to launch a subprocess, or `StreamableHttpParameters` / `SseServerParameters` (from `mcp.client.session_group`) for a server already listening on a URL.
* `connect_to_server` takes transport parameters, not a server object: `StdioServerParameters` (from `mcp`) to launch a subprocess, or `StreamableHttpParameters` (from `mcp.client.session_group`) for a server already listening on a URL. `SseServerParameters` is still accepted for a server on the deprecated HTTP+SSE transport, and warns.
* `group.tools` is a `dict[str, Tool]` of every connected server's tools. `group.resources` and `group.prompts` are the same shape.
* `group.call_tool(name, arguments)` looks the name up, finds the session that owns it, and forwards the call. You never say which server.

Expand Down
2 changes: 1 addition & 1 deletion docs/client/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Leaving the `async with` block also shuts the subprocess down: close stdin, wait

## SSE

`sse_client(url)`, from `mcp.client.sse`, is the HTTP transport that Streamable HTTP superseded. Wrap it the same way, `Client(sse_client("http://localhost:8000/sse"))`, to talk to a server that still speaks it, and don't build anything new on it.
`sse_client(url)`, from `mcp.client.sse`, is the HTTP transport that Streamable HTTP superseded, and it is now formally deprecated ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)): calling it emits `MCPDeprecationWarning` (see **[Deprecated features](../deprecated.md)**). Wrap it the same way, `Client(sse_client("http://localhost:8000/sse"))`, to talk to a server that still speaks it, and don't build anything new on it.

## The `Transport` protocol

Expand Down
11 changes: 7 additions & 4 deletions docs/deprecated.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Deprecated features

The 2026-07-28 spec retires five things. The SDK still implements every one of them, and every one of them now carries a **deprecation warning**.
The 2026-07-28 spec retires five things, and the spec's deprecation registry carries a sixth from earlier: the legacy HTTP+SSE transport. The SDK still implements every one of them, and every one of them now carries a **deprecation warning**.

The table below names each deprecated feature, why it is going away, and the replacement to build on.

Expand All @@ -13,18 +13,20 @@ The table below names each deprecated feature, why it is going away, and the rep
| **Protocol logging**: `ctx.log()`, `ctx.debug()`, `ctx.info()`, `ctx.warning()`, `ctx.error()`, `ctx.session.send_log_message()`, `client.set_logging_level()` | SEP-2577 retires the capability. Nothing in-protocol replaces it. | Ordinary `import logging` to stderr (see **[Logging](handlers/logging.md)**). |
| **`ping`**: `client.send_ping()` | **Removed** from the protocol, not merely deprecated. There is no `ping` method in 2026-07-28. | Nothing. It only works against a `mode="legacy"` connection. |
| **Client->server progress**: `client.send_progress_notification()` | 2026-07-28 makes progress server->client only. | Nothing to send. Your *server* reports progress with `ctx.report_progress()` (see **[Progress](handlers/progress.md)**). |
| **HTTP+SSE transport**: `sse_client()`, `SseServerParameters`, `mcp.sse_app()`, `mcp.run(transport="sse")`, `SseServerTransport` | Superseded by Streamable HTTP in the 2025-03-26 spec; [SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596) formally classifies it as deprecated. | Streamable HTTP: `Client(url)` / `streamable_http_client()` on the client, `mcp.run(transport="streamable-http")` / `streamable_http_app()` on the server (see **[Running your server](run/index.md)** and **[Transports](client/transports.md)**). |

Three things fall out of that table:
Four things fall out of that table:

* Roots, sampling, and logging go together. One proposal, **SEP-2577**, deprecates all three capabilities at once.
* Sampling and roots share a deeper problem: they are places a **server** sends a **request** to the **client**. That whole direction is what 2026-07-28 replaces with **[Multi-round-trip requests](handlers/multi-round-trip.md)**. It is the standalone RPC methods (`sampling/createMessage`, `roots/list`, and push-style `elicitation/create`) that are gone; the `CreateMessageRequest` / `ListRootsRequest` / `ElicitRequest` payload types survive, embedded in `InputRequiredResult.input_requests`, and on the client they hit the same callbacks.
* `ping` is the odd one out. The protocol does not deprecate it, it removes it. The SDK method still warns (its message says *removed*, not *deprecated*) and calling it on a modern connection answers with *"Method not found"*.
* The transport is odd in the other direction: it is not part of the 2026-07-28 story at all. Streamable HTTP superseded HTTP+SSE back in 2025-03-26, and it has been the "don't build on it" transport ever since; SEP-2596's feature-lifecycle policy simply put it on the formal register. It is also the only row that is a transport rather than a capability, so it doesn't turn on the negotiated version: the same `streamable_http_app()` serves both eras of client (see **[Serving legacy clients](run/legacy-clients.md)**), and nothing needs SSE.

## Deprecated is advisory

Nothing breaks today.

Every method above keeps working against any session that negotiated **2025-11-25 or earlier**. Pin `mode="legacy"` on the client and you get exactly the pre-2026 behaviour. There are no wire changes and capability negotiation is unchanged.
Every method above keeps working against any session that negotiated **2025-11-25 or earlier**. Pin `mode="legacy"` on the client and you get exactly the pre-2026 behaviour. There are no wire changes and capability negotiation is unchanged. The transport row is simpler still: `sse_client()` and `sse_app()` do exactly what they always did, wire and all; they just warn when you call them.

What changes is that you get a visible warning the first time each one runs:

Expand Down Expand Up @@ -82,7 +84,8 @@ That is the whole API. There is no per-method switch, and you don't want one: th
## Recap

* The 2026-07-28 spec deprecates **roots**, server-initiated **sampling**, and protocol **logging** (all [SEP-2577](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2577)), restricts **progress** to server-to-client, and removes **`ping`**.
* The replacement column points you onward: **[Multi-round-trip requests](handlers/multi-round-trip.md)** for sampling and roots, **[Logging](handlers/logging.md)** for logging, **[Progress](handlers/progress.md)** for progress. `ping` needs nothing at all.
* The legacy **HTTP+SSE transport** is deprecated too ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)), superseded by Streamable HTTP since 2025-03-26.
* The replacement column points you onward: **[Multi-round-trip requests](handlers/multi-round-trip.md)** for sampling and roots, **[Logging](handlers/logging.md)** for logging, **[Progress](handlers/progress.md)** for progress, Streamable HTTP for the transport. `ping` needs nothing at all.
* Deprecated is advisory: no wire changes, everything keeps working against pre-2026 sessions, and you get a visible `MCPDeprecationWarning` (a `UserWarning`, so it is on by default).
* Sampling and roots additionally need a back-channel that a 2026-07-28 session does not have. On a modern connection they warn and then they raise.
* `warnings.filterwarnings("ignore", category=MCPDeprecationWarning)` silences the whole category; `"error::mcp.MCPDeprecationWarning"` in pytest turns it into a test failure.
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This is the official Python SDK for it. With it you can:

* **Build MCP servers** that expose tools, resources, and prompts to any MCP host.
* **Build MCP clients** that connect to any MCP server.
* Speak every standard transport: stdio, Streamable HTTP, and SSE.
* Speak every standard transport: stdio and Streamable HTTP, plus the deprecated legacy HTTP+SSE.

## Requirements

Expand Down
12 changes: 11 additions & 1 deletion docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Every section heading below names the API it affects, so searching this page for
| Lowlevel return value wrapping removed | bare list or dict returns fail result validation instead of being wrapped | [wrapping removed](#lowlevel-server-automatic-return-value-wrapping-removed) |
| Lowlevel tool exceptions no longer become `isError: true` results | clients raise a JSON-RPC error instead of seeing the error text | [tool exceptions](#lowlevel-server-tool-handler-exceptions-no-longer-become-calltoolresultis_errortrue) |
| Roots, Sampling, and Logging deprecated (SEP-2577) | `MCPDeprecationWarning` at call sites | [SEP-2577](#roots-sampling-and-logging-methods-deprecated-sep-2577) |
| HTTP+SSE transport deprecated (SEP-2596) | `MCPDeprecationWarning` from `sse_client`, `sse_app`, `run(transport="sse")` | [SEP-2596](#httpsse-transport-deprecated-sep-2596) |

### Find your area

Expand All @@ -41,7 +42,7 @@ Every section heading below names the API it affects, so searching this page for
| maintain OAuth client auth or a protected server | [OAuth and server auth](#oauth-and-server-auth) |
| relied on lenient handling of off-schema traffic, or assert on exact wire bytes | [Stricter protocol validation and wire behavior](#stricter-protocol-validation-and-wire-behavior) |
| test against in-memory server/client pairs | [Testing utilities](#testing-utilities) |
| use roots, sampling, logging, or client-to-server progress | [Deprecations](#deprecations) |
| use roots, sampling, logging, client-to-server progress, or the HTTP+SSE transport | [Deprecations](#deprecations) |
| operate servers that 2026-era clients will also connect to | [Notes for 2026-era connections](#notes-for-2026-era-connections) |

## Suggested migration order
Expand Down Expand Up @@ -2792,6 +2793,15 @@ The 2026-07-28 spec restricts `notifications/progress` to the server-to-client d

On the server side, prefer the new dispatcher-agnostic `ServerSession.report_progress(progress, total, message)` (and `Context.report_progress()` on `MCPServer`) over the raw `ServerSession.send_progress_notification(progress_token, …)`. `report_progress` encapsulates the "no-op when the caller did not request progress" rule and works on every dispatcher; the raw token-taking form remains for handlers that read `_meta.progressToken` directly.

### HTTP+SSE transport deprecated (SEP-2596)

The legacy HTTP+SSE transport (a `GET` that opens an event stream, plus a separate `POST` message endpoint) was superseded by Streamable HTTP in protocol revision 2025-03-26, and the spec's feature-lifecycle policy ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)) now formally classifies it as Deprecated with Streamable HTTP as the migration path. The SDK still ships it, and every entry point now carries `typing_extensions.deprecated` and emits `mcp.MCPDeprecationWarning`:

- Client: `mcp.client.sse.sse_client()`, and `SseServerParameters` for `ClientSessionGroup.connect_to_server()`.
- Server: `MCPServer.sse_app()`, `MCPServer.run_sse_async()`, `mcp.run(transport="sse")`, and the lowlevel `mcp.server.sse.SseServerTransport`.

Streamable HTTP is not deprecated: `streamable_http_client()` / `Client(url)` on the client, `streamable_http_app()` / `mcp.run(transport="streamable-http")` on the server. Migrate when you can; a deployment that must keep answering unmigrated SSE clients can keep serving `sse_app()` alongside the Streamable HTTP app and filter the warning as [above](#roots-sampling-and-logging-methods-deprecated-sep-2577). Two adjacent housekeeping changes: `mcp run --transport` now advertises `stdio` and `streamable-http` only, and `python -m mcp.client <url>` connects with Streamable HTTP (it previously used SSE for any `http(s)` URL).

## Notes for 2026-era connections

Everything below this heading describes behavior that only activates on connections
Expand Down
2 changes: 1 addition & 1 deletion docs/run/asgi.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Run the app on its own (`uvicorn server:app`) and you never think about either.
nothing here; **[Deploy & scale](deploy.md)** explains what it actually controls.
**[Running your server](index.md)** covers the options themselves.

`mcp.sse_app()` does the same for the superseded SSE transport.
`mcp.sse_app()` does the same for the deprecated HTTP+SSE transport, and warns when you call it (**[Deprecated features](../deprecated.md)**).

## Localhost only, until you say otherwise

Expand Down
9 changes: 6 additions & 3 deletions docs/run/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ The only decision you make is the **transport**: how the bytes between your serv
|---|---|---|
| `stdio` | The host launches your file as a subprocess and speaks over its stdin and stdout. | Local servers. The default. |
| `streamable-http` | A real HTTP server listening on a port. | Anything you deploy. |
| `sse` | The older HTTP transport. | You don't. |
| `sse` | The older HTTP transport. **Deprecated.** | You don't. |

!!! warning
SSE was superseded by Streamable HTTP in the 2025-03-26 protocol revision.
HTTP+SSE was superseded by Streamable HTTP in the 2025-03-26 protocol revision and is
now formally deprecated ([SEP-2596](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2596)).
`mcp.run(transport="sse")` still works, with its own `sse_path=` and `message_path=`
options, but it exists for clients that haven't moved. Don't build anything new on it.
options, but it warns (`MCPDeprecationWarning`) and it exists only for clients that
haven't moved. Don't build anything new on it; **[Deprecated features](../deprecated.md)**
has the full row.

## `mcp.run()`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
from mcp.client._transport import ReadStream, WriteStream
from mcp.client.auth import AuthorizationCodeResult, OAuthClientProvider, TokenStorage
from mcp.client.session import ClientSession
from mcp.client.sse import sse_client
from mcp.client.sse import (
sse_client, # pyright: ignore[reportDeprecated] # deprecated HTTP+SSE, kept for legacy servers
)
from mcp.client.streamable_http import streamable_http_client
from mcp.shared.auth import OAuthClientInformationFull, OAuthClientMetadata, OAuthToken
from mcp.shared.message import SessionMessage
Expand Down Expand Up @@ -224,8 +226,8 @@ async def _default_redirect_handler(authorization_url: str) -> None:

# Create transport with auth handler based on transport type
if self.transport_type == "sse":
print("📡 Opening SSE transport connection with auth...")
async with sse_client(
print("📡 Opening SSE transport connection with auth (deprecated transport)...")
async with sse_client( # pyright: ignore[reportDeprecated]
url=self.server_url,
auth=oauth_auth,
timeout=60.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ async def get_time() -> dict[str, Any]:
"--transport",
default="streamable-http",
type=click.Choice(["sse", "streamable-http"]),
help="Transport protocol to use ('sse' or 'streamable-http')",
help="Transport protocol to use ('streamable-http', or the deprecated 'sse')",
)
def main(port: int, transport: Literal["sse", "streamable-http"]) -> int:
"""Run the simple auth MCP server."""
Expand All @@ -129,7 +129,8 @@ def main(port: int, transport: Literal["sse", "streamable-http"]) -> int:

mcp_server = create_simple_mcp_server(server_settings, auth_settings)
logger.info(f"🚀 MCP Legacy Server running on {server_url}")
mcp_server.run(transport=transport, host=host, port=port)
# transport may be the deprecated HTTP+SSE transport, kept here for legacy clients
mcp_server.run(transport=transport, host=host, port=port) # pyright: ignore[reportDeprecated]
return 0


Expand Down
5 changes: 3 additions & 2 deletions examples/servers/simple-auth/mcp_simple_auth/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def get_time() -> dict[str, Any]:
"--transport",
default="streamable-http",
type=click.Choice(["sse", "streamable-http"]),
help="Transport protocol to use ('sse' or 'streamable-http')",
help="Transport protocol to use ('streamable-http', or the deprecated 'sse')",
)
@click.option(
"--oauth-strict",
Expand Down Expand Up @@ -149,7 +149,8 @@ def main(port: int, auth_server: str, transport: Literal["sse", "streamable-http
logger.info(f"🔑 Using Authorization Server: {settings.auth_server_url}")

# Run the server - this should block and keep running
mcp_server.run(transport=transport, host=host, port=port)
# transport may be the deprecated HTTP+SSE transport, kept here for legacy clients
mcp_server.run(transport=transport, host=host, port=port) # pyright: ignore[reportDeprecated]
logger.info("Server stopped")
return 0
except Exception:
Expand Down
8 changes: 4 additions & 4 deletions examples/snippets/clients/url_elicitation_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import mcp.types as types
from mcp import ClientSession
from mcp.client.context import ClientRequestContext
from mcp.client.sse import sse_client
from mcp.client.streamable_http import streamable_http_client
from mcp.shared.exceptions import MCPError, UrlElicitationRequiredError
from mcp.types import URL_ELICITATION_REQUIRED

Expand Down Expand Up @@ -280,16 +280,16 @@ async def run_command_loop(session: ClientSession) -> None:

async def main() -> None:
"""Run the interactive URL elicitation client."""
server_url = "http://localhost:8000/sse"
server_url = "http://localhost:8000/mcp"

print("=" * 60)
print("URL Elicitation Client Example")
print("=" * 60)
print(f"\nConnecting to: {server_url}")
print("(Start server with: cd examples/snippets && uv run server elicitation sse)")
print("(Start server with: cd examples/snippets && uv run server elicitation streamable-http)")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: When the initial Streamable HTTP connection is refused, the recovery message still tells users to start the server with sse. That starts the legacy transport instead of the /mcp endpoint this client now targets, so following the error guidance leaves the retry unable to connect. Updating the fallback (and the module usage text) to streamable-http would keep the example runnable.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At examples/snippets/clients/url_elicitation_client.py, line 289:

<comment>When the initial Streamable HTTP connection is refused, the recovery message still tells users to start the server with `sse`. That starts the legacy transport instead of the `/mcp` endpoint this client now targets, so following the error guidance leaves the retry unable to connect. Updating the fallback (and the module usage text) to `streamable-http` would keep the example runnable.</comment>

<file context>
@@ -280,16 +280,16 @@ async def run_command_loop(session: ClientSession) -> None:
     print("=" * 60)
     print(f"\nConnecting to: {server_url}")
-    print("(Start server with: cd examples/snippets && uv run server elicitation sse)")
+    print("(Start server with: cd examples/snippets && uv run server elicitation streamable-http)")
 
     try:
</file context>


try:
async with sse_client(server_url) as (read, write):
async with streamable_http_client(server_url) as (read, write):
async with ClientSession(
read,
write,
Comment on lines +283 to 295

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 The migration of this client to Streamable HTTP left two stale instructions that still say to start the server in SSE mode: the module docstring (uv run server elicitation sse, ~line 20) and the ConnectionRefusedError handler (line 305). Following either starts the server on the legacy /sse endpoint while this client now connects to /mcp, so the connection fails — and the failure message then repeats the wrong command. Both should say streamable-http to match the updated hint in main().

Extended reasoning...

What the bug is. This PR migrates examples/snippets/clients/url_elicitation_client.py from sse_client to streamable_http_client: the import changes, server_url becomes http://localhost:8000/mcp, and the startup hint printed in main() (line 289) is updated to uv run server elicitation streamable-http. But two other references to the old command in the same file were missed:

  1. The module docstring (~line 20): uv run server elicitation sse
  2. The ConnectionRefusedError handler (line 305): print(" cd examples/snippets && uv run server elicitation sse")

The code path that triggers it. The snippets server runner (examples/snippets/servers/__init__.py) dispatches its transport argument to mcp.run(transport), so uv run server elicitation sse really does start the server on the legacy HTTP+SSE transport, serving /sse and /messages/ — there is no /mcp endpoint in that mode.

Step-by-step proof.

  1. A user reads the module docstring and runs cd examples/snippets && uv run server elicitation sse. The server starts, listening for legacy SSE clients at http://localhost:8000/sse.
  2. They run the client. It calls streamable_http_client("http://localhost:8000/mcp") (lines 283, 292) and POSTs to /mcp.
  3. The SSE-mode Starlette app has no /mcp route, so the request fails (404 → connection error surfaced to the user).
  4. The client's error path prints Make sure the elicitation server is running: cd examples/snippets && uv run server elicitation sse — the exact command the user already ran. The recovery instruction loops them back into the failure.

Beyond the connection failure, following the stale instruction also puts the user on the transport this very PR is deprecating: the server run emits MCPDeprecationWarning, the opposite of what the snippet is meant to demonstrate post-migration.

Why nothing catches it. These are string literals in comments and print statements — no type checker, test, or the new deprecation warnings can flag them. The example only fails when run interactively against a real server, which CI doesn't do.

Impact and fix. Impact is confined to this example: the primary hint in main() (line 289) is correct, so a user who starts from the printed banner is fine; only users who follow the docstring or the error-path message get misdirected. The fix is a single root cause with two one-line string changes — replace sse with streamable-http in the docstring and in the ConnectionRefusedError handler, matching line 289 exactly (the runner accepts streamable-http as a transport argument, verified against examples/snippets/servers/__init__.py).

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ filterwarnings = [
# 2026-07-28 drops ping; Client.send_ping() is advisory-deprecated and the
# legacy interaction/transport tests still drive it.
"ignore:ping is removed as of 2026-07-28.*:mcp.MCPDeprecationWarning",
# SEP-2596 deprecates the HTTP+SSE transport; the SDK still ships it for
# servers/clients that haven't migrated, and the tests still exercise it.
"ignore:.*HTTP\\+SSE transport is deprecated as of 2025-03-26.*:mcp.MCPDeprecationWarning",

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: The suite-wide ignore masks this SDK's new deprecation warning at every call site, so future tests can accidentally introduce legacy HTTP+SSE usage without failing. The existing legacy-transport tests can keep a module- or test-level filterwarnings marker instead, which preserves the warning-as-error guard for all other code paths.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pyproject.toml, line 271:

<comment>The suite-wide ignore masks this SDK's new deprecation warning at every call site, so future tests can accidentally introduce legacy HTTP+SSE usage without failing. The existing legacy-transport tests can keep a module- or test-level `filterwarnings` marker instead, which preserves the warning-as-error guard for all other code paths.</comment>

<file context>
@@ -266,6 +266,9 @@ filterwarnings = [
     "ignore:ping is removed as of 2026-07-28.*:mcp.MCPDeprecationWarning",
+    # SEP-2596 deprecates the HTTP+SSE transport; the SDK still ships it for
+    # servers/clients that haven't migrated, and the tests still exercise it.
+    "ignore:.*HTTP\\+SSE transport is deprecated as of 2025-03-26.*:mcp.MCPDeprecationWarning",
 ]
 
</file context>

]

[tool.markdown.lint]
Expand Down
2 changes: 1 addition & 1 deletion src/mcp/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def run(
typer.Option(
"--transport",
"-t",
help="Transport protocol to use (stdio or sse)",
help="Transport protocol to use (stdio or streamable-http)",
),
] = None,
) -> None: # pragma: no cover
Expand Down
6 changes: 3 additions & 3 deletions src/mcp/client/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

from mcp.client._transport import ReadStream, WriteStream
from mcp.client.session import ClientSession, IncomingMessage
from mcp.client.sse import sse_client
from mcp.client.stdio import StdioServerParameters, stdio_client
from mcp.client.streamable_http import streamable_http_client
from mcp.shared.message import SessionMessage

if not sys.warnoptions:
Expand Down Expand Up @@ -49,8 +49,8 @@ async def main(command_or_url: str, args: list[str], env: list[tuple[str, str]])
env_dict = dict(env)

if urlparse(command_or_url).scheme in ("http", "https"):
# Use SSE client for HTTP(S) URLs
async with sse_client(command_or_url) as streams:
# Use Streamable HTTP client for HTTP(S) URLs
async with streamable_http_client(command_or_url) as streams:
await run_session(*streams)
else:
# Use stdio client for commands
Expand Down
Loading
Loading