File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 33sys .path .insert (0 , "/session/metadata/vendor" )
44sys .path .insert (0 , "/session/metadata" )
55
6- from mcp .server .fastmcp import FastMCP
7-
8- from exceptions import HTTPException , http_exception
9-
106
117def setup_server ():
8+ from mcp .server .fastmcp import FastMCP
9+
10+ from exceptions import HTTPException , http_exception
1211 mcp = FastMCP ("Demo" , stateless_http = True )
1312
1413 @mcp .tool ()
Original file line number Diff line number Diff line change 77import pytest
88import requests
99from mcp import ClientSession
10- from mcp .client .sse import sse_client
10+ from mcp .client .streamable_http import streamablehttp_client
1111from mcp .types import (
1212 CallToolResult ,
1313 ListPromptsResult ,
@@ -93,7 +93,7 @@ def test_nonexistent_page(web_server):
9393@pytest .mark .asyncio
9494async def test_sse_connection (web_server ):
9595 """Test that we can establish a connection to the SSE endpoint."""
96- async with sse_client (f"{ web_server .base_url } /sse " ) as (read , write ):
96+ async with streamablehttp_client (f"{ web_server .base_url } /mcp " ) as (read , write , _ ):
9797 async with ClientSession (
9898 read ,
9999 write ,
You can’t perform that action at this time.
0 commit comments