MCP Server Framework - v1.1.2
    Preparing search index...

    Interface ResourceContext

    Runtime context passed to resource read() handlers.

    Provides access to per-request information that the framework knows but the static resource definition does not — most notably the session identifier (for session-bound / ephemeral resources) and authInfo (for fine-grained authorization checks beyond requiredScopes).

    The argument is optional in handler signatures so existing handlers that ignore the context continue to compile without changes.

    interface ResourceContext {
        authInfo?: { scopes?: readonly string[]; token?: string };
        sessionId?: string;
    }
    Index

    Properties

    authInfo?: { scopes?: readonly string[]; token?: string }

    Auth claims attached to the request (if any)

    sessionId?: string

    Session ID of the caller (undefined in stateless transports)