Skip to content

Commit 3be3c14

Browse files
committed
Remove deprecated SSE support
1 parent 034269a commit 3be3c14

33 files changed

Lines changed: 68 additions & 610 deletions

README.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,11 @@ The [Model Context Protocol (MCP)](https://modelcontextprotocol.io) is a standar
180180

181181
### Supported Server Modes
182182

183-
This SDK supports three MCP server modes:
183+
This SDK supports two MCP server modes:
184184

185185
| Mode | Description | Use Case |
186186
|----------------|-------------------------------------|--------------------------------------------------------|
187187
| **STDIO** | Standard input/output communication | CLI tools, local development |
188-
| **SSE** | Server-Sent Events (HTTP-based) | Deprecated since 0.16.0 (`forRemoval`); use STREAMABLE |
189188
| **STREAMABLE** | HTTP streaming | Web applications, recommended for production |
190189

191190
## 🔧 Advanced Usage
@@ -224,7 +223,7 @@ streamable:
224223
| Property | Description | Default |
225224
|-----------------------------------|-----------------------------------------------------------------|------------------------------|
226225
| `enabled` | Enable/disable MCP server | `true` |
227-
| `mode` | Server mode: `STDIO`, `SSE` (deprecated), `STREAMABLE` | `STREAMABLE` |
226+
| `mode` | Server mode: `STDIO`, `STREAMABLE` | `STREAMABLE` |
228227
| `name` | Server name | `mcp-server` |
229228
| `version` | Server version | `1.0.0` |
230229
| `type` | Server type: `SYNC`, `ASYNC` | `SYNC` |
@@ -238,10 +237,6 @@ streamable:
238237
| `change-notification.resource` | Notify clients on resource change | `true` |
239238
| `change-notification.prompt` | Notify clients on prompt change | `true` |
240239
| `change-notification.tool` | Notify clients on tool change | `true` |
241-
| `sse.message-endpoint` | SSE POST message path *(deprecated, for removal since 0.16.0)* | `/mcp/message` |
242-
| `sse.endpoint` | SSE stream path *(deprecated, for removal since 0.16.0)* | `/sse` |
243-
| `sse.base-url` | Public base URL for the SSE server *(deprecated)* | Required when `mode: SSE` |
244-
| `sse.port` | HTTP port for SSE mode *(deprecated, for removal since 0.16.0)* | `8080` |
245240
| `streamable.mcp-endpoint` | Streamable HTTP MCP path | `/mcp/message` |
246241
| `streamable.disallow-delete` | Reject HTTP DELETE on session | `false` |
247242
| `streamable.keep-alive-interval` | Keep-alive interval (ms) | `20000` |
@@ -297,8 +292,7 @@ The SDK creates **one instance per component class** (no-arg constructor) and re
297292

298293
This project builds on the official [MCP Java SDK](https://github.com/modelcontextprotocol/java-sdk) **2.0.0-M3**, a **pre-release milestone**. APIs may change before 2.0 GA — pin dependency versions and re-run tests when upgrading.
299294

300-
- **STREAMABLE** is the recommended HTTP transport for new projects.
301-
- **SSE** (`ServerMode.SSE`, `McpSseServer`, `ServerSse`, `sse.*` in YAML) is **deprecated with `forRemoval = true` since 0.16.0** and scheduled for removal in a future release. Existing deployments may still use it for compatibility; migrate to **STREAMABLE** (`McpStreamableServer`, `streamable.*`).
295+
- **STREAMABLE** is the supported HTTP transport.
302296

303297
## 🏗️ Project Structure
304298

@@ -377,7 +371,6 @@ mvnw.cmd clean test
377371
**A:**
378372
- **STDIO**: For CLI tools and local development
379373
- **STREAMABLE**: For web applications and production deployments (recommended)
380-
- **SSE**: Deprecated since 0.16.0 (`forRemoval`); use STREAMABLE and `streamable.*` instead of `sse.*`
381374

382375
## 🤝 Contributing
383376

README.zh-CN.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,11 @@ public class MyPrompts {
182182

183183
### 支持的服务端模式
184184

185-
本 SDK 支持三种 MCP 服务端传输模式:
185+
本 SDK 支持两种 MCP 服务端传输模式:
186186

187187
| 模式 | 说明 | 适用场景 |
188188
|----------------|----------------|--------------------------------------------|
189189
| **STDIO** | 标准输入/输出通信 | CLI 工具、本地开发 |
190-
| **SSE** | 基于 HTTP 的服务端推送 | 自 0.16.0 起已弃用(`forRemoval`);请改用 STREAMABLE |
191190
| **STREAMABLE** | HTTP 流式传输 | Web 应用、生产环境(推荐) |
192191

193192
## 🔧 进阶用法
@@ -226,7 +225,7 @@ streamable:
226225
| 配置项 | 说明 | 默认值 |
227226
|-----------------------------------|---------------------------------------|-----------------|
228227
| `enabled` | 是否启用 MCP 服务端 | `true` |
229-
| `mode` | 服务端模式:`STDIO`、`SSE`(已弃用)、`STREAMABLE` | `STREAMABLE` |
228+
| `mode` | 服务端模式:`STDIO`、`STREAMABLE` | `STREAMABLE` |
230229
| `name` | 服务端名称 | `mcp-server` |
231230
| `version` | 服务端版本 | `1.0.0` |
232231
| `type` | 服务端类型:`SYNC`、`ASYNC` | `SYNC` |
@@ -240,10 +239,6 @@ streamable:
240239
| `change-notification.resource` | 资源变更时通知客户端 | `true` |
241240
| `change-notification.prompt` | 提示词变更时通知客户端 | `true` |
242241
| `change-notification.tool` | 工具变更时通知客户端 | `true` |
243-
| `sse.message-endpoint` | SSE POST 消息路径 *(自 0.16.0 起已弃用,计划移除)* | `/mcp/message` |
244-
| `sse.endpoint` | SSE 流路径 *(自 0.16.0 起已弃用,计划移除)* | `/sse` |
245-
| `sse.base-url` | SSE 服务对外 base URL *(已弃用)* | `mode: SSE` 时必填 |
246-
| `sse.port` | SSE 模式 HTTP 端口 *(自 0.16.0 起已弃用,计划移除)* | `8080` |
247242
| `streamable.mcp-endpoint` | Streamable HTTP MCP 路径 | `/mcp/message` |
248243
| `streamable.disallow-delete` | 是否拒绝会话 HTTP DELETE | `false` |
249244
| `streamable.keep-alive-interval` | 保活间隔(毫秒) | `20000` |
@@ -299,8 +294,7 @@ SDK 为每个组件类创建 **唯一实例**(无参构造),该类上所
299294

300295
本项目基于官方 [MCP Java SDK](https://github.com/modelcontextprotocol/java-sdk) **2.0.0-M3**,属于 **预发布里程碑**。2.0 正式版发布前 API 可能变更 — 请锁定依赖版本,升级后重新跑集成测试。
301296

302-
- 新项目 HTTP 传输推荐 **STREAMABLE**。
303-
- **SSE**(`ServerMode.SSE`、`McpSseServer`、`ServerSse`、YAML 中的 `sse.*`)自 **0.16.0** 起已标记为 **`@Deprecated(forRemoval = true)`**,将在后续版本中移除。现有部署仍可兼容使用;请迁移至 **STREAMABLE**(`McpStreamableServer`、`streamable.*`)。
297+
- 当前支持的 HTTP 传输为 **STREAMABLE**。
304298

305299
## 🏗️ 推荐项目结构
306300

@@ -378,7 +372,6 @@ mvnw.cmd clean test
378372

379373
- **STDIO**:CLI 工具与本地开发
380374
- **STREAMABLE**:Web 应用与生产部署(推荐)
381-
- **SSE**:自 0.16.0 起已弃用(`forRemoval`);请改用 STREAMABLE,以 `streamable.*` 替代 `sse.*`
382375

383376
## 🤝 参与贡献
384377

docs/getting-started.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -133,24 +133,7 @@ Based on standard input/output communication, suitable for CLI tools and local d
133133
mode: STDIO
134134
```
135135
136-
### 2. SSE (Server-Sent Events) Mode
137-
138-
!!! warning "Deprecated (for removal since 0.16.0)"
139-
HTTP SSE mode (`mode: SSE`, `sse.*` config, `McpSseServer`, `ServerMode.SSE`) is deprecated with **`forRemoval = true`** since **0.16.0** and scheduled for removal in a future release. Use **STREAMABLE** mode for new projects (`McpStreamableServer`, `streamable.*`).
140-
141-
HTTP-based real-time communication (legacy).
142-
143-
```yaml
144-
# mcp-server.yml
145-
mode: SSE
146-
sse:
147-
port: 8080
148-
endpoint: /sse
149-
message-endpoint: /mcp/message
150-
base-url: http://localhost:8080
151-
```
152-
153-
### 3. STREAMABLE Mode
136+
### 2. STREAMABLE Mode
154137
155138
HTTP streaming for web applications, recommended for production.
156139
@@ -169,7 +152,7 @@ streamable:
169152
| Property | Description | Default |
170153
|-----------------------------------|-----------------------------------------------------------------|------------------------------|
171154
| `enabled` | Enable/disable MCP server | `true` |
172-
| `mode` | Server mode: `STDIO`, `SSE` (deprecated), `STREAMABLE` | `STREAMABLE` |
155+
| `mode` | Server mode: `STDIO`, `STREAMABLE` | `STREAMABLE` |
173156
| `name` | Server name | `mcp-server` |
174157
| `version` | Server version | `1.0.0` |
175158
| `type` | Server type: `SYNC`, `ASYNC` | `SYNC` |
@@ -183,10 +166,6 @@ streamable:
183166
| `change-notification.resource` | Notify clients on resource change | `true` |
184167
| `change-notification.prompt` | Notify clients on prompt change | `true` |
185168
| `change-notification.tool` | Notify clients on tool change | `true` |
186-
| `sse.message-endpoint` | SSE POST message path *(deprecated, for removal since 0.16.0)* | `/mcp/message` |
187-
| `sse.endpoint` | SSE stream path *(deprecated, for removal since 0.16.0)* | `/sse` |
188-
| `sse.base-url` | Public base URL for the SSE server *(deprecated)* | Required when `mode: SSE` |
189-
| `sse.port` | HTTP port for SSE mode *(deprecated, for removal since 0.16.0)* | `8080` |
190169
| `streamable.mcp-endpoint` | Streamable HTTP MCP path | `/mcp/message` |
191170
| `streamable.disallow-delete` | Reject HTTP DELETE on session | `false` |
192171
| `streamable.keep-alive-interval` | Keep-alive interval (ms) | `20000` |
@@ -211,8 +190,7 @@ The SDK creates **one instance per component class** (via a **public no-arg cons
211190

212191
This SDK depends on MCP Java SDK **2.0.0-M3** (pre-release). Pin versions and retest when upgrading.
213192

214-
- **STREAMABLE** is the recommended HTTP transport for new projects.
215-
- **SSE** (`ServerMode.SSE`, `McpSseServer`, `ServerSse`, `sse.*` in YAML) is **deprecated with `forRemoval = true` since 0.16.0** and scheduled for removal in a future release. Existing deployments may still use it for compatibility; migrate to **STREAMABLE** (`McpStreamableServer`, `streamable.*`).
193+
- **STREAMABLE** is the supported HTTP transport.
216194

217195
## Profile-based Configuration
218196

docs/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,14 @@ This SDK is especially suitable for the following scenarios:
5050
| Mode | Description | Use Case |
5151
|----------------|-------------------------------------|--------------------------------------------------------|
5252
| **STDIO** | Standard input/output communication | CLI tools, local development |
53-
| **SSE** | Server-Sent Events (HTTP-based) | Deprecated since 0.16.0 (`forRemoval`); use STREAMABLE |
5453
| **STREAMABLE** | HTTP streaming | Web applications, recommended for production |
5554

5655
## Runtime notes
5756

5857
- **ASYNC vs SYNC**`type: ASYNC` selects the async MCP server API; your annotated methods stay blocking Java wrapped in `Mono.fromCallable(...)`. See [Getting Started — Runtime model](./getting-started.md#runtime-model-and-stability).
5958
- **Singleton components** — one instance per component class, shared across concurrent requests; keep handlers stateless or thread-safe.
60-
- **Required YAML**`instructions` must be non-blank; when `mode` is `STREAMABLE` or `SSE`, the matching transport section must be present and complete.
61-
- **MCP SDK 2.0.0-M3** — built on a pre-release milestone; pin versions and prefer **STREAMABLE** over **SSE** (deprecated with `forRemoval = true` since 0.16.0).
59+
- **Required YAML**`instructions` must be non-blank; when `mode` is `STREAMABLE`, the `streamable` transport section must be present and complete.
60+
- **MCP SDK 2.0.0-M3** — built on a pre-release milestone; pin versions and retest when upgrading.
6261

6362
## 📖 Getting Started
6463

llms-full.txt

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,6 @@ If `mode` is omitted in `mcp-server.yml`, the server defaults to **STREAMABLE**.
283283
| Mode | Description | Use Case |
284284
|------|-------------|----------|
285285
| **STDIO** | Standard input/output communication | CLI tools, local development |
286-
| **SSE** | Server-Sent Events (HTTP-based) | Deprecated since 0.16.0 (`forRemoval`); use STREAMABLE |
287286
| **STREAMABLE** | HTTP streaming | Web applications, recommended for production |
288287

289288
### STDIO Mode
@@ -292,19 +291,6 @@ If `mode` is omitted in `mcp-server.yml`, the server defaults to **STREAMABLE**.
292291
mode: STDIO
293292
```
294293

295-
### SSE Mode (Deprecated since 0.16.0, for removal)
296-
297-
HTTP SSE transport (`mode: SSE`, `sse.*`, `McpSseServer`, `ServerMode.SSE`) is deprecated with **`forRemoval = true`** since **0.16.0** and scheduled for removal in a future release. Migrate to **STREAMABLE** for new projects.
298-
299-
```yaml
300-
mode: SSE
301-
sse:
302-
port: 8080
303-
endpoint: /sse
304-
message-endpoint: /mcp/message
305-
base-url: http://localhost:8080
306-
```
307-
308294
### STREAMABLE Mode
309295

310296
```yaml
@@ -321,7 +307,7 @@ streamable:
321307
| Property | Description | Default |
322308
|----------|-------------|---------|
323309
| `enabled` | Enable/disable MCP server | `true` |
324-
| `mode` | Server mode: `STDIO`, `SSE` (deprecated), `STREAMABLE` | `STREAMABLE` |
310+
| `mode` | Server mode: `STDIO`, `STREAMABLE` | `STREAMABLE` |
325311
| `name` | Server name | `mcp-server` |
326312
| `version` | Server version | `1.0.0` |
327313
| `type` | Server type: `SYNC`, `ASYNC` | `SYNC` |
@@ -335,10 +321,6 @@ streamable:
335321
| `change-notification.resource` | Notify clients on resource change | `true` |
336322
| `change-notification.prompt` | Notify clients on prompt change | `true` |
337323
| `change-notification.tool` | Notify clients on tool change | `true` |
338-
| `sse.message-endpoint` | SSE POST message path *(deprecated, for removal since 0.16.0)* | `/mcp/message` |
339-
| `sse.endpoint` | SSE stream path *(deprecated, for removal since 0.16.0)* | `/sse` |
340-
| `sse.base-url` | Public base URL for the SSE server *(deprecated)* | Required when `mode: SSE` |
341-
| `sse.port` | HTTP port for SSE mode *(deprecated, for removal since 0.16.0)* | `8080` |
342324
| `streamable.mcp-endpoint` | Streamable HTTP MCP path | `/mcp/message` |
343325
| `streamable.disallow-delete` | Reject HTTP DELETE on session | `false` |
344326
| `streamable.keep-alive-interval` | Keep-alive interval (ms) | `20000` |
@@ -486,12 +468,11 @@ public String createUser(
486468
## Important Notes
487469

488470
1. **Entry point**: Use `McpApplication.run()`; component classes are registered when they match the `@McpServerApplication` registration scope.
489-
2. **Deprecated SSE (for removal since 0.16.0)**: HTTP SSE mode and related APIs (`ServerMode.SSE`, `McpSseServer`, `ServerSse`, `sse.*` config) are deprecated with `forRemoval = true` since 0.16.0. Use STREAMABLE mode (`McpStreamableServer`, `streamable.*`) for new HTTP projects.
490-
3. **MCP SDK milestone**: This project depends on MCP Java SDK **2.0.0-M3** (pre-release). Pin versions and retest when upgrading.
491-
4. **ASYNC is not reactive**: `type: ASYNC` selects the async MCP server API; handlers wrap blocking Java methods in `Mono.fromCallable(...)`. Annotated methods do not return `Mono`/`Flux`.
492-
5. **Singleton components**: One instance per component class is shared across concurrent requests. Keep components stateless or thread-safe.
493-
6. **Default Required**: The default `required` value for `@McpToolParam`, `@McpPromptParam`, and `@McpJsonSchemaProperty` is `true`.
494-
7. **Required YAML fields**: `instructions` must be non-blank. When `mode` is `STREAMABLE` or `SSE`, the matching transport section must be present and complete.
471+
2. **MCP SDK milestone**: This project depends on MCP Java SDK **2.0.0-M3** (pre-release). Pin versions and retest when upgrading.
472+
3. **ASYNC is not reactive**: `type: ASYNC` selects the async MCP server API; handlers wrap blocking Java methods in `Mono.fromCallable(...)`. Annotated methods do not return `Mono`/`Flux`.
473+
4. **Singleton components**: One instance per component class is shared across concurrent requests. Keep components stateless or thread-safe.
474+
5. **Default Required**: The default `required` value for `@McpToolParam`, `@McpPromptParam`, and `@McpJsonSchemaProperty` is `true`.
475+
6. **Required YAML fields**: `instructions` must be non-blank. When `mode` is `STREAMABLE`, the `streamable` transport section must be present and complete.
495476

496477
## Links
497478

llms.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ If `mode` is omitted in `mcp-server.yml`, the server defaults to **STREAMABLE**.
110110
|------|-------------|----------|
111111
| STDIO | Standard input/output | CLI tools, local development |
112112
| STREAMABLE | HTTP streaming | Web applications, production (recommended) |
113-
| SSE | Server-Sent Events | Deprecated since 0.16.0 (`forRemoval`); use STREAMABLE |
114113

115114
## Configuration (mcp-server.yml)
116115

@@ -139,7 +138,6 @@ change-notification:
139138
- Use `McpApplication.run()` as the server entry point; optional third argument overrides the config file name (default `mcp-server.yml`)
140139
- Component registration scope: `basePackageClass` → `basePackage` → main class package; one instance per component class (public no-arg constructor)
141140
- `instructions` must be a non-blank string in `mcp-server.yml` (validated at startup)
142-
- SSE mode and related APIs (`ServerMode.SSE`, `McpSseServer`, `ServerSse`, `sse.*` config) are deprecated with `forRemoval = true` since 0.16.0; use STREAMABLE for new HTTP deployments
143141
- Built on MCP Java SDK **2.0.0-M3** (milestone) — pin versions and retest when upgrading
144142
- `type: ASYNC` uses the async MCP server API; annotated methods stay blocking Java wrapped in `Mono.fromCallable(...)` — not Project Reactor
145143
- One instance per component class is created and shared across concurrent requests — keep components stateless or thread-safe

0 commit comments

Comments
 (0)