diff --git a/conformance-tests/VALIDATION_RESULTS.md b/conformance-tests/VALIDATION_RESULTS.md index 8edc7ad71..5c409f238 100644 --- a/conformance-tests/VALIDATION_RESULTS.md +++ b/conformance-tests/VALIDATION_RESULTS.md @@ -3,7 +3,7 @@ ## Summary **Server Tests:** 40/40 passed (100%) -**Client Tests:** 3/4 scenarios passed (9/10 checks passed) +**Client Tests:** 4/4 scenarios passed (8/8 checks passed, 2 warnings) **Auth Tests:** 12/14 scenarios fully passing (178 passed, 1 failed, 1 warning, 85.7% scenarios, 98.9% checks) ## Server Test Results @@ -20,20 +20,17 @@ ## Client Test Results -### Passing (3/4 scenarios, 9/10 checks) +### Passing (4/4 scenarios, 8/8 checks) - **initialize (1/1):** Protocol negotiation, clientInfo, capabilities - **tools_call (1/1):** Tool discovery and invocation - **elicitation-sep1034-client-defaults (5/5):** Default values for string, integer, number, enum, boolean - -### Partially Passing (1/4 scenarios, 1/2 checks) - -- **sse-retry (1/2 + 1 warning):** +- **sse-retry (1/1 + 2 warnings):** - ✅ Reconnects after stream closure - - ❌ Does not respect retry timing + - ⚠️ Does not respect retry timing (MUST requirement) - ⚠️ Does not send Last-Event-ID header (SHOULD requirement) -**Issue:** Client treats `retry:` SSE field as invalid instead of parsing it for reconnection timing. +**Note:** Client treats `retry:` SSE field as invalid instead of parsing it for reconnection timing. ## Auth Test Results (Spring HTTP Client) @@ -87,7 +84,7 @@ cd conformance-tests/client-jdk-http-client # Run all scenarios for scenario in initialize tools_call elicitation-sep1034-client-defaults sse-retry; do npx @modelcontextprotocol/conformance client \ - --command "java -jar target/client-jdk-http-client-1.1.0-SNAPSHOT.jar" \ + --command "java -jar target/client-jdk-http-client-2.0.0-SNAPSHOT.jar" \ --scenario $scenario done ``` @@ -104,7 +101,7 @@ cd conformance-tests/client-spring-http-client # Run auth suite npx @modelcontextprotocol/conformance@0.1.15 client \ --spec-version 2025-11-25 \ - --command "java -jar target/client-spring-http-client-1.1.0-SNAPSHOT.jar" \ + --command "java -jar target/client-spring-http-client-2.0.0-SNAPSHOT.jar" \ --suite auth ``` diff --git a/conformance-tests/client-jdk-http-client/README.md b/conformance-tests/client-jdk-http-client/README.md index ba5f4fed1..1f6134354 100644 --- a/conformance-tests/client-jdk-http-client/README.md +++ b/conformance-tests/client-jdk-http-client/README.md @@ -40,7 +40,7 @@ Currently implemented scenarios: - ⚠️ Lists available tools from the server - ⚠️ Calls the `test_reconnection` tool which triggers SSE stream closure - ✅ Client reconnects after stream closure (PASSING) - - ❌ Client does not respect retry timing (FAILING) + - ⚠️ Client does not respect retry timing (WARNING - MUST requirement) - ⚠️ Client does not send Last-Event-ID header (WARNING - SHOULD requirement) ## Building @@ -54,7 +54,7 @@ cd conformance-tests/client-jdk-http-client This creates an executable JAR at: ``` -target/client-jdk-http-client-1.1.0-SNAPSHOT.jar +target/client-jdk-http-client-2.0.0-SNAPSHOT.jar ``` ## Running Tests @@ -65,19 +65,19 @@ Run a single scenario: ```bash npx @modelcontextprotocol/conformance client \ - --command "java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-1.1.0-SNAPSHOT.jar" \ + --command "java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-2.0.0-SNAPSHOT.jar" \ --scenario initialize npx @modelcontextprotocol/conformance client \ - --command "java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-1.1.0-SNAPSHOT.jar" \ + --command "java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-2.0.0-SNAPSHOT.jar" \ --scenario tools_call npx @modelcontextprotocol/conformance client \ - --command "java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-1.1.0-SNAPSHOT.jar" \ + --command "java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-2.0.0-SNAPSHOT.jar" \ --scenario elicitation-sep1034-client-defaults npx @modelcontextprotocol/conformance client \ - --command "java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-1.1.0-SNAPSHOT.jar" \ + --command "java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-2.0.0-SNAPSHOT.jar" \ --scenario sse-retry ``` @@ -85,7 +85,7 @@ Run with verbose output: ```bash npx @modelcontextprotocol/conformance client \ - --command "java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-1.1.0-SNAPSHOT.jar" \ + --command "java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-2.0.0-SNAPSHOT.jar" \ --scenario initialize \ --verbose ``` @@ -96,18 +96,18 @@ You can also run the client manually if you have a test server: ```bash export MCP_CONFORMANCE_SCENARIO=initialize -java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-1.1.0-SNAPSHOT.jar http://localhost:3000/mcp +java -jar conformance-tests/client-jdk-http-client/target/client-jdk-http-client-2.0.0-SNAPSHOT.jar http://localhost:3000/mcp ``` ## Test Results The conformance framework generates test results showing: -**Current Status (3/4 scenarios passing):** +**Current Status (4/4 scenarios passing):** - ✅ initialize: 1/1 checks passed - ✅ tools_call: 1/1 checks passed - ✅ elicitation-sep1034-client-defaults: 5/5 checks passed -- ⚠️ sse-retry: 1/2 checks passed, 1 warning +- ⚠️ sse-retry: 1/1 checks passed, 2 warnings Test result files are generated in `results/-/`: - `checks.json`: Array of conformance check results with pass/fail status @@ -116,7 +116,7 @@ Test result files are generated in `results/-/`: ### Known Issue: SSE Retry Handling -The `sse-retry` scenario currently fails because: +The `sse-retry` scenario passes but has 2 warnings: 1. The client treats the SSE `retry:` field as invalid instead of parsing it 2. The client does not implement retry timing (reconnects immediately) 3. The client does not send the Last-Event-ID header on reconnection diff --git a/conformance-tests/client-jdk-http-client/src/main/java/io/modelcontextprotocol/conformance/client/ConformanceJdkClientMcpClient.java b/conformance-tests/client-jdk-http-client/src/main/java/io/modelcontextprotocol/conformance/client/ConformanceJdkClientMcpClient.java index 570c4614e..12cd4e9bf 100644 --- a/conformance-tests/client-jdk-http-client/src/main/java/io/modelcontextprotocol/conformance/client/ConformanceJdkClientMcpClient.java +++ b/conformance-tests/client-jdk-http-client/src/main/java/io/modelcontextprotocol/conformance/client/ConformanceJdkClientMcpClient.java @@ -80,7 +80,7 @@ private static McpSyncClient createClient(String serverUrl) { HttpClientStreamableHttpTransport transport = HttpClientStreamableHttpTransport.builder(serverUrl).build(); return McpClient.sync(transport) - .clientInfo(new McpSchema.Implementation("test-client", "1.0.0")) + .clientInfo(new McpSchema.Implementation("test-client", "2.0.0")) .requestTimeout(Duration.ofSeconds(30)) .build(); } @@ -97,7 +97,7 @@ private static McpSyncClient createClientWithElicitation(String serverUrl) { var capabilities = McpSchema.ClientCapabilities.builder().elicitation().build(); return McpClient.sync(transport) - .clientInfo(new McpSchema.Implementation("test-client", "1.0.0")) + .clientInfo(new McpSchema.Implementation("test-client", "2.0.0")) .requestTimeout(Duration.ofSeconds(30)) .capabilities(capabilities) .elicitation(request -> { diff --git a/conformance-tests/client-spring-http-client/README.md b/conformance-tests/client-spring-http-client/README.md index afbf64773..8a3b9331f 100644 --- a/conformance-tests/client-spring-http-client/README.md +++ b/conformance-tests/client-spring-http-client/README.md @@ -67,7 +67,7 @@ cd conformance-tests/client-spring-http-client This creates an executable JAR at: ``` -target/client-spring-http-client-1.1.0-SNAPSHOT.jar +target/client-spring-http-client-2.0.0-SNAPSHOT.jar ``` ## Running Tests @@ -79,7 +79,7 @@ Run the full auth suite: ```bash npx @modelcontextprotocol/conformance@0.1.15 client \ --spec-version 2025-11-25 \ - --command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-1.1.0-SNAPSHOT.jar" \ + --command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-2.0.0-SNAPSHOT.jar" \ --suite auth ``` @@ -88,7 +88,7 @@ Run a single scenario: ```bash npx @modelcontextprotocol/conformance@0.1.15 client \ --spec-version 2025-11-25 \ - --command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-1.1.0-SNAPSHOT.jar" \ + --command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-2.0.0-SNAPSHOT.jar" \ --scenario auth/metadata-default ``` @@ -97,7 +97,7 @@ Run with verbose output: ```bash npx @modelcontextprotocol/conformance@0.1.15 client \ --spec-version 2025-11-25 \ - --command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-1.1.0-SNAPSHOT.jar" \ + --command "java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-2.0.0-SNAPSHOT.jar" \ --scenario auth/metadata-default \ --verbose ``` @@ -108,7 +108,7 @@ You can also run the client manually if you have a test server: ```bash export MCP_CONFORMANCE_SCENARIO=auth/metadata-default -java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-1.1.0-SNAPSHOT.jar http://localhost:3000/mcp +java -jar conformance-tests/client-spring-http-client/target/client-spring-http-client-2.0.0-SNAPSHOT.jar http://localhost:3000/mcp ``` ## Known Issues diff --git a/conformance-tests/client-spring-http-client/src/main/java/io/modelcontextprotocol/conformance/client/scenario/DefaultScenario.java b/conformance-tests/client-spring-http-client/src/main/java/io/modelcontextprotocol/conformance/client/scenario/DefaultScenario.java index 907cea10d..17b9c4bde 100644 --- a/conformance-tests/client-spring-http-client/src/main/java/io/modelcontextprotocol/conformance/client/scenario/DefaultScenario.java +++ b/conformance-tests/client-spring-http-client/src/main/java/io/modelcontextprotocol/conformance/client/scenario/DefaultScenario.java @@ -58,7 +58,7 @@ public void execute(String serverUrl) { this.client = McpClient.sync(transport) .transportContextProvider(new AuthenticationMcpTransportContextProvider()) - .clientInfo(new McpSchema.Implementation("test-client", "1.0.0")) + .clientInfo(new McpSchema.Implementation("test-client", "2.0.0")) .requestTimeout(Duration.ofSeconds(30)) .build(); diff --git a/conformance-tests/client-spring-http-client/src/main/java/io/modelcontextprotocol/conformance/client/scenario/PreRegistrationScenario.java b/conformance-tests/client-spring-http-client/src/main/java/io/modelcontextprotocol/conformance/client/scenario/PreRegistrationScenario.java index 8e6bbe228..459b143f4 100644 --- a/conformance-tests/client-spring-http-client/src/main/java/io/modelcontextprotocol/conformance/client/scenario/PreRegistrationScenario.java +++ b/conformance-tests/client-spring-http-client/src/main/java/io/modelcontextprotocol/conformance/client/scenario/PreRegistrationScenario.java @@ -60,7 +60,7 @@ public void execute(String serverUrl) { var client = McpClient.sync(transport) .transportContextProvider(new AuthenticationMcpTransportContextProvider()) - .clientInfo(new McpSchema.Implementation("test-client", "1.0.0")) + .clientInfo(new McpSchema.Implementation("test-client", "2.0.0")) .requestTimeout(Duration.ofSeconds(30)) .build(); diff --git a/conformance-tests/server-servlet/README.md b/conformance-tests/server-servlet/README.md index ef327ecf6..a72e54f0c 100644 --- a/conformance-tests/server-servlet/README.md +++ b/conformance-tests/server-servlet/README.md @@ -142,7 +142,7 @@ curl -X POST http://localhost:8080/mcp \ -H "Content-Type: application/json" \ -H "Accept: text/event-stream" \ -H "mcp-session-id: test-session-123" \ - -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0.0"}}}' + -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test-client","version":"2.0.0"}}}' ``` ## Architecture diff --git a/conformance-tests/server-servlet/src/main/java/io/modelcontextprotocol/conformance/server/ConformanceServlet.java b/conformance-tests/server-servlet/src/main/java/io/modelcontextprotocol/conformance/server/ConformanceServlet.java index 3d162a5de..143aca190 100644 --- a/conformance-tests/server-servlet/src/main/java/io/modelcontextprotocol/conformance/server/ConformanceServlet.java +++ b/conformance-tests/server-servlet/src/main/java/io/modelcontextprotocol/conformance/server/ConformanceServlet.java @@ -75,7 +75,7 @@ public static void main(String[] args) throws Exception { // Build server with all conformance test features var mcpServer = McpServer.sync(transportProvider) - .serverInfo("mcp-conformance-server", "1.0.0") + .serverInfo("mcp-conformance-server", "2.0.0") .capabilities(ServerCapabilities.builder() .completions() .resources(true, false) diff --git a/docs/quickstart.md b/docs/quickstart.md index e7e76bc88..02165029e 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -123,7 +123,7 @@ Add the BOM to your project: io.modelcontextprotocol.sdk mcp-bom - 1.0.0 + 2.0.0 pom import @@ -135,7 +135,7 @@ Add the BOM to your project: ```groovy dependencies { - implementation platform("io.modelcontextprotocol.sdk:mcp-bom:1.0.0") + implementation platform("io.modelcontextprotocol.sdk:mcp-bom:2.0.0") //... } ``` diff --git a/docs/server.md b/docs/server.md index f9f3aa683..ae1baf446 100644 --- a/docs/server.md +++ b/docs/server.md @@ -31,7 +31,7 @@ The server supports both synchronous and asynchronous APIs, allowing for flexibl ```java // Create a server with custom configuration McpSyncServer syncServer = McpServer.sync(transportProvider) - .serverInfo("my-server", "1.0.0") + .serverInfo("my-server", "2.0.0") .capabilities(ServerCapabilities.builder() .resources(false, true) // Resource support: subscribe=false, listChanged=true .tools(true) // Enable tool support with list changes @@ -55,7 +55,7 @@ The server supports both synchronous and asynchronous APIs, allowing for flexibl ```java // Create an async server with custom configuration McpAsyncServer asyncServer = McpServer.async(transportProvider) - .serverInfo("my-server", "1.0.0") + .serverInfo("my-server", "2.0.0") .capabilities(ServerCapabilities.builder() .resources(false, true) // Resource support: subscribe=false, listChanged=true .tools(true) // Enable tool support with list changes @@ -446,7 +446,7 @@ Enable subscription support in the server capabilities: ```java McpSyncServer server = McpServer.sync(transportProvider) - .serverInfo("my-server", "1.0.0") + .serverInfo("my-server", "2.0.0") .capabilities(ServerCapabilities.builder() .resources(true, false) // subscribe=true, listChanged=false .build()) @@ -587,7 +587,7 @@ Once connected to a compatible client, the server can request language model gen ```java // Create a server McpSyncServer server = McpServer.sync(transportProvider) - .serverInfo("my-server", "1.0.0") + .serverInfo("my-server", "2.0.0") .build(); // Define a tool that uses sampling @@ -641,7 +641,7 @@ Once connected to a compatible client, the server can request language model gen ```java // Create a server McpAsyncServer server = McpServer.async(transportProvider) - .serverInfo("my-server", "1.0.0") + .serverInfo("my-server", "2.0.0") .build(); // Define a tool that uses sampling @@ -766,7 +766,7 @@ var tool = new McpServerFeatures.AsyncToolSpecification( }); var mcpServer = McpServer.async(mcpServerTransportProvider) - .serverInfo("test-server", "1.0.0") + .serverInfo("test-server", "2.0.0") .capabilities( ServerCapabilities.builder() .logging() // Enable logging support