Skip to content

Commit 57fabc4

Browse files
committed
docs(mcp): document remote Streamable HTTP servers
Add a remote-server section and type/url/headers fields to the MCP configuration guide (zh + en, docs and bundled skill references), and note remote support in the README MCP FAQ.
1 parent 42efcf9 commit 57fabc4

8 files changed

Lines changed: 124 additions & 8 deletions

File tree

README-en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Yes. Just set `env.BASE_URL` in `~/.deepcode/settings.json` to an OpenAI-compati
133133

134134
### How do I configure MCP?
135135

136-
Deep Code supports MCP (Model Context Protocol) to connect external services such as GitHub, browsers, databases, and more. Configure the `mcpServers` field in `settings.json` to enable it, then use the `/mcp` command to view MCP server status and available tools.
136+
Deep Code supports MCP (Model Context Protocol) to connect external services such as GitHub, browsers, databases, and more. Configure the `mcpServers` field in `settings.json` to enable it — both local stdio servers and remote Streamable HTTP servers are supported — then use the `/mcp` command to view MCP server status and available tools.
137137

138138
For detailed setup instructions, see: [docs/mcp.md](docs/mcp.md)
139139

README-zh_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Deep Code自带免费的、且大部分情况够用的Web Search工具。如果
118118

119119
### 如何配置 MCP?
120120

121-
Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览器、数据库等外部服务。在 `settings.json` 中配置 `mcpServers` 字段即可启用,启动后使用 `/mcp` 命令查看已配置的 MCP 服务器状态和可用工具。
121+
Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览器、数据库等外部服务。在 `settings.json` 中配置 `mcpServers` 字段即可启用,既支持本地 stdio 服务器,也支持远程 Streamable HTTP 服务器;启动后使用 `/mcp` 命令查看已配置的 MCP 服务器状态和可用工具。
122122

123123
详细配置指南:[docs/mcp.md](docs/mcp.md)
124124

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Deep Code自带免费的、且大部分情况够用的Web Search工具。如果
118118

119119
### 如何配置 MCP?
120120

121-
Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览器、数据库等外部服务。在 `settings.json` 中配置 `mcpServers` 字段即可启用,启动后使用 `/mcp` 命令查看已配置的 MCP 服务器状态和可用工具。
121+
Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览器、数据库等外部服务。在 `settings.json` 中配置 `mcpServers` 字段即可启用,既支持本地 stdio 服务器,也支持远程 Streamable HTTP 服务器;启动后使用 `/mcp` 命令查看已配置的 MCP 服务器状态和可用工具。
122122

123123
详细配置指南:[docs/mcp.md](docs/mcp.md)
124124

docs/mcp.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,38 @@ MCP 工具在 Deep Code 中的命名格式为 `mcp__<服务名>__<工具名>`,
4343

4444
| 字段 | 类型 | 必填 | 说明 |
4545
| --------- | -------- | ---- | ---------------------------------------------------------------------------------------------------------------------- |
46-
| `command` | string | | MCP 服务器的可执行文件路径或命令(如 `npx``node``python`)。当命令是 `npx` 时,Deep Code 会自动在参数前补充 `-y`|
46+
| `command` | string | | 本地 stdio 服务器的可执行文件路径或命令(如 `npx``node``python`)。当命令是 `npx` 时,Deep Code 会自动在参数前补充 `-y`|
4747
| `args` | string[] || 传递给命令的参数列表 |
4848
| `env` | object || 传递给 MCP 服务器进程的环境变量(如 API Key) |
49+
| `type` | string || 传输类型:`stdio`(本地子进程,默认)或 `http`(远程 Streamable HTTP)。给出 `url` 时默认为 `http`|
50+
| `url` | string || 远程 MCP 服务器的 HTTP(S) 端点(Streamable HTTP)。设置后即为远程服务器,无需 `command`|
51+
| `headers` | object || 远程请求附带的 HTTP 头(如 `Authorization`),常用于鉴权。 |
52+
53+
> 本地服务器用 `command`/`args`/`env`,远程服务器用 `url`/`headers`,二者择一。
54+
55+
## 远程 MCP 服务器(Streamable HTTP)
56+
57+
除了本地 stdio 服务器,Deep Code 也支持通过 **Streamable HTTP**(MCP 2025-03-26)连接远程 MCP 服务器。只要在配置里给出 `url`(或显式设置 `type: "http"`)即可:
58+
59+
```json
60+
{
61+
"mcpServers": {
62+
"remote-service": {
63+
"type": "http",
64+
"url": "https://example.com/mcp",
65+
"headers": {
66+
"Authorization": "Bearer <token>"
67+
}
68+
}
69+
}
70+
}
71+
```
72+
73+
- `url`:远程服务器的 HTTP(S) 端点。
74+
- `headers`:可选,附加到每个请求的 HTTP 头,常用于鉴权(如 `Authorization`)。
75+
- 初始化时服务器返回的 `Mcp-Session-Id` 会被自动记录,并在后续请求中回传。
76+
77+
> 当前仅支持 Streamable HTTP;尚不支持旧版 HTTP+SSE 双端点传输与 OAuth 授权流程。
4978
5079
## 常用 MCP 示例
5180

