feat!: remove SSE transport support (#562)
SSE transport has been removed from the MCP specification in favor of streamable HTTP. This removes all SSE-specific transport code: - Remove `transport-sse-client` and `transport-sse-server` features - Remove `SseClientTransport` and `SseServer` types - Remove SSE-specific examples (`counter_sse`, `counter_sse_directly`) - Migrate auth examples from SSE to streamable HTTP - Update tests to remove SSE transport usage - Update documentation BREAKING CHANGE: The following have been removed: - `transport-sse-client` feature - `transport-sse-client-reqwest` feature - `transport-sse-server` feature - `SseClientTransport` type - `SseServer` type - `sse_client` and `sse_server` modules Users should migrate to streamable HTTP transport which provides equivalent functionality. See `StreamableHttpClientTransport` and `StreamableHttpService` for the replacement APIs. Ref: https://github.com/modelcontextprotocol/rust-sdk/pull/561#issuecomment-3576551699
This commit is contained in:
parent
3dee024325
commit
eb5a7f7408
1 changed files with 164 additions and 1688 deletions
|
|
@ -33,7 +33,7 @@ schemars = { version = "1.0", optional = true, features = ["chrono04"] }
|
|||
# for image encoding
|
||||
base64 = { version = "0.22", optional = true }
|
||||
|
||||
# for SSE client
|
||||
# for HTTP client
|
||||
reqwest = { version = "0.12", default-features = false, features = [
|
||||
"json",
|
||||
"stream",
|
||||
|
|
@ -99,20 +99,16 @@ server-side-http = [
|
|||
"dep:sse-stream",
|
||||
"tower",
|
||||
]
|
||||
# SSE client
|
||||
client-side-sse = ["dep:sse-stream", "dep:http"]
|
||||
|
||||
transport-sse-client = ["client-side-sse", "transport-worker"]
|
||||
transport-sse-client-reqwest = ["transport-sse-client", "reqwest"]
|
||||
|
||||
transport-worker = ["dep:tokio-stream"]
|
||||
|
||||
# SSE stream parsing utilities (used by streamable HTTP client for SSE-formatted responses)
|
||||
client-side-sse = ["dep:sse-stream", "dep:http"]
|
||||
|
||||
# Streamable HTTP client
|
||||
transport-streamable-http-client = ["client-side-sse", "transport-worker"]
|
||||
transport-streamable-http-client-reqwest = ["transport-streamable-http-client", "reqwest"]
|
||||
|
||||
|
||||
transport-async-rw = ["tokio/io-util", "tokio-util/codec"]
|
||||
transport-io = ["transport-async-rw", "tokio/io-std"]
|
||||
transport-child-process = [
|
||||
|
|
@ -120,12 +116,6 @@ transport-child-process = [
|
|||
"tokio/process",
|
||||
"dep:process-wrap",
|
||||
]
|
||||
transport-sse-server = [
|
||||
"transport-async-rw",
|
||||
"transport-worker",
|
||||
"server-side-http",
|
||||
"dep:axum",
|
||||
]
|
||||
transport-streamable-http-server = [
|
||||
"transport-streamable-http-server-session",
|
||||
"server-side-http",
|
||||
|
|
@ -162,8 +152,6 @@ required-features = [
|
|||
"reqwest",
|
||||
"server",
|
||||
"client",
|
||||
"transport-sse-server",
|
||||
"transport-sse-client",
|
||||
"transport-child-process",
|
||||
]
|
||||
path = "tests/test_with_python.rs"
|
||||
|
|
@ -173,7 +161,6 @@ name = "test_with_js"
|
|||
required-features = [
|
||||
"server",
|
||||
"client",
|
||||
"transport-sse-server",
|
||||
"transport-child-process",
|
||||
"transport-streamable-http-server",
|
||||
"transport-streamable-http-client",
|
||||
|
|
|
|||
Loading…
Reference in a new issue