Add ServerSessionT type var to Context (#271)

* Add ServerSessionT type var to Context

* Passing locally

* Try now
This commit is contained in:
Marcelo Trylesinski 2025-03-12 16:35:15 +01:00 • committed by GitHub
commit e756315dea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,7 +38,7 @@ be instantiated directly by users of the MCP framework.
"""
from enum import Enum
from typing import Any
from typing import Any, TypeVar
import anyio
import anyio.lowlevel
@ -59,6 +59,9 @@ class InitializationState(Enum):
Initialized = 3
ServerSessionT = TypeVar("ServerSessionT", bound="ServerSession")
class ServerSession(
BaseSession[
types.ServerRequest,