Skip to content

basalt / mcp-core/src / McpSession

Interface: McpSession ​

Defined in: mcp-core/src/sessions.ts:34

One MCP session. The object itself is the session identity the core server scopes in-flight calls (and notifications/cancelled) by — pass it as CallContext.session for every request of the session.

Properties ​

id ​

> readonly id: string

Defined in: mcp-core/src/sessions.ts:35


lastSeen ​

> lastSeen: number

Defined in: mcp-core/src/sessions.ts:39

Last time a request used it (ms since epoch).


principal ​

> readonly principal: string

Defined in: mcp-core/src/sessions.ts:37

Who opened it — a request must present the same principal to use it.

Released under the MIT License.