Skip to content

Commit 577ed6e

Browse files
Fix middleware example: add context parameter to call_next() (#2215)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Jeremiah Lowin <[email protected]>
1 parent 65260c9 commit 577ed6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/servers/context.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ class UserAuthMiddleware(Middleware):
210210
# Middleware stores user info in context state
211211
context.fastmcp_context.set_state("user_id", "user_123")
212212
context.fastmcp_context.set_state("permissions", ["read", "write"])
213-
214-
return await call_next()
213+
214+
return await call_next(context)
215215

216216
@mcp.tool
217217
async def secure_operation(data: str, ctx: Context) -> str:

0 commit comments

Comments
 (0)