Skip to content

Commit 909dbfe

Browse files
authored
docs(protocol): migration guide covers MCP server name and resume rules (#2720)
1 parent ca8b702 commit 909dbfe

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎docs/protocol/v2/migration.mdx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ Retained user messages **MUST** preserve the ID returned by `session/prompt`. Ag
760760

761761
`session/new` and `session/resume` take the same shape of environment parameters: a required `cwd` (absolute path), plus optional `additionalDirectories` and `mcpServers`. Note that `mcpServers` was required (even if empty) on `session/new` in v1 and is now optional. Omitting it and sending `[]` are equivalent. Both responses **MAY** include the session's `configOptions` and initial `availableCommands`. Neither carries `modes` anymore.
762762

763-
`additionalDirectories` still requires the `session.additionalDirectories` capability and absolute paths, and each `session/resume` must send the full intended additional-root list. Omitting the field or sending `[]` activates no additional roots rather than restoring previous ones.
763+
`additionalDirectories` still requires the `session.additionalDirectories` capability and absolute paths, and each `session/resume` must send the full intended additional-root list. Omitting the field or sending `[]` activates no additional roots rather than restoring previous ones. The same applies to `mcpServers` on resume.
764764

765765
### Baseline methods
766766

@@ -808,7 +808,9 @@ MCP transport configuration is aligned with the current MCP transport model:
808808
- Every server config **MUST** carry a `type` discriminator. In v1, stdio configs had no `type` field. In v2 they are `"type": "stdio"`. Unknown transport types can then be carried as extension variants instead of failing to parse.
809809
- The deprecated HTTP+SSE transport (`"type": "sse"`) is **removed**.
810810
- Support is advertised per transport under `capabilities.session.mcp`: `stdio` is now an explicit capability (`session.mcp.stdio`), so agents that cannot launch subprocesses can opt out, and `session.mcp.http` covers remote servers.
811-
- Empty arrays are no longer required: `args` and `env` on stdio configs and `headers` on HTTP configs are optional in v2 (v1 required `args` and `env` even when empty).
811+
- Each server `name` **MUST** be unique within `mcpServers`, and Agents reject duplicates with `-32602`.
812+
- On `session/resume`, `mcpServers` is the complete set of Client-provided servers, like `additionalDirectories`; servers from earlier requests are not restored.
813+
- Empty arrays are no longer required: `args` and `env` on stdio configs and `headers` on HTTP configs are optional in v2 (v1 required `args`, `env`, and `headers` even when empty).
812814

813815
```json
814816
{

0 commit comments

Comments
 (0)