Skip to content

Commit 8ceee90

Browse files
authored
Introduce implementation information to the initialize phase (#192)
* Introduce implementation information to the initialize phase This introduces a way for Clients and Agents to provide information about themselves to either party. This can be used to show users which implementation and it's version to users, or be used for logging/metrics purposes to figure out the source of usage. This is being introduced as an optional field for now, so it is backwards compatible, but it seems like a likely candidate to be made into a required field for v2 so both sides can count on this information being available. Copying roughly the exact same pattern as MCP here: https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle#initialization * Start a v2 document * Fix clippy
1 parent 0dd3c1b commit 8ceee90

File tree

6 files changed

+152
-2
lines changed

6 files changed

+152
-2
lines changed

docs/protocol/initialization.mdx

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Before a Session can be created, Clients **MUST** initialize the connection by c
2828
- The latest [protocol version](#protocol-version) supported
2929
- The [capabilities](#client-capabilities) supported
3030

31+
They **SHOULD** also provide a name and version to the Agent.
32+
3133
```json
3234
{
3335
"jsonrpc": "2.0",
@@ -41,12 +43,17 @@ Before a Session can be created, Clients **MUST** initialize the connection by c
4143
"writeTextFile": true
4244
},
4345
"terminal": true
46+
},
47+
"clientInfo": {
48+
"name": "my-client",
49+
"title": "My Client",
50+
"version": "1.0.0"
4451
}
4552
}
4653
}
4754
```
4855

49-
The Agent **MUST** respond with the chosen [protocol version](#protocol-version) and the [capabilities](#agent-capabilities) it supports:
56+
The Agent **MUST** respond with the chosen [protocol version](#protocol-version) and the [capabilities](#agent-capabilities) it supports. It **SHOULD** also provide a name and version to the Client as well:
5057

5158
```json
5259
{
@@ -66,6 +73,11 @@ The Agent **MUST** respond with the chosen [protocol version](#protocol-version)
6673
"sse": true
6774
}
6875
},
76+
"agentInfo": {
77+
"name": "my-agent",
78+
"title": "My Agent",
79+
"version": "1.0.0"
80+
},
6981
"authMethods": []
7082
}
7183
}
@@ -174,6 +186,29 @@ Note: This transport has been deprecated by the MCP spec.
174186

175187
</ResponseField>
176188

189+
## Implementation Information
190+
191+
Both Clients and Agents **SHOULD** provide information about their implementation in the `clientInfo` and `agentInfo` fields respectively. Both take the following three fields:
192+
193+
<ParamField path="name" type="string">
194+
Intended for programmatic or logical use, but can be used as a display name
195+
fallback if title isn’t present.
196+
</ParamField>
197+
198+
<ParamField path="title" type="string">
199+
Intended for UI and end-user contexts — optimized to be human-readable and
200+
easily understood. If not provided, the name should be used for display.
201+
</ParamField>
202+
203+
<ParamField path="version" type="string">
204+
Version of the implementation. Can be displayed to the user or used for
205+
debugging or metrics purposes.
206+
</ParamField>
207+
208+
<Info>
209+
Note: in future versions of the protocol, this information will be required.
210+
</Info>
211+
177212
---
178213

179214
Once the connection is initialized, you're ready to [create a session](./session-setup) and begin the conversation with the Agent.

docs/protocol/schema.mdx

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ See protocol docs: [Initialization](https://agentclientprotocol.com/protocol/ini
9090

9191
- Default: `{"fs":{"readTextFile":false,"writeTextFile":false},"terminal":false}`
9292

93+
</ResponseField>
94+
<ResponseField name="clientInfo" type={<><span><a href="#implementation">Implementation</a></span><span> | null</span></>} >
95+
Information about the Client name and version sent to the Agent.
96+
97+
Note: in future versions of the protocol, this will be required.
98+
9399
</ResponseField>
94100
<ResponseField name="protocolVersion" type={<a href="#protocolversion">ProtocolVersion</a>} required>
95101
The latest protocol version supported by the client.
@@ -115,6 +121,12 @@ See protocol docs: [Initialization](https://agentclientprotocol.com/protocol/ini
115121

116122
- Default: `{"loadSession":false,"mcpCapabilities":{"http":false,"sse":false},"promptCapabilities":{"audio":false,"embeddedContext":false,"image":false}}`
117123

124+
</ResponseField>
125+
<ResponseField name="agentInfo" type={<><span><a href="#implementation">Implementation</a></span><span> | null</span></>} >
126+
Information about the Agent name and version sent to the Client.
127+
128+
Note: in future versions of the protocol, this will be required.
129+
118130
</ResponseField>
119131
<ResponseField name="authMethods" type={<><span><a href="#authmethod">AuthMethod</a></span><span>[]</span></>} >
120132
Authentication methods supported by the agent.
@@ -1491,6 +1503,31 @@ An HTTP header to set when making requests to the MCP server.
14911503
The value to set for the HTTP header.
14921504
</ResponseField>
14931505

1506+
## <span class="font-mono">Implementation</span>
1507+
1508+
Describes the name and version of an MCP implementation, with an optional
1509+
title for UI representation.
1510+
1511+
**Type:** Object
1512+
1513+
**Properties:**
1514+
1515+
<ResponseField name="name" type={"string"} required>
1516+
Intended for programmatic or logical use, but can be used as a display
1517+
name fallback if title isn’t present.
1518+
</ResponseField>
1519+
<ResponseField name="title" type={"string | null"} >
1520+
Intended for UI and end-user contexts — optimized to be human-readable
1521+
and easily understood.
1522+
1523+
If not provided, the name should be used for display.
1524+
1525+
</ResponseField>
1526+
<ResponseField name="version" type={"string"} required>
1527+
Version of the implementation. Can be displayed to the user or used
1528+
for debugging or metrics purposes.
1529+
</ResponseField>
1530+
14941531
## <span class="font-mono">McpCapabilities</span>
14951532

14961533
MCP capabilities supported by the agent

docs/v2-changes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Proposal for changes in an ACP v2
2+
3+
A WIP document to keep track of ideas and proposals for breaking changes that would require a version bump in the protocol.
4+
5+
## Proposed Changes
6+
7+
- Make `clientInfo` and `agentInfo` required in the `initialize` request.
8+
9+
## Agreed on Changes

rust/agent.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ pub struct InitializeRequest {
2929
/// Capabilities supported by the client.
3030
#[serde(default)]
3131
pub client_capabilities: ClientCapabilities,
32+
/// Information about the Client name and version sent to the Agent.
33+
///
34+
/// Note: in future versions of the protocol, this will be required.
35+
#[serde(skip_serializing_if = "Option::is_none")]
36+
pub client_info: Option<Implementation>,
3237
/// Extension point for implementations
3338
#[serde(skip_serializing_if = "Option::is_none", rename = "_meta")]
3439
pub meta: Option<serde_json::Value>,
@@ -54,11 +59,34 @@ pub struct InitializeResponse {
5459
/// Authentication methods supported by the agent.
5560
#[serde(default)]
5661
pub auth_methods: Vec<AuthMethod>,
62+
/// Information about the Agent name and version sent to the Client.
63+
///
64+
/// Note: in future versions of the protocol, this will be required.
65+
#[serde(skip_serializing_if = "Option::is_none")]
66+
pub agent_info: Option<Implementation>,
5767
/// Extension point for implementations
5868
#[serde(skip_serializing_if = "Option::is_none", rename = "_meta")]
5969
pub meta: Option<serde_json::Value>,
6070
}
6171

72+
/// Describes the name and version of an MCP implementation, with an optional
73+
/// title for UI representation.
74+
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
75+
#[serde(rename_all = "camelCase")]
76+
pub struct Implementation {
77+
/// Intended for programmatic or logical use, but can be used as a display
78+
/// name fallback if title isn’t present.
79+
name: String,
80+
/// Intended for UI and end-user contexts — optimized to be human-readable
81+
/// and easily understood.
82+
///
83+
/// If not provided, the name should be used for display.
84+
title: Option<String>,
85+
/// Version of the implementation. Can be displayed to the user or used
86+
/// for debugging or metrics purposes.
87+
version: String,
88+
}
89+
6290
// Authentication
6391

6492
/// Request parameters for the authenticate method.

rust/bin/generate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct AgentOutgoingMessage(JsonRpcMessage<OutgoingMessage<AgentSide, ClientSide
1717
#[schemars(extend("x-docs-ignore" = true))]
1818
struct ClientOutgoingMessage(JsonRpcMessage<OutgoingMessage<ClientSide, AgentSide>>);
1919

20-
#[expect(dead_code, clippy::large_enum_variant)]
20+
#[expect(dead_code)]
2121
#[derive(JsonSchema)]
2222
#[serde(untagged)]
2323
enum AcpTypes {

schema/schema.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,6 +958,25 @@
958958
"required": ["name", "value"],
959959
"type": "object"
960960
},
961+
"Implementation": {
962+
"description": "Describes the name and version of an MCP implementation, with an optional\ntitle for UI representation.",
963+
"properties": {
964+
"name": {
965+
"description": "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present.",
966+
"type": "string"
967+
},
968+
"title": {
969+
"description": "Intended for UI and end-user contexts — optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display.",
970+
"type": ["string", "null"]
971+
},
972+
"version": {
973+
"description": "Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes.",
974+
"type": "string"
975+
}
976+
},
977+
"required": ["name", "version"],
978+
"type": "object"
979+
},
961980
"InitializeRequest": {
962981
"description": "Request parameters for the initialize method.\n\nSent by the client to establish connection and negotiate capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)",
963982
"properties": {
@@ -975,6 +994,17 @@
975994
},
976995
"description": "Capabilities supported by the client."
977996
},
997+
"clientInfo": {
998+
"anyOf": [
999+
{
1000+
"$ref": "#/$defs/Implementation"
1001+
},
1002+
{
1003+
"type": "null"
1004+
}
1005+
],
1006+
"description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required."
1007+
},
9781008
"protocolVersion": {
9791009
"$ref": "#/$defs/ProtocolVersion",
9801010
"description": "The latest protocol version supported by the client."
@@ -1007,6 +1037,17 @@
10071037
},
10081038
"description": "Capabilities supported by the agent."
10091039
},
1040+
"agentInfo": {
1041+
"anyOf": [
1042+
{
1043+
"$ref": "#/$defs/Implementation"
1044+
},
1045+
{
1046+
"type": "null"
1047+
}
1048+
],
1049+
"description": "Information about the Agent name and version sent to the Client.\n\nNote: in future versions of the protocol, this will be required."
1050+
},
10101051
"authMethods": {
10111052
"default": [],
10121053
"description": "Authentication methods supported by the agent.",

0 commit comments

Comments
 (0)