Skip to content
Open
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
17 changes: 7 additions & 10 deletions conformance-tests/VALIDATION_RESULTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down Expand Up @@ -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
```
Expand All @@ -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
```

Expand Down
22 changes: 11 additions & 11 deletions conformance-tests/client-jdk-http-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -65,27 +65,27 @@ 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
```

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
```
Expand All @@ -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/<scenario>-<timestamp>/`:
- `checks.json`: Array of conformance check results with pass/fail status
Expand All @@ -116,7 +116,7 @@ Test result files are generated in `results/<scenario>-<timestamp>/`:

### 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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 -> {
Expand Down
10 changes: 5 additions & 5 deletions conformance-tests/client-spring-http-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
```

Expand All @@ -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
```

Expand All @@ -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
```
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion conformance-tests/server-servlet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Add the BOM to your project:
<dependency>
<groupId>io.modelcontextprotocol.sdk</groupId>
<artifactId>mcp-bom</artifactId>
<version>1.0.0</version>
<version>2.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -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")
//...
}
```
Expand Down
12 changes: 6 additions & 6 deletions docs/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading