Skip to content

Commit 0e7c769

Browse files
deprecate: mark SSE APIs for removal since 0.16.0
HTTP SSE transport and related configuration are deprecated with forRemoval=true to steer new projects toward STREAMABLE. Update EN/CN docs and llms files with consistent migration guidance. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 35ccb83 commit 0e7c769

18 files changed

Lines changed: 222 additions & 144 deletions

README.md

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

183183
This SDK supports three MCP server modes:
184184

185-
| Mode | Description | Use Case |
186-
|----------------|-------------------------------------|----------------------------------------------|
187-
| **STDIO** | Standard input/output communication | CLI tools, local development |
188-
| **SSE** | Server-Sent Events (HTTP-based) | Real-time web applications (deprecated) |
189-
| **STREAMABLE** | HTTP streaming | Web applications, recommended for production |
185+
| Mode | Description | Use Case |
186+
|----------------|-------------------------------------|--------------------------------------------------------|
187+
| **STDIO** | Standard input/output communication | CLI tools, local development |
188+
| **SSE** | Server-Sent Events (HTTP-based) | Deprecated since 0.16.0 (`forRemoval`); use STREAMABLE |
189+
| **STREAMABLE** | HTTP streaming | Web applications, recommended for production |
190190

191191
## 🔧 Advanced Usage
192192

@@ -221,31 +221,31 @@ streamable:
221221
222222
### Configuration Properties
223223
224-
| Property | Description | Default |
225-
|-----------------------------------|-------------------------------------------|----------------|
226-
| `enabled` | Enable/disable MCP server | `true` |
227-
| `mode` | Server mode: `STDIO`, `SSE`, `STREAMABLE` | `STREAMABLE` |
228-
| `name` | Server name | `mcp-server` |
229-
| `version` | Server version | `1.0.0` |
230-
| `type` | Server type: `SYNC`, `ASYNC` | `SYNC` |
231-
| `instructions` | Instructions for the LLM client | (empty) |
232-
| `request-timeout` | Request timeout in milliseconds | `20000` |
233-
| `capabilities.resource` | Enable resource support | `true` |
234-
| `capabilities.subscribe-resource` | Enable resource subscription | `true` |
235-
| `capabilities.prompt` | Enable prompt support | `true` |
236-
| `capabilities.tool` | Enable tool support | `true` |
237-
| `capabilities.completion` | Enable completion support | `true` |
238-
| `change-notification.resource` | Notify clients on resource change | `true` |
239-
| `change-notification.prompt` | Notify clients on prompt change | `true` |
240-
| `change-notification.tool` | Notify clients on tool change | `true` |
241-
| `sse.message-endpoint` | SSE POST message path | `/mcp/message` |
242-
| `sse.endpoint` | SSE stream path | `/sse` |
243-
| `sse.base-url` | Public base URL for the SSE server | *(empty)* |
244-
| `sse.port` | HTTP port for SSE mode | `8080` |
245-
| `streamable.mcp-endpoint` | Streamable HTTP MCP path | `/mcp/message` |
246-
| `streamable.disallow-delete` | Reject HTTP DELETE on session | `false` |
247-
| `streamable.keep-alive-interval` | Keep-alive interval (ms) | `20000` |
248-
| `streamable.port` | HTTP port for STREAMABLE mode | `8080` |
224+
| Property | Description | Default |
225+
|-----------------------------------|-----------------------------------------------------------------|----------------|
226+
| `enabled` | Enable/disable MCP server | `true` |
227+
| `mode` | Server mode: `STDIO`, `SSE` (deprecated), `STREAMABLE` | `STREAMABLE` |
228+
| `name` | Server name | `mcp-server` |
229+
| `version` | Server version | `1.0.0` |
230+
| `type` | Server type: `SYNC`, `ASYNC` | `SYNC` |
231+
| `instructions` | Instructions for the LLM client | (empty) |
232+
| `request-timeout` | Request timeout in milliseconds | `20000` |
233+
| `capabilities.resource` | Enable resource support | `true` |
234+
| `capabilities.subscribe-resource` | Enable resource subscription | `true` |
235+
| `capabilities.prompt` | Enable prompt support | `true` |
236+
| `capabilities.tool` | Enable tool support | `true` |
237+
| `capabilities.completion` | Enable completion support | `true` |
238+
| `change-notification.resource` | Notify clients on resource change | `true` |
239+
| `change-notification.prompt` | Notify clients on prompt change | `true` |
240+
| `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)* | *(empty)* |
244+
| `sse.port` | HTTP port for SSE mode *(deprecated, for removal since 0.16.0)* | `8080` |
245+
| `streamable.mcp-endpoint` | Streamable HTTP MCP path | `/mcp/message` |
246+
| `streamable.disallow-delete` | Reject HTTP DELETE on session | `false` |
247+
| `streamable.keep-alive-interval` | Keep-alive interval (ms) | `20000` |
248+
| `streamable.port` | HTTP port for STREAMABLE mode | `8080` |
249249

250250
### Profile-based Configuration
251251

@@ -294,7 +294,7 @@ The SDK creates **one instance per component class** (no-arg constructor) and re
294294
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.
295295

296296
- **STREAMABLE** is the recommended HTTP transport for new projects.
297-
- **SSE** is still supported for compatibility but is **deprecated** in MCP SDK 2.x; avoid new SSE deployments.
297+
- **SSE** (`ServerMode.SSE`, `McpSseServer`, `McpServerSSE`, `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.*`).
298298

299299
### Multilingual Support (i18n)
300300

@@ -410,7 +410,7 @@ Run the test suite:
410410
**A:**
411411
- **STDIO**: For CLI tools and local development
412412
- **STREAMABLE**: For web applications and production deployments (recommended)
413-
- **SSE**: Deprecated, use STREAMABLE instead
413+
- **SSE**: Deprecated since 0.16.0 (`forRemoval`); use STREAMABLE and `streamable.*` instead of `sse.*`
414414

415415
## 🤝 Contributing
416416

README.zh-CN.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -174,21 +174,21 @@ public class MyPrompts {
174174

175175
### MCP 组件
176176

177-
| 组件 | 作用 | 类比 |
178-
|---------------|----------------|--------------|
179-
| **Resources** | 向 LLM 暴露数据 | GET 接口 |
180-
| **Tools** | 执行操作 | POST 接口 |
181-
| **Prompts** | 可复用模板 | 表单模板 |
177+
| 组件 | 作用 | 类比 |
178+
|---------------|------------|---------|
179+
| **Resources** | 向 LLM 暴露数据 | GET 接口 |
180+
| **Tools** | 执行操作 | POST 接口 |
181+
| **Prompts** | 可复用模板 | 表单模板 |
182182

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

185185
本 SDK 支持三种 MCP 服务端传输模式:
186186

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

193193
## 🔧 进阶用法
194194

@@ -223,30 +223,30 @@ streamable:
223223
224224
### 配置项说明
225225
226-
| 配置项 | 说明 | 默认值 |
227-
|-----------------------------------|-------------------------------------------|----------------|
228-
| `enabled` | 是否启用 MCP 服务端 | `true` |
229-
| `mode` | 服务端模式:`STDIO`、`SSE`、`STREAMABLE` | `STREAMABLE` |
230-
| `name` | 服务端名称 | `mcp-server` |
231-
| `version` | 服务端版本 | `1.0.0` |
232-
| `type` | 服务端类型:`SYNC`、`ASYNC` | `SYNC` |
233-
| `instructions` | 给 LLM 客户端的说明 | (空) |
234-
| `request-timeout` | 请求超时(毫秒) | `20000` |
235-
| `capabilities.resource` | 启用资源能力 | `true` |
236-
| `capabilities.subscribe-resource` | 启用资源订阅 | `true` |
237-
| `capabilities.prompt` | 启用提示词能力 | `true` |
238-
| `capabilities.tool` | 启用工具能力 | `true` |
239-
| `capabilities.completion` | 启用补全能力 | `true` |
240-
| `change-notification.resource` | 资源变更时通知客户端 | `true` |
241-
| `change-notification.prompt` | 提示词变更时通知客户端 | `true` |
242-
| `change-notification.tool` | 工具变更时通知客户端 | `true` |
243-
| `sse.message-endpoint` | SSE POST 消息路径 | `/mcp/message` |
244-
| `sse.endpoint` | SSE 流路径 | `/sse` |
245-
| `sse.base-url` | SSE 服务对外 base URL | (空) |
246-
| `sse.port` | SSE 模式 HTTP 端口 | `8080` |
247-
| `streamable.mcp-endpoint` | Streamable HTTP MCP 路径 | `/mcp/message` |
248-
| `streamable.disallow-delete` | 是否拒绝会话 HTTP DELETE | `false` |
249-
| `streamable.keep-alive-interval` | 保活间隔(毫秒) | `20000` |
226+
| 配置项 | 说明 | 默认值 |
227+
|-----------------------------------|---------------------------------------|----------------|
228+
| `enabled` | 是否启用 MCP 服务端 | `true` |
229+
| `mode` | 服务端模式:`STDIO`、`SSE`(已弃用)、`STREAMABLE` | `STREAMABLE` |
230+
| `name` | 服务端名称 | `mcp-server` |
231+
| `version` | 服务端版本 | `1.0.0` |
232+
| `type` | 服务端类型:`SYNC`、`ASYNC` | `SYNC` |
233+
| `instructions` | 给 LLM 客户端的说明 | (空) |
234+
| `request-timeout` | 请求超时(毫秒) | `20000` |
235+
| `capabilities.resource` | 启用资源能力 | `true` |
236+
| `capabilities.subscribe-resource` | 启用资源订阅 | `true` |
237+
| `capabilities.prompt` | 启用提示词能力 | `true` |
238+
| `capabilities.tool` | 启用工具能力 | `true` |
239+
| `capabilities.completion` | 启用补全能力 | `true` |
240+
| `change-notification.resource` | 资源变更时通知客户端 | `true` |
241+
| `change-notification.prompt` | 提示词变更时通知客户端 | `true` |
242+
| `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 *(已弃用)* | (空) |
246+
| `sse.port` | SSE 模式 HTTP 端口 *(自 0.16.0 起已弃用,计划移除)* | `8080` |
247+
| `streamable.mcp-endpoint` | Streamable HTTP MCP 路径 | `/mcp/message` |
248+
| `streamable.disallow-delete` | 是否拒绝会话 HTTP DELETE | `false` |
249+
| `streamable.keep-alive-interval` | 保活间隔(毫秒) | `20000` |
250250
| `streamable.port` | STREAMABLE 模式 HTTP 端口 | `8080` |
251251

252252
### 基于 Profile 的配置
@@ -296,7 +296,7 @@ SDK 为每个组件类创建 **唯一实例**(无参构造),该类上所
296296
本项目基于官方 [MCP Java SDK](https://github.com/modelcontextprotocol/java-sdk) **2.0.0-M3**,属于 **预发布里程碑**。2.0 正式版发布前 API 可能变更 — 请锁定依赖版本,升级后重新跑集成测试。
297297

298298
- 新项目 HTTP 传输推荐 **STREAMABLE**。
299-
- **SSE** 仍可兼容使用,但在 MCP SDK 2.x 中已 **弃用**,不建议新部署采用
299+
- **SSE**(`ServerMode.SSE`、`McpSseServer`、`McpServerSSE`、YAML 中的 `sse.*`)自 **0.16.0** 起已标记为 **`@Deprecated(forRemoval = true)`**,将在后续版本中移除。现有部署仍可兼容使用;请迁移至 **STREAMABLE**(`McpStreamableServer`、`streamable.*`)
300300

301301
### 多语言支持(i18n)
302302

@@ -413,7 +413,7 @@ Windows 下可使用 `mvnw.cmd clean test`。
413413

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

418418
## 🤝 参与贡献
419419

0 commit comments

Comments
 (0)