Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*
* @author Dariusz Jędrzejczyk
* @author Christian Tzolov
* @author lambochen
*/
public class McpAsyncServerExchange {

Expand Down Expand Up @@ -50,6 +51,14 @@ public McpAsyncServerExchange(McpServerSession session, McpSchema.ClientCapabili
this.clientInfo = clientInfo;
}

/**
* Get the server session.
* @return The server session.
*/
public McpServerSession getSession() {
return session;
}

/**
* Get the client capabilities that define the supported features and functionality.
* @return The client capabilities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
import io.modelcontextprotocol.spec.McpSchema;
import io.modelcontextprotocol.spec.McpSchema.LoggingLevel;
import io.modelcontextprotocol.spec.McpSchema.LoggingMessageNotification;
import io.modelcontextprotocol.spec.McpServerSession;

/**
* Represents a synchronous exchange with a Model Context Protocol (MCP) client. The
* exchange provides methods to interact with the client and query its capabilities.
*
* @author Dariusz Jędrzejczyk
* @author Christian Tzolov
* @author lambochen
*/
public class McpSyncServerExchange {

Expand All @@ -28,6 +30,14 @@ public McpSyncServerExchange(McpAsyncServerExchange exchange) {
this.exchange = exchange;
}

/**
* Get the server session.
* @return The server session.
*/
public McpServerSession getSession() {
return this.exchange.getSession();
}

/**
* Get the client capabilities that define the supported features and functionality.
* @return The client capabilities
Expand Down