Skip to content

Commit 94428d5

Browse files
authored
docs: mark SSE transport examples as deprecated (#561)
SSE transport has been removed from newer versions of the MCP spec. Streamable HTTP is preferred as it is more reliable. Moves SSE examples to a collapsed details section at the bottom of the example list and removes them from the 'How to Run' section.
1 parent 2b60f8a commit 94428d5

File tree

1 file changed

+46
-51
lines changed

1 file changed

+46
-51
lines changed

examples/servers/README.md

Lines changed: 46 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,6 @@ A basic MCP server that communicates using standard input/output transport.
1111
- Provides a simple counter tool with increment, decrement, and get_value operations
1212
- Demonstrates basic tool implementation and stdio transport
1313

14-
### Counter SSE Server (`counter_sse.rs`)
15-
16-
A server that provides counter functionality using Server-Sent Events (SSE) transport.
17-
18-
- Runs on `http://127.0.0.1:8000/sse` by default
19-
- Provides the same counter tools as the stdio version
20-
- Demonstrates SSE transport setup with graceful shutdown
21-
- Can be accessed via web browsers or SSE-compatible clients
22-
23-
### Counter SSE Direct Server (`counter_sse_directly.rs`)
24-
25-
A minimal SSE server implementation showing direct SSE server usage.
26-
27-
- Simplified version of the SSE server
28-
- Demonstrates basic SSE server configuration
29-
- Provides counter functionality with minimal setup
30-
3114
### Memory Standard I/O Server (`memory_stdio.rs`)
3215

3316
A minimal server example using stdio transport.
@@ -52,34 +35,13 @@ A server using streamable HTTP transport for MCP communication, with hyper.
5235
- Provides counter tools via HTTP streaming
5336
- Demonstrates streamable HTTP transport configuration
5437

55-
### Complex OAuth SSE Server (`complex_auth_sse.rs`)
56-
57-
A comprehensive example demonstrating OAuth 2.0 integration with MCP servers.
58-
59-
- Full OAuth 2.0 authorization server implementation
60-
- Client registration and token management
61-
- User authorization flow with web interface
62-
- Token validation middleware
63-
- Integrated with MCP SSE transport
64-
- Demonstrates enterprise-grade authentication patterns
65-
66-
### Simple OAuth SSE Server (`simple_auth_sse.rs`)
67-
68-
A simplified OAuth example showing basic token-based authentication.
69-
70-
- Basic token store and validation
71-
- Authorization middleware for SSE endpoints
72-
- Token generation API
73-
- Simplified authentication flow
74-
- Good starting point for adding authentication to MCP servers
75-
7638
### Elicitation Demo (`elicitation_stdio.rs`)
7739

7840
A working MCP server demonstrating elicitation for user name collection.
7941

8042
- Real MCP server using rmcp library
8143
- `context.peer.elicit::<T>()` API usage
82-
- Type-safe elicitation with `elicit_safe!` macro
44+
- Type-safe elicitation with `elicit_safe!` macro
8345
- JSON Schema validation with schemars
8446
- Tools: `greet_user` (collects name), `reset_name` (clears stored name)
8547

@@ -101,6 +63,51 @@ A server that demonstrates progress notifications during long-running operations
10163
- Demonstrates progress notifications during long-running operations
10264
- Can be run with `cargo run --example servers_progress_demo -- {stdio|sse|http|all}`
10365

66+
<details>
67+
<summary>Deprecated: SSE Transport Examples</summary>
68+
69+
> **Note:** SSE (Server-Sent Events) transport has been removed from newer versions of the MCP specification. Streamable HTTP is the preferred transport for HTTP-based MCP servers as it is more reliable. These examples are kept for reference but should not be used for new implementations.
70+
71+
### Counter SSE Server (`counter_sse.rs`)
72+
73+
A server that provides counter functionality using Server-Sent Events (SSE) transport.
74+
75+
- Runs on `http://127.0.0.1:8000/sse` by default
76+
- Provides the same counter tools as the stdio version
77+
- Demonstrates SSE transport setup with graceful shutdown
78+
- Can be accessed via web browsers or SSE-compatible clients
79+
80+
### Counter SSE Direct Server (`counter_sse_directly.rs`)
81+
82+
A minimal SSE server implementation showing direct SSE server usage.
83+
84+
- Simplified version of the SSE server
85+
- Demonstrates basic SSE server configuration
86+
- Provides counter functionality with minimal setup
87+
88+
### Complex OAuth SSE Server (`complex_auth_sse.rs`)
89+
90+
A comprehensive example demonstrating OAuth 2.0 integration with MCP servers.
91+
92+
- Full OAuth 2.0 authorization server implementation
93+
- Client registration and token management
94+
- User authorization flow with web interface
95+
- Token validation middleware
96+
- Integrated with MCP SSE transport
97+
- Demonstrates enterprise-grade authentication patterns
98+
99+
### Simple OAuth SSE Server (`simple_auth_sse.rs`)
100+
101+
A simplified OAuth example showing basic token-based authentication.
102+
103+
- Basic token store and validation
104+
- Authorization middleware for SSE endpoints
105+
- Token generation API
106+
- Simplified authentication flow
107+
- Good starting point for adding authentication to MCP servers
108+
109+
</details>
110+
104111
## How to Run
105112

106113
Each example can be run using Cargo:
@@ -109,24 +116,12 @@ Each example can be run using Cargo:
109116
# Run the counter standard I/O server
110117
cargo run --example servers_counter_stdio
111118

112-
# Run the counter SSE server
113-
cargo run --example servers_counter_sse
114-
115-
# Run the counter SSE direct server
116-
cargo run --example servers_counter_sse_directly
117-
118119
# Run the memory standard I/O server
119120
cargo run --example servers_memory_stdio
120121

121122
# Run the counter streamable HTTP server
122123
cargo run --example servers_counter_streamhttp
123124

124-
# Run the complex OAuth SSE server
125-
cargo run --example servers_complex_auth_sse
126-
127-
# Run the simple OAuth SSE server
128-
cargo run --example servers_simple_auth_sse
129-
130125
# Run the elicitation standard I/O server
131126
cargo run --example servers_elicitation_stdio
132127

0 commit comments

Comments
 (0)