We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76350ff commit ca542a5Copy full SHA for ca542a5
server/session.go
@@ -107,6 +107,17 @@ func (s *MCPServer) RegisterSession(
107
return nil
108
}
109
110
+// GetSession returns the session by its ID.
111
+func (s *MCPServer) GetSession(
112
+ sessionID string,
113
+) (ClientSession, error) {
114
+ sessionValue, ok := s.sessions.Load(sessionID)
115
+ if !ok {
116
+ return nil, ErrSessionNotFound
117
+ }
118
+ return sessionValue.(ClientSession), nil
119
+}
120
+
121
func (s *MCPServer) buildLogNotification(notification mcp.LoggingMessageNotification) mcp.JSONRPCNotification {
122
return mcp.JSONRPCNotification{
123
JSONRPC: mcp.JSONRPC_VERSION,
0 commit comments