docs/mcp_en.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,38 @@ Edit `~/.deepcode/settings.json` and add the `mcpServers` field:
4343

4444
| Field | Type | Required | Description |
4545
| --------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
46-
| `command` | string | Yes | Path or command of the MCP server executable (e.g., `npx`, `node`, `python`). When the command is `npx`, Deep Code automatically prepends `-y` to the arguments. |
46+
| `command` | string | No | Executable path or command for a local stdio server (e.g., `npx`, `node`, `python`). When the command is `npx`, Deep Code automatically prepends `-y` to the arguments. |
4747
| `args` | string[] | No | List of arguments to pass to the command |
4848
| `env` | object | No | Environment variables (e.g., API keys) to pass to the MCP server process |
49+
| `type` | string | No | Transport: `stdio` (local subprocess, default) or `http` (remote Streamable HTTP). Defaults to `http` when a `url` is given. |
50+
| `url` | string | No | HTTP(S) endpoint of a remote MCP server (Streamable HTTP). When set, the server is remote and no `command` is needed. |
51+
| `headers` | object | No | HTTP headers (e.g., `Authorization`) sent with each remote request, typically for authentication. |
52+
53+
> Use `command`/`args`/`env` for local servers, or `url`/`headers` for remote servers — one or the other.
54+
55+
## Remote MCP Servers (Streamable HTTP)
56+
57+
In addition to local stdio servers, Deep Code can connect to remote MCP servers over **Streamable HTTP** (MCP 2025-03-26). Just provide a `url` (or set `type: "http"` explicitly):
58+
59+
```json
60+
{
61+
"mcpServers": {
62+
"remote-service": {
63+
"type": "http",
64+
"url": "https://example.com/mcp",
65+
"headers": {
66+
"Authorization": "Bearer <token>"
67+
}
68+
}
69+
}
70+
}
71+
```
72+
73+
- `url`: the remote server's HTTP(S) endpoint.
74+
- `headers`: optional HTTP headers attached to every request, typically for authentication (e.g., `Authorization`).
75+
- The `Mcp-Session-Id` returned by the server on initialize is captured automatically and echoed on subsequent requests.
76+
77+
> Only Streamable HTTP is supported for now; the legacy two-endpoint HTTP+SSE transport and OAuth authorization flows are not yet handled.
4978
5079
## Common MCP Examples
5180

packages/core/templates/skills/bundled/deepcode-self-refer/references/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Deep Code自带免费的、且大部分情况够用的Web Search工具。如果
120120

121121
### 如何配置 MCP?
122122

123-
Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览器、数据库等外部服务。在 `settings.json` 中配置 `mcpServers` 字段即可启用,启动后使用 `/mcp` 命令查看已配置的 MCP 服务器状态和可用工具。
123+
Deep Code 支持 MCP(Model Context Protocol),可以连接 GitHub、浏览器、数据库等外部服务。在 `settings.json` 中配置 `mcpServers` 字段即可启用,既支持本地 stdio 服务器,也支持远程 Streamable HTTP 服务器;启动后使用 `/mcp` 命令查看已配置的 MCP 服务器状态和可用工具。
124124

125125
详细配置指南:[docs/mcp.md](docs/mcp.md)
126126

packages/core/templates/skills/bundled/deepcode-self-refer/references/mcp.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,38 @@ MCP 工具在 Deep Code 中的命名格式为 `mcp__<服务名>__<工具名>`,
4343

