From ee54acbfa3d5128598c162241aa54f729659c6a5 Mon Sep 17 00:00:00 2001 From: John T <474683+johnbikes@users.noreply.github.com> Date: Thu, 10 Jul 2025 06:55:34 -0400 Subject: [PATCH] =?UTF-8?q?The=20lifespan=5Fcontext=20object=20here=20is?= =?UTF-8?q?=20not=20a=20dictionary=20like=20the=20other=20e=E2=80=A6=20(#1?= =?UTF-8?q?002)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ihrpr --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d903746c..3cad2aad 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,7 @@ mcp = FastMCP("My App", lifespan=app_lifespan) def query_db() -> str: """Tool that uses initialized resources""" ctx = mcp.get_context() - db = ctx.request_context.lifespan_context["db"] + db = ctx.request_context.lifespan_context.db return db.query() ```