File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed
simple-auth/mcp_simple_auth
simple-tool/mcp_simple_tool Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 2323)
2424from mcp .server .auth .settings import AuthSettings , ClientRegistrationOptions
2525from mcp .server .fastmcp .server import FastMCP
26+ from mcp .shared ._httpx_utils import create_mcp_http_client
2627from mcp .shared .auth import OAuthClientInformationFull , OAuthToken
27- from mcp .shared .httpx_utils import create_mcp_http_client
2828
2929logger = logging .getLogger (__name__ )
3030
Original file line number Diff line number Diff line change 22import click
33import mcp .types as types
44from mcp .server .lowlevel import Server
5- from mcp .shared .httpx_utils import create_mcp_http_client
5+ from mcp .shared ._httpx_utils import create_mcp_http_client
66
77
88async def fetch_website (
Original file line number Diff line number Diff line change 1010from httpx_sse import aconnect_sse
1111
1212import mcp .types as types
13- from mcp .shared .httpx_utils import create_mcp_http_client
13+ from mcp .shared ._httpx_utils import create_mcp_http_client
1414from mcp .shared .message import SessionMessage
1515
1616logger = logging .getLogger (__name__ )
Original file line number Diff line number Diff line change 1818from anyio .streams .memory import MemoryObjectReceiveStream , MemoryObjectSendStream
1919from httpx_sse import EventSource , ServerSentEvent , aconnect_sse
2020
21- from mcp .shared .httpx_utils import create_mcp_http_client
21+ from mcp .shared ._httpx_utils import create_mcp_http_client
2222from mcp .shared .message import ClientMessageMetadata , SessionMessage
2323from mcp .types import (
2424 ErrorData ,
File renamed without changes.
Original file line number Diff line number Diff line change 22
33import httpx
44
5- from mcp .shared .httpx_utils import create_mcp_http_client
5+ from mcp .shared ._httpx_utils import create_mcp_http_client
66
77
88def test_default_settings ():
99 """Test that default settings are applied correctly."""
1010 client = create_mcp_http_client ()
11-
11+
1212 assert client .follow_redirects is True
1313 assert client .timeout .connect == 30.0
1414
@@ -17,8 +17,8 @@ def test_custom_parameters():
1717 """Test custom headers and timeout are set correctly."""
1818 headers = {"Authorization" : "Bearer token" }
1919 timeout = httpx .Timeout (60.0 )
20-
20+
2121 client = create_mcp_http_client (headers , timeout )
22-
22+
2323 assert client .headers ["Authorization" ] == "Bearer token"
24- assert client .timeout .connect == 60.0
24+ assert client .timeout .connect == 60.0
You can’t perform that action at this time.
0 commit comments