4444
| 字段 | 类型 | 必填 | 说明 |
4545
| --------- | -------- | ---- | ---------------------------------------------------------------------------------------------------------------------- |
46-
| `command` | string | | MCP 服务器的可执行文件路径或命令(如 `npx``node``python`)。当命令是 `npx` 时,Deep Code 会自动在参数前补充 `-y`|
46+
| `command` | string | | 本地 stdio 服务器的可执行文件路径或命令(如 `npx``node``python`)。当命令是 `npx` 时,Deep Code 会自动在参数前补充 `-y`|
4747
| `args` | string[] || 传递给命令的参数列表 |
4848
| `env` | object || 传递给 MCP 服务器进程的环境变量(如 API Key) |
49+
| `type` | string || 传输类型:`stdio`(本地子进程,默认)或 `http`(远程 Streamable HTTP)。给出 `url` 时默认为 `http`|
50+
| `url` | string || 远程 MCP 服务器的 HTTP(S) 端点(Streamable HTTP)。设置后即为远程服务器,无需 `command`|
51+
| `headers` | object || 远程请求附带的 HTTP 头(如 `Authorization`),常用于鉴权。 |
52+
53+
> 本地服务器用 `command`/`args`/`env`,远程服务器用 `url`/`headers`,二者择一。
54+
55+
## 远程 MCP 服务器(Streamable HTTP)
56+
57+
除了本地 stdio 服务器,Deep Code 也支持通过 **Streamable HTTP**(MCP 2025-03-26)连接远程 MCP 服务器。只要在配置里给出 `url`(或显式设置 `type: "http"`)即可:
58+
59+
```json
60+
{
61+
"mcpServers": {
62+
"remote-service": {
63+
"type": "http",
64+
"url": "https://example.com/mcp",
65+
"headers": {
66+
"Authorization": "Bearer <token>"
67+
}
68+
}
69+
}
70+
}
71+
```
72+
73+
- `url`:远程服务器的 HTTP(S) 端点。
74+
- `headers`:可选,附加到每个请求的 HTTP 头,常用于鉴权(如 `Authorization`)。
75+
- 初始化时服务器返回的 `Mcp-Session-Id` 会被自动记录,并在后续请求中回传。
76+
77+
> 当前仅支持 Streamable HTTP;尚不支持旧版 HTTP+SSE 双端点传输与 OAuth 授权流程。
4978
5079
## 常用 MCP 示例
5180

packages/core/templates/skills/bundled/deepcode-self-refer/references/mcp_en.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,38 @@ Edit `~/.deepcode/settings.json` and add the `mcpServers` field:
4343

4444
| Field | Type | Required | Description |
4545
| --------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
46-
| `command` | string | Yes | Path or command of the MCP server executable (e.g., `npx`, `node`, `python`). When the command is `npx`, Deep Code automatically prepends `-y` to the arguments. |
46+
| `command` | string | No | Executable path or command for a local stdio server (e.g., `npx`, `node`, `python`). When the command is `npx`, Deep Code automatically prepends `-y` to the arguments. |
4747
| `args` | string[] | No | List of arguments to pass to the command |
4848
| `env` | object | No | Environment variables (e.g., API keys) to pass to the MCP server process |
49+
| `type` | string | No | Transport: `stdio` (local subprocess, default) or `http` (remote Streamable HTTP). Defaults to `http` when a `url` is given. |
50+
| `url` | string | No | HTTP(S) endpoint of a remote MCP server (Streamable HTTP). When set, the server is remote and no `command` is needed. |
51+
| `headers` | object | No | HTTP headers (e.g., `Authorization`) sent with each remote request, typically for authentication. |
52+
53+
> Use `command`/`args`/`env` for local servers, or `url`/`headers` for remote servers — one or the other.
54+
55+
## Remote MCP Servers (Streamable HTTP)
56+
57+
In addition to local stdio servers, Deep Code can connect to remote MCP servers over **Streamable HTTP** (MCP 2025-03-26). Just provide a `url` (or set `type: "http"` explicitly):
58+
59+
```json
60+
{
61+
"mcpServers": {
62+
"remote-service": {
63+
"type": "http",
64+
"url": "https://example.com/mcp",
65+
"headers": {
66+
"Authorization": "Bearer <token>"
67+
}
68+
}
69+
}
70+
}
71+
```
72+
73+
- `url`: the remote server's HTTP(S) endpoint.
74+
- `headers`: optional HTTP headers attached to every request, typically for authentication (e.g., `Authorization`).
75+
- The `Mcp-Session-Id` returned by the server on initialize is captured automatically and echoed on subsequent requests.
76+
77+
> Only Streamable HTTP is supported for now; the legacy two-endpoint HTTP+SSE transport and OAuth authorization flows are not yet handled.
4978
5079
## Common MCP Examples
5180

0 commit comments

Comments
 (0)