@@ -29,6 +29,7 @@ import {
2929 CallToolResult ,
3030 CallToolResultSchema ,
3131 ClientCapabilities ,
32+ Configuration ,
3233 Configuration as ClientConfiguration ,
3334 ElicitationRequest ,
3435 ElicitationRequestSchema ,
@@ -119,6 +120,12 @@ export async function createMCPClient(
119120}
120121
121122export interface MCPClient {
123+ /**
124+ * Information about the connected MCP server, as reported during initialization.
125+ * @see https://modelcontextprotocol.io/specification/2025-11-25/schema#implementation
126+ */
127+ readonly serverInfo : Configuration ;
128+
122129 tools < TOOL_SCHEMAS extends ToolSchemas = 'automatic' > ( options ?: {
123130 schemas ?: TOOL_SCHEMAS ;
124131 } ) : Promise < McpToolSet < TOOL_SCHEMAS > > ;
@@ -201,6 +208,7 @@ class DefaultMCPClient implements MCPClient {
201208 ( response : JSONRPCResponse | Error ) => void
202209 > = new Map ( ) ;
203210 private serverCapabilities : ServerCapabilities = { } ;
211+ private _serverInfo : Configuration = { name : '' , version : '' } ;
204212 private isClosed = true ;
205213 private elicitationRequestHandler ?: (
206214 request : ElicitationRequest ,
@@ -247,6 +255,10 @@ class DefaultMCPClient implements MCPClient {
247255 } ;
248256 }
249257
258+ get serverInfo ( ) : Configuration {
259+ return this . _serverInfo ;
260+ }
261+
250262 async init ( ) : Promise < this> {
251263 try {
252264 await this . transport . start ( ) ;
@@ -277,6 +289,7 @@ class DefaultMCPClient implements MCPClient {
277289 }
278290
279291 this . serverCapabilities = result . capabilities ;
292+ this . _serverInfo = result . serverInfo ;
280293
281294 // Complete initialization handshake:
282295 await this . notification ( {
0 commit comments