Skip to content

Commit e160752

Browse files
committed
Fix startup error
1 parent 52c300c commit e160752

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/worker.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
sys.path.insert(0, "/session/metadata/vendor")
44
sys.path.insert(0, "/session/metadata")
55

6-
from mcp.server.fastmcp import FastMCP
7-
8-
from exceptions import HTTPException, http_exception
9-
106

117
def 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()

tests/test_worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pytest
88
import requests
99
from mcp import ClientSession
10-
from mcp.client.sse import sse_client
10+
from mcp.client.streamable_http import streamablehttp_client
1111
from mcp.types import (
1212
CallToolResult,
1313
ListPromptsResult,
@@ -93,7 +93,7 @@ def test_nonexistent_page(web_server):
9393
@pytest.mark.asyncio
9494
async 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,

0 commit comments

Comments
 (0)