We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3b9a0b commit 39995aaCopy full SHA for 39995aa
2 files changed
src/mcp/client/session.py
@@ -96,11 +96,12 @@ async def _default_logging_callback(
96
97
class ClientSession(
98
BaseSession[
99
- types.ClientRequest,
100
- types.ClientNotification,
101
- types.ClientResult,
102
- types.ServerRequest,
103
- types.ServerNotification,
+ types.ClientRequest, # SendRequestT
+ types.ClientNotification, # SendNotificationT
+ types.ClientResult, # SendResultT
+ types.ServerRequest, # ReceiveRequestT
+ Any, # ReceiveResultT,兼容所有服务端返回结果类型
104
+ types.ServerNotification, # ReceiveNotificationT
105
]
106
):
107
def __init__(
src/mcp/server/session.py
@@ -74,6 +74,7 @@ class ServerSession(
74
types.ServerNotification,
75
types.ServerResult,
76
types.ClientRequest,
77
+ Any,
78
types.ClientNotification,
79
80
0 commit comments