From 9e2fef82549ccd6be677b64b23b194698ac707c6 Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Mon, 6 Jul 2026 00:31:17 -0400 Subject: [PATCH] docs: fix stale .root notification access for MCP SDK v2 --- docs/clients/notifications.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/clients/notifications.mdx b/docs/clients/notifications.mdx index 1780c0b37..aa7d47058 100644 --- a/docs/clients/notifications.mdx +++ b/docs/clients/notifications.mdx @@ -22,8 +22,8 @@ from fastmcp import Client async def message_handler(message): """Handle MCP notifications from the server.""" - if hasattr(message, 'root'): - method = message.root.method + if hasattr(message, 'method'): + method = message.method if method == "notifications/tools/list_changed": print("Tools have changed - refresh tool cache")