Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions agent-client-protocol-schema/src/v2/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3140,7 +3140,8 @@ pub struct McpServerStdio {
#[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))]
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub args: Vec<String>,
/// Environment variables to set when launching the MCP server.
/// Environment variables to set when launching the MCP server. Names SHOULD be unique;
/// Agents MAY reject duplicates with `-32602`, and otherwise the last entry wins.
#[serde_as(deserialize_as = "DefaultOnNull")]
#[cfg_attr(feature = "schemars", schemars(extend("x-deserialize-default-on-null" = true)))]
#[serde(default, skip_serializing_if = "Vec::is_empty")]
Expand Down Expand Up @@ -3177,7 +3178,8 @@ impl McpServerStdio {
self
}

/// Environment variables to set when launching the MCP server.
/// Environment variables to set when launching the MCP server. Names SHOULD be unique;
/// Agents MAY reject duplicates with `-32602`, and otherwise the last entry wins.
#[must_use]
pub fn env(mut self, env: Vec<EnvVariable>) -> Self {
self.env = env;
Expand Down
6 changes: 4 additions & 2 deletions docs/protocol/v2/draft/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5035,7 +5035,8 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
Absolute path to the MCP server executable.
</ResponseField>
<ResponseField name="env" type={<a href="#envvariable">EnvVariable[]</a>} >
Environment variables to set when launching the MCP server.
Environment variables to set when launching the MCP server. Names SHOULD be unique;
Agents MAY reject duplicates with `-32602`, and otherwise the last entry wins.
</ResponseField>
<ResponseField name="name" type={"string"} required>
Human-readable name identifying this MCP server.
Expand Down Expand Up @@ -5172,7 +5173,8 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/d
Absolute path to the MCP server executable.
</ResponseField>
<ResponseField name="env" type={<a href="#envvariable">EnvVariable[]</a>} >
Environment variables to set when launching the MCP server.
Environment variables to set when launching the MCP server. Names SHOULD be unique;
Agents MAY reject duplicates with `-32602`, and otherwise the last entry wins.
</ResponseField>
<ResponseField name="name" type={"string"} required>
Human-readable name identifying this MCP server.
Expand Down
2 changes: 1 addition & 1 deletion docs/protocol/v2/draft/session-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ Example stdio transport configuration:
}
```

Agents **SHOULD** launch stdio servers with the session's `cwd` as the working directory. `env` entries are added to the environment the Agent would otherwise give the process, replacing variables with the same name. Each `env` entry **MUST** have a unique `name`.
Agents **SHOULD** launch stdio servers with the session's `cwd` as the working directory. `env` entries are added to the environment the Agent would otherwise give the process, replacing variables with the same name. Each `env` entry **SHOULD** have a unique `name`. Agents **MAY** reject duplicates with `-32602`; otherwise the last entry with a given name wins.

#### HTTP Transport

Expand Down
6 changes: 4 additions & 2 deletions docs/protocol/v2/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4411,7 +4411,8 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e
Absolute path to the MCP server executable.
</ResponseField>
<ResponseField name="env" type={<a href="#envvariable">EnvVariable[]</a>} >
Environment variables to set when launching the MCP server.
Environment variables to set when launching the MCP server. Names SHOULD be unique;
Agents MAY reject duplicates with `-32602`, and otherwise the last entry wins.
</ResponseField>
<ResponseField name="name" type={"string"} required>
Human-readable name identifying this MCP server.
Expand Down Expand Up @@ -4501,7 +4502,8 @@ See protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/e
Absolute path to the MCP server executable.
</ResponseField>
<ResponseField name="env" type={<a href="#envvariable">EnvVariable[]</a>} >
Environment variables to set when launching the MCP server.
Environment variables to set when launching the MCP server. Names SHOULD be unique;
Agents MAY reject duplicates with `-32602`, and otherwise the last entry wins.
</ResponseField>
<ResponseField name="name" type={"string"} required>
Human-readable name identifying this MCP server.
Expand Down
2 changes: 1 addition & 1 deletion docs/protocol/v2/session-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ Example stdio transport configuration:
}
```

Agents **SHOULD** launch stdio servers with the session's `cwd` as the working directory. `env` entries are added to the environment the Agent would otherwise give the process, replacing variables with the same name. Each `env` entry **MUST** have a unique `name`.
Agents **SHOULD** launch stdio servers with the session's `cwd` as the working directory. `env` entries are added to the environment the Agent would otherwise give the process, replacing variables with the same name. Each `env` entry **SHOULD** have a unique `name`. Agents **MAY** reject duplicates with `-32602`; otherwise the last entry with a given name wins.

#### HTTP Transport

Expand Down
2 changes: 1 addition & 1 deletion schema/v2/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6416,7 +6416,7 @@
"x-deserialize-default-on-null": true
},
"env": {
"description": "Environment variables to set when launching the MCP server.",
"description": "Environment variables to set when launching the MCP server. Names SHOULD be unique;\nAgents MAY reject duplicates with `-32602`, and otherwise the last entry wins.",
"type": "array",
"items": {
"$ref": "#/$defs/EnvVariable"
Expand Down
2 changes: 1 addition & 1 deletion schema/v2/schema.unstable.json
Original file line number Diff line number Diff line change
Expand Up @@ -7578,7 +7578,7 @@
"x-deserialize-default-on-null": true
},
"env": {
"description": "Environment variables to set when launching the MCP server.",
"description": "Environment variables to set when launching the MCP server. Names SHOULD be unique;\nAgents MAY reject duplicates with `-32602`, and otherwise the last entry wins.",
"type": "array",
"items": {
"$ref": "#/$defs/EnvVariable"
Expand Down
Loading