Session Module
Unified session management for the MCP Server Framework. The Session is the single source of truth for each connected MCP client.
Session (source of truth per client)├── id (unique identifier)├── state (lifecycle: created → active → closing → closed)├── transport → TransportContext│ ├── type (http | sse | stdio)│ ├── transport (MCP SDK transport)│ └── heartbeat (state tracking)├── mcpSession → McpSession│ ├── sdk (MCP SDK server)│ └── register*() (SDK registration methods)├── auth → AuthContext (auth/)│ ├── sdkAuthInfo (SDK AuthInfo wrapper)│ ├── userId? (authenticated user)│ └── permissions (access scopes)├── clientInfo (name, version, remoteAddress)└── metadata → SessionMetadata (createdAt, lastActivityAt) Copy
Session (source of truth per client)├── id (unique identifier)├── state (lifecycle: created → active → closing → closed)├── transport → TransportContext│ ├── type (http | sse | stdio)│ ├── transport (MCP SDK transport)│ └── heartbeat (state tracking)├── mcpSession → McpSession│ ├── sdk (MCP SDK server)│ └── register*() (SDK registration methods)├── auth → AuthContext (auth/)│ ├── sdkAuthInfo (SDK AuthInfo wrapper)│ ├── userId? (authenticated user)│ └── permissions (access scopes)├── clientInfo (name, version, remoteAddress)└── metadata → SessionMetadata (createdAt, lastActivityAt)
Session Module
Unified session management for the MCP Server Framework. The Session is the single source of truth for each connected MCP client.
Architecture