build: complete upgrade to fastapi 0.141, mcp sdk v2, fastmcp 4 and httpx2
This commit is contained in:
@@ -15,7 +15,7 @@ def map_event_to_notifications(event: McpEvent) -> list[mcp_types.ServerNotifica
|
||||
notification = _list_changed_notification(event)
|
||||
if notification is None:
|
||||
return []
|
||||
return [mcp_types.ServerNotification(notification)]
|
||||
return [notification]
|
||||
|
||||
|
||||
def _list_changed_notification(
|
||||
|
||||
@@ -34,7 +34,7 @@ class FastMcpNotificationContext(Protocol):
|
||||
|
||||
async def send_notification(
|
||||
self,
|
||||
notification: mcp_types.ServerNotificationType,
|
||||
notification: mcp_types.ServerNotification,
|
||||
) -> None: ...
|
||||
|
||||
|
||||
@@ -46,4 +46,4 @@ class FastMcpContextNotificationSink:
|
||||
|
||||
async def send_event(self, event: McpEvent) -> None:
|
||||
for notification in map_event_to_notifications(event):
|
||||
await self._context.send_notification(notification.root)
|
||||
await self._context.send_notification(notification)
|
||||
|
||||
Reference in New Issue
Block a user