@@ -77,6 +77,21 @@ public class McpAsyncClient {
7777 */
7878 private final McpSchema .ClientCapabilities clientCapabilities ;
7979
80+ /**
81+ * Client implementation information.
82+ */
83+ private final McpSchema .Implementation clientInfo ;
84+
85+ /**
86+ * Server capabilities.
87+ */
88+ private McpSchema .ServerCapabilities serverCapabilities ;
89+
90+ /**
91+ * Server implementation information.
92+ */
93+ private McpSchema .Implementation serverInfo ;
94+
8095 /**
8196 * Roots define the boundaries of where servers can operate within the filesystem,
8297 * allowing them to understand which directories and files they have access to.
@@ -100,11 +115,6 @@ public class McpAsyncClient {
100115 */
101116 private final McpTransport transport ;
102117
103- /**
104- * Client implementation information.
105- */
106- private Implementation clientInfo ;
107-
108118 /**
109119 * Create a new McpAsyncClient with the given transport and session request-response
110120 * timeout.
@@ -241,6 +251,9 @@ public Mono<McpSchema.InitializeResult> initialize() {
241251
242252 return result .flatMap (initializeResult -> {
243253
254+ this .serverCapabilities = initializeResult .capabilities ();
255+ this .serverInfo = initializeResult .serverInfo ();
256+
244257 logger .info ("Server response with Protocol: {}, Capabilities: {}, Info: {} and Instructions {}" ,
245258 initializeResult .protocolVersion (), initializeResult .capabilities (), initializeResult .serverInfo (),
246259 initializeResult .instructions ());
@@ -256,6 +269,38 @@ public Mono<McpSchema.InitializeResult> initialize() {
256269 });
257270 }
258271
272+ /**
273+ * Get the server capabilities that define the supported features and functionality.
274+ * @return The server capabilities
275+ */
276+ public McpSchema .ServerCapabilities getServerCapabilities () {
277+ return this .serverCapabilities ;
278+ }
279+
280+ /**
281+ * Get the server implementation information.
282+ * @return The server implementation details
283+ */
284+ public McpSchema .Implementation getServerInfo () {
285+ return this .serverInfo ;
286+ }
287+
288+ /**
289+ * Get the client capabilities that define the supported features and functionality.
290+ * @return The client capabilities
291+ */
292+ public ClientCapabilities getClientCapabilities () {
293+ return this .clientCapabilities ;
294+ }
295+
296+ /**
297+ * Get the client implementation information.
298+ * @return The client implementation details
299+ */
300+ public McpSchema .Implementation getClientInfo () {
301+ return this .clientInfo ;
302+ }
303+
259304 /**
260305 * Closes the client connection immediately.
261306 */
0 commit comments