Skip to content

Commit 9dd4fe6

Browse files
docs: align README, docs, and llms files with current implementation
Fix stale API references, complete YAML examples, and document required config fields, profile merge behavior, and package scanning. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b13f33a commit 9dd4fe6

7 files changed

Lines changed: 104 additions & 81 deletions

File tree

README.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ instructions: You are a helpful AI assistant
9191
request-timeout: 20000
9292
capabilities:
9393
resource: true
94+
subscribe-resource: true
9495
prompt: true
9596
tool: true
97+
completion: true
9698
change-notification:
9799
resource: true
98100
prompt: true
@@ -221,34 +223,36 @@ streamable:
221223
222224
### Configuration Properties
223225
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` |
226+
| Property | Description | Default |
227+
|-----------------------------------|-----------------------------------------------------------------|------------------------------|
228+
| `enabled` | Enable/disable MCP server | `true` |
229+
| `mode` | Server mode: `STDIO`, `SSE` (deprecated), `STREAMABLE` | `STREAMABLE` |
230+
| `name` | Server name | `mcp-server` |
231+
| `version` | Server version | `1.0.0` |
232+
| `type` | Server type: `SYNC`, `ASYNC` | `SYNC` |
233+
| `instructions` | Instructions for the LLM client | Required (non-blank in YAML) |
234+
| `request-timeout` | Request timeout in milliseconds | `20000` |
235+
| `capabilities.resource` | Enable resource support | `true` |
236+
| `capabilities.subscribe-resource` | Enable resource subscription | `true` |
237+
| `capabilities.prompt` | Enable prompt support | `true` |
238+
| `capabilities.tool` | Enable tool support | `true` |
239+
| `capabilities.completion` | Enable completion support | `true` |
240+
| `change-notification.resource` | Notify clients on resource change | `true` |
241+
| `change-notification.prompt` | Notify clients on prompt change | `true` |
242+
| `change-notification.tool` | Notify clients on tool change | `true` |
243+
| `sse.message-endpoint` | SSE POST message path *(deprecated, for removal since 0.16.0)* | `/mcp/message` |
244+
| `sse.endpoint` | SSE stream path *(deprecated, for removal since 0.16.0)* | `/sse` |
245+
| `sse.base-url` | Public base URL for the SSE server *(deprecated)* | Required when `mode: SSE` |
246+
| `sse.port` | HTTP port for SSE mode *(deprecated, for removal since 0.16.0)* | `8080` |
247+
| `streamable.mcp-endpoint` | Streamable HTTP MCP path | `/mcp/message` |
248+
| `streamable.disallow-delete` | Reject HTTP DELETE on session | `false` |
249+
| `streamable.keep-alive-interval` | Keep-alive interval (ms) | `20000` |
250+
| `streamable.port` | HTTP port for STREAMABLE mode | `8080` |
249251

250252
### Profile-based Configuration
251253

254+
Set `profile` in the base file to load `mcp-server-{profile}.yml` from the classpath. Profile values are merged into the base configuration with Jackson deep merge; nested objects such as `capabilities` and `streamable` are merged field-by-field. The `profile` name always comes from the base file. After merge, transport settings that do not match the resolved `mode` are cleared (for example, `streamable` is removed when `mode` is `STDIO`).
255+
252256
You can use profiles for different environments:
253257

254258
```yaml

README.zh-CN.md

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ instructions: You are a helpful AI assistant
9393
request-timeout: 20000
9494
capabilities:
9595
resource: true
96+
subscribe-resource: true
9697
prompt: true
9798
tool: true
99+
completion: true
98100
change-notification:
99101
resource: true
100102
prompt: true
@@ -223,34 +225,36 @@ streamable:
223225
224226
### 配置项说明
225227
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` |
250-
| `streamable.port` | STREAMABLE 模式 HTTP 端口 | `8080` |
228+
| 配置项 | 说明 | 默认值 |
229+
|-----------------------------------|---------------------------------------|-----------------|
230+
| `enabled` | 是否启用 MCP 服务端 | `true` |
231+
| `mode` | 服务端模式:`STDIO`、`SSE`(已弃用)、`STREAMABLE` | `STREAMABLE` |
232+
| `name` | 服务端名称 | `mcp-server` |
233+
| `version` | 服务端版本 | `1.0.0` |
234+
| `type` | 服务端类型:`SYNC`、`ASYNC` | `SYNC` |
235+
| `instructions` | 给 LLM 客户端的说明 | 必填(YAML 中不可为空) |
236+
| `request-timeout` | 请求超时(毫秒) | `20000` |
237+
| `capabilities.resource` | 启用资源能力 | `true` |
238+
| `capabilities.subscribe-resource` | 启用资源订阅 | `true` |
239+
| `capabilities.prompt` | 启用提示词能力 | `true` |
240+
| `capabilities.tool` | 启用工具能力 | `true` |
241+
| `capabilities.completion` | 启用补全能力 | `true` |
242+
| `change-notification.resource` | 资源变更时通知客户端 | `true` |
243+
| `change-notification.prompt` | 提示词变更时通知客户端 | `true` |
244+
| `change-notification.tool` | 工具变更时通知客户端 | `true` |
245+
| `sse.message-endpoint` | SSE POST 消息路径 *(自 0.16.0 起已弃用,计划移除)* | `/mcp/message` |
246+
| `sse.endpoint` | SSE 流路径 *(自 0.16.0 起已弃用,计划移除)* | `/sse` |
247+
| `sse.base-url` | SSE 服务对外 base URL *(已弃用)* | `mode: SSE` 时必填 |
248+
| `sse.port` | SSE 模式 HTTP 端口 *(自 0.16.0 起已弃用,计划移除)* | `8080` |
249+
| `streamable.mcp-endpoint` | Streamable HTTP MCP 路径 | `/mcp/message` |
250+
| `streamable.disallow-delete` | 是否拒绝会话 HTTP DELETE | `false` |
251+
| `streamable.keep-alive-interval` | 保活间隔(毫秒) | `20000` |
252+
| `streamable.port` | STREAMABLE 模式 HTTP 端口 | `8080` |
251253

252254
### 基于 Profile 的配置
253255

256+
在基础配置中设置 `profile` 后,会从 classpath 加载 `mcp-server-{profile}.yml`,并通过 Jackson deep merge 与基础配置合并;`capabilities`、`streamable` 等嵌套对象按字段递归覆盖。`profile` 名称始终取自基础配置文件。合并完成后,会清除与当前 `mode` 不匹配的传输配置(例如 `mode: STDIO` 时会移除 `streamable`)。
257+
254258
可通过 Profile 区分不同环境:
255259

256260
```yaml

docs/components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ If you need to specify a specific package path, you can use the following method
289289
@McpServerApplication(basePackage = "com.example.mcp.components")
290290
```
291291

292-
If no package path is specified, the package containing the main method will be scanned.
292+
If no package path is specified, the package of the class passed to `McpApplication.run()` will be scanned.
293293

294294
## Structured Content
295295

0 commit comments

Comments
 (0)