diff --git a/src/fastmcp/server/server.py b/src/fastmcp/server/server.py index dafe2a806b..5817487c32 100644 --- a/src/fastmcp/server/server.py +++ b/src/fastmcp/server/server.py @@ -2483,23 +2483,6 @@ def proxy_client_factory(): return FastMCPProxy(client_factory=client_factory, **settings) - @classmethod - def from_client( - cls, client: Client[ClientTransportT], **settings: Any - ) -> FastMCPProxy: - """ - Create a FastMCP proxy server from a FastMCP client. - """ - # Deprecated since 2.3.5 - if fastmcp.settings.deprecation_warnings: - warnings.warn( - "FastMCP.from_client() is deprecated; use FastMCP.as_proxy() instead.", - DeprecationWarning, - stacklevel=2, - ) - - return cls.as_proxy(client, **settings) - def _should_enable_component( self, component: FastMCPComponent, diff --git a/tests/deprecated/test_deprecated.py b/tests/deprecated/test_deprecated.py index 78ea5a9571..25a32aff66 100644 --- a/tests/deprecated/test_deprecated.py +++ b/tests/deprecated/test_deprecated.py @@ -3,7 +3,7 @@ import pytest from starlette.applications import Starlette -from fastmcp import Client, FastMCP +from fastmcp import FastMCP from fastmcp.utilities.tests import temporary_settings # reset deprecation warnings for this module @@ -46,10 +46,3 @@ def test_http_app_with_sse_transport(): w for w in recorded_warnings if issubclass(w.category, DeprecationWarning) ] assert len(deprecation_warnings) == 0 - - -def test_from_client_deprecation_warning(): - """Test that FastMCP.from_client raises a deprecation warning.""" - server = FastMCP("TestServer") - with pytest.warns(DeprecationWarning, match="from_client"): - FastMCP.from_client(Client(server))