Skip to content

Commit b00baaa

Browse files
committed
Merge branch 'refs/heads/main' into fix/session_id
# Conflicts: # mcp/src/main/java/io/modelcontextprotocol/server/McpAsyncServer.java
2 parents 499d114 + 0069c97 commit b00baaa

File tree

19 files changed

+1119
-591
lines changed

19 files changed

+1119
-591
lines changed

mcp-spring/mcp-spring-webflux/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@
8282
<version>${mockito.version}</version>
8383
<scope>test</scope>
8484
</dependency>
85+
<dependency>
86+
<groupId>net.bytebuddy</groupId>
87+
<artifactId>byte-buddy</artifactId>
88+
<version>${byte-buddy.version}</version>
89+
<scope>test</scope>
90+
</dependency>
8591
<dependency>
8692
<groupId>io.projectreactor</groupId>
8793
<artifactId>reactor-test</artifactId>

mcp-spring/mcp-spring-webflux/src/test/java/io/modelcontextprotocol/WebFluxSseIntegrationTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,8 @@ void testCompletionShouldReturnExpectedSuggestions(String clientType) {
776776
var mcpServer = McpServer.sync(mcpServerTransportProvider)
777777
.capabilities(ServerCapabilities.builder().completions().build())
778778
.prompts(new McpServerFeatures.SyncPromptSpecification(
779-
new Prompt("code_review", "this is code review prompt", List.of()),
779+
new Prompt("code_review", "this is code review prompt",
780+
List.of(new PromptArgument("language", "string", false))),
780781
(mcpSyncServerExchange, getPromptRequest) -> null))
781782
.completions(new McpServerFeatures.SyncCompletionSpecification(
782783
new McpSchema.PromptReference("ref/prompt", "code_review"), completionHandler))

mcp-spring/mcp-spring-webmvc/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@
7777
<version>${mockito.version}</version>
7878
<scope>test</scope>
7979
</dependency>
80+
<dependency>
81+
<groupId>net.bytebuddy</groupId>
82+
<artifactId>byte-buddy</artifactId>
83+
<version>${byte-buddy.version}</version>
84+
<scope>test</scope>
85+
</dependency>
8086
<dependency>
8187
<groupId>org.testcontainers</groupId>
8288
<artifactId>junit-jupiter</artifactId>

mcp-test/src/main/java/io/modelcontextprotocol/server/AbstractMcpAsyncServerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
/**
3232
* Test suite for the {@link McpAsyncServer} that can be used with different
33-
* {@link McpTransportProvider} implementations.
33+
* {@link io.modelcontextprotocol.spec.McpServerTransportProvider} implementations.
3434
*
3535
* @author Christian Tzolov
3636
*/

mcp-test/src/main/java/io/modelcontextprotocol/server/AbstractMcpSyncServerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
/**
2929
* Test suite for the {@link McpSyncServer} that can be used with different
30-
* {@link McpTransportProvider} implementations.
30+
* {@link io.modelcontextprotocol.spec.McpServerTransportProvider} implementations.
3131
*
3232
* @author Christian Tzolov
3333
*/

mcp/src/main/java/io/modelcontextprotocol/client/McpAsyncClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ public Mono<Void> closeGracefully() {
317317
* The client MUST initiate this phase by sending an initialize request containing:
318318
* The protocol version the client supports, client's capabilities and clients
319319
* implementation information.
320-
* <p/>
320+
* <p>
321321
* The server MUST respond with its own capabilities and information.
322-
* <p/>
322+
* </p>
323323
* After successful initialization, the client MUST send an initialized notification
324324
* to indicate it is ready to begin normal operations.
325325
* @return the initialize result.

mcp/src/main/java/io/modelcontextprotocol/client/McpSyncClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,14 @@ public McpSchema.Implementation getServerInfo() {
9797
return this.delegate.getServerInfo();
9898
}
9999

100+
/**
101+
* Check if the client-server connection is initialized.
102+
* @return true if the client-server connection is initialized
103+
*/
104+
public boolean isInitialized() {
105+
return this.delegate.isInitialized();
106+
}
107+
100108
/**
101109
* Get the client capabilities that define the supported features and functionality.
102110
* @return The client capabilities

0 commit comments

Comments
 (0)