Skip to content

The documentation and comments for the MCP Client section contain errors. #4010

@sunyuhan1998

Description

@sunyuhan1998

In the documentation for the MCP Client (https://docs.spring.io/spring-ai/reference/1.1-SNAPSHOT/api/mcp/mcp-client-boot-starter-docs.html#_configuration_properties), the description for the name configuration property states:

Name of the MCP client instance (used for compatibility checks).

However, the client name is not actually used as part of any compatibility check.

Similarly, the comments in the configuration classes for both the MCP Client and MCP Server regarding the name and version properties also appear to be incorrect:

/**
* The name of the MCP client instance.
* <p>
* This name is reported to clients and used for compatibility checks.
*/
private String name = "spring-ai-mcp-client";
/**
* The version of the MCP client instance.
* <p>
* This version is reported to clients and used for compatibility checks.
*/
private String version = "1.0.0";

/**
* The version of the MCP server instance.
* <p>
* This version is reported to clients and used for compatibility checks.
*/
private String version = "1.0.0";

In reality, neither the name nor the version attributes on either the client or server side are used for compatibility validation. The only property related to compatibility checking is io.modelcontextprotocol.spec.McpTransport#protocolVersion, which can be confirmed by examining the io.modelcontextprotocol.client.LifecycleInitializer#doInitialize method in the MCP Java SDK:

https://github.com/modelcontextprotocol/java-sdk/blob/3a95f757f32c758f84332d9684dd7a81b7d630b4/mcp/src/main/java/io/modelcontextprotocol/client/LifecycleInitializer.java#L300-L329

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions