chore: standardize client/server implementation names and version (#642)
Unifies client/server implementation names under "Java SDK" branding and updates all versions to 0.15.0. Resolves: #638 Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
parent
e91fe7fbc5
commit
5c46626260
5 changed files with 13 additions and 14 deletions
|
|
@ -167,7 +167,7 @@ public interface McpClient {
|
||||||
|
|
||||||
private ClientCapabilities capabilities;
|
private ClientCapabilities capabilities;
|
||||||
|
|
||||||
private Implementation clientInfo = new Implementation("Java SDK MCP Client", "1.0.0");
|
private Implementation clientInfo = new Implementation("Java SDK MCP Client", "0.15.0");
|
||||||
|
|
||||||
private final Map<String, Root> roots = new HashMap<>();
|
private final Map<String, Root> roots = new HashMap<>();
|
||||||
|
|
||||||
|
|
@ -507,7 +507,7 @@ public interface McpClient {
|
||||||
|
|
||||||
private ClientCapabilities capabilities;
|
private ClientCapabilities capabilities;
|
||||||
|
|
||||||
private Implementation clientInfo = new Implementation("Spring AI MCP Client", "0.3.1");
|
private Implementation clientInfo = new Implementation("Java SDK MCP Client", "0.15.0");
|
||||||
|
|
||||||
private final Map<String, Root> roots = new HashMap<>();
|
private final Map<String, Root> roots = new HashMap<>();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
|
|
||||||
|
|
@ -134,7 +133,7 @@ import reactor.core.publisher.Mono;
|
||||||
*/
|
*/
|
||||||
public interface McpServer {
|
public interface McpServer {
|
||||||
|
|
||||||
McpSchema.Implementation DEFAULT_SERVER_INFO = new McpSchema.Implementation("mcp-server", "1.0.0");
|
McpSchema.Implementation DEFAULT_SERVER_INFO = new McpSchema.Implementation("Java SDK MCP Server", "0.15.0");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts building a synchronous MCP server that provides blocking operations.
|
* Starts building a synchronous MCP server that provides blocking operations.
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ public class HttpClientStreamableHttpTransportEmptyJsonResponseTest {
|
||||||
|
|
||||||
var initializeRequest = new McpSchema.InitializeRequest(ProtocolVersions.MCP_2025_03_26,
|
var initializeRequest = new McpSchema.InitializeRequest(ProtocolVersions.MCP_2025_03_26,
|
||||||
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
||||||
new McpSchema.Implementation("Spring AI MCP Client", "0.3.1"));
|
new McpSchema.Implementation("MCP Client", "0.3.1"));
|
||||||
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
||||||
"test-id", initializeRequest);
|
"test-id", initializeRequest);
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ public class HttpClientStreamableHttpTransportEmptyJsonResponseTest {
|
||||||
|
|
||||||
// Verify the customizer was called
|
// Verify the customizer was called
|
||||||
verify(mockRequestCustomizer, atLeastOnce()).customize(any(), eq("POST"), eq(uri), eq(
|
verify(mockRequestCustomizer, atLeastOnce()).customize(any(), eq("POST"), eq(uri), eq(
|
||||||
"{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"id\":\"test-id\",\"params\":{\"protocolVersion\":\"2025-03-26\",\"capabilities\":{\"roots\":{\"listChanged\":true}},\"clientInfo\":{\"name\":\"Spring AI MCP Client\",\"version\":\"0.3.1\"}}}"),
|
"{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"id\":\"test-id\",\"params\":{\"protocolVersion\":\"2025-03-26\",\"capabilities\":{\"roots\":{\"listChanged\":true}},\"clientInfo\":{\"name\":\"MCP Client\",\"version\":\"0.3.1\"}}}"),
|
||||||
any());
|
any());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ class HttpClientStreamableHttpTransportTest {
|
||||||
// Send test message
|
// Send test message
|
||||||
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
||||||
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
||||||
new McpSchema.Implementation("Spring AI MCP Client", "0.3.1"));
|
new McpSchema.Implementation("MCP Client", "0.3.1"));
|
||||||
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
||||||
"test-id", initializeRequest);
|
"test-id", initializeRequest);
|
||||||
|
|
||||||
|
|
@ -90,7 +90,7 @@ class HttpClientStreamableHttpTransportTest {
|
||||||
|
|
||||||
// Verify the customizer was called
|
// Verify the customizer was called
|
||||||
verify(mockRequestCustomizer, atLeastOnce()).customize(any(), eq("POST"), eq(uri), eq(
|
verify(mockRequestCustomizer, atLeastOnce()).customize(any(), eq("POST"), eq(uri), eq(
|
||||||
"{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"id\":\"test-id\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{\"roots\":{\"listChanged\":true}},\"clientInfo\":{\"name\":\"Spring AI MCP Client\",\"version\":\"0.3.1\"}}}"),
|
"{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"id\":\"test-id\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{\"roots\":{\"listChanged\":true}},\"clientInfo\":{\"name\":\"MCP Client\",\"version\":\"0.3.1\"}}}"),
|
||||||
eq(context));
|
eq(context));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -110,7 +110,7 @@ class HttpClientStreamableHttpTransportTest {
|
||||||
// Send test message
|
// Send test message
|
||||||
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
||||||
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
||||||
new McpSchema.Implementation("Spring AI MCP Client", "0.3.1"));
|
new McpSchema.Implementation("MCP Client", "0.3.1"));
|
||||||
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
||||||
"test-id", initializeRequest);
|
"test-id", initializeRequest);
|
||||||
|
|
||||||
|
|
@ -120,7 +120,7 @@ class HttpClientStreamableHttpTransportTest {
|
||||||
|
|
||||||
// Verify the customizer was called
|
// Verify the customizer was called
|
||||||
verify(mockRequestCustomizer, atLeastOnce()).customize(any(), eq("POST"), eq(uri), eq(
|
verify(mockRequestCustomizer, atLeastOnce()).customize(any(), eq("POST"), eq(uri), eq(
|
||||||
"{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"id\":\"test-id\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{\"roots\":{\"listChanged\":true}},\"clientInfo\":{\"name\":\"Spring AI MCP Client\",\"version\":\"0.3.1\"}}}"),
|
"{\"jsonrpc\":\"2.0\",\"method\":\"initialize\",\"id\":\"test-id\",\"params\":{\"protocolVersion\":\"2025-06-18\",\"capabilities\":{\"roots\":{\"listChanged\":true}},\"clientInfo\":{\"name\":\"MCP Client\",\"version\":\"0.3.1\"}}}"),
|
||||||
eq(context));
|
eq(context));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -133,7 +133,7 @@ class HttpClientStreamableHttpTransportTest {
|
||||||
|
|
||||||
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
||||||
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
||||||
new McpSchema.Implementation("Spring AI MCP Client", "0.3.1"));
|
new McpSchema.Implementation("MCP Client", "0.3.1"));
|
||||||
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
||||||
"test-id", initializeRequest);
|
"test-id", initializeRequest);
|
||||||
|
|
||||||
|
|
@ -148,7 +148,7 @@ class HttpClientStreamableHttpTransportTest {
|
||||||
|
|
||||||
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
||||||
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
||||||
new McpSchema.Implementation("Spring AI MCP Client", "0.3.1"));
|
new McpSchema.Implementation("MCP Client", "0.3.1"));
|
||||||
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
||||||
"test-id", initializeRequest);
|
"test-id", initializeRequest);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ class WebClientStreamableHttpTransportTest {
|
||||||
|
|
||||||
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
||||||
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
||||||
new McpSchema.Implementation("Spring AI MCP Client", "0.3.1"));
|
new McpSchema.Implementation("MCP Client", "0.3.1"));
|
||||||
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
||||||
"test-id", initializeRequest);
|
"test-id", initializeRequest);
|
||||||
|
|
||||||
|
|
@ -62,7 +62,7 @@ class WebClientStreamableHttpTransportTest {
|
||||||
|
|
||||||
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
var initializeRequest = new McpSchema.InitializeRequest(McpSchema.LATEST_PROTOCOL_VERSION,
|
||||||
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
McpSchema.ClientCapabilities.builder().roots(true).build(),
|
||||||
new McpSchema.Implementation("Spring AI MCP Client", "0.3.1"));
|
new McpSchema.Implementation("MCP Client", "0.3.1"));
|
||||||
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
var testMessage = new McpSchema.JSONRPCRequest(McpSchema.JSONRPC_VERSION, McpSchema.METHOD_INITIALIZE,
|
||||||
"test-id", initializeRequest);
|
"test-id", initializeRequest);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue