Skip to content

[feat] support get session #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
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
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ public McpSchema.Implementation getClientInfo() {
return this.clientInfo;
}

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

/**
* Create a new message using the sampling capabilities of the client. The Model
* Context Protocol (MCP) provides a standardized way for servers to request LLM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
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
Expand Down Expand Up @@ -43,6 +44,14 @@ public McpSchema.ClientCapabilities getClientCapabilities() {
public McpSchema.Implementation getClientInfo() {
return this.exchange.getClientInfo();
}

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

/**
* Create a new message using the sampling capabilities of the client. The Model
Expand Down