From 9936facffeb8de2c74622e6337905afcffe11e0a Mon Sep 17 00:00:00 2001 From: "marvin-context-protocol[bot]" <225465937+marvin-context-protocol[bot]@users.noreply.github.com> Date: Sun, 14 Sep 2025 14:49:57 +0000 Subject: [PATCH] fix: update broken documentation link in deprecation warning The deprecation warning in Context.get_http_request() referenced a non-existent URL https://gofastmcp.com/patterns/http-requests that returns 404. Updated to point to the correct documentation at https://gofastmcp.com/python-sdk/fastmcp-server-dependencies which contains the actual get_http_request() function documentation. Also updated the corresponding test to expect the new URL. Fixes #1814 Co-authored-by: William Easton --- src/fastmcp/server/context.py | 2 +- tests/server/test_context.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fastmcp/server/context.py b/src/fastmcp/server/context.py index 974ca4be4..16053f1b1 100644 --- a/src/fastmcp/server/context.py +++ b/src/fastmcp/server/context.py @@ -573,7 +573,7 @@ class Context: warnings.warn( "Context.get_http_request() is deprecated and will be removed in a future version. " "Use get_http_request() from fastmcp.server.dependencies instead. " - "See https://gofastmcp.com/patterns/http-requests for more details.", + "See https://gofastmcp.com/python-sdk/fastmcp-server-dependencies for more details.", DeprecationWarning, stacklevel=2, ) diff --git a/tests/server/test_context.py b/tests/server/test_context.py index 9c00ac0e2..4022c09f9 100644 --- a/tests/server/test_context.py +++ b/tests/server/test_context.py @@ -56,8 +56,9 @@ class TestContextDeprecations: "Use get_http_request() from fastmcp.server.dependencies instead" in str(warning.message) ) - assert "https://gofastmcp.com/patterns/http-requests" in str( - warning.message + assert ( + "https://gofastmcp.com/python-sdk/fastmcp-server-dependencies" + in str(warning.message) )