Skip to content

Commit cfaac01

Browse files
committed
fix: update remote-mcp sample to streamable http
1 parent eb2d43d commit cfaac01

File tree

3 files changed

+1362
-993
lines changed

3 files changed

+1362
-993
lines changed

samples/simple-remote-mcp/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
from langchain_anthropic import ChatAnthropic
66
from langchain_mcp_adapters.tools import load_mcp_tools
77
from mcp import ClientSession
8-
from mcp.client.sse import sse_client
8+
from mcp.client.streamable_http import streamablehttp_client
99

1010
dotenv.load_dotenv()
1111

1212
@asynccontextmanager
1313
async def make_graph():
14-
async with sse_client(
14+
async with streamablehttp_client(
1515
url=os.getenv("UIPATH_MCP_SERVER_URL"),
1616
headers={"Authorization": f"Bearer {os.getenv('UIPATH_ACCESS_TOKEN')}"},
1717
timeout=60,
18-
) as (read, write):
18+
) as (read, write, _):
1919
async with ClientSession(read, write) as session:
2020
await session.initialize()
2121
tools = await load_mcp_tools(session)

samples/simple-remote-mcp/pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ version = "0.0.1"
44
description = "simple-remote-mcp"
55
authors = [{ name = "John Doe", email = "[email protected]" }]
66
dependencies = [
7-
"uipath-langchain==0.0.113",
8-
"langchain>=0.3.25",
9-
"langchain-anthropic>=0.3.13",
10-
"langgraph>=0.4.5",
7+
"uipath-langchain==0.0.118",
8+
"langchain>=0.3.26",
9+
"langchain-anthropic>=0.3.17",
10+
"langgraph>=0.5.3",
1111
"python-dotenv>=1.0.0",
12-
"anthropic>=0.51.0",
13-
"langchain-mcp-adapters>=0.1.0"
12+
"anthropic>=0.57.1",
13+
"langchain-mcp-adapters>=0.1.9"
1414
]
1515
requires-python = ">=3.10"

0 commit comments

Comments
 (0)