Skip to content

Commit 809e845

Browse files
committed
chore(mcp): upgrade mcp sdk
1 parent ea37068 commit 809e845

File tree

4 files changed

+113
-58
lines changed

4 files changed

+113
-58
lines changed

AgentCrew/modules/mcpclient/service.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from mcp import ClientSession, StdioServerParameters
66
from mcp.types import ImageContent, TextContent
77
from mcp.client.stdio import stdio_client
8-
from mcp.client.streamable_http import streamablehttp_client
8+
from mcp.client.streamable_http import streamable_http_client
99
from mcp.client.sse import sse_client
1010
from AgentCrew.modules.agents import LocalAgent, AgentManager
1111
from AgentCrew.modules.tools.registry import ToolRegistry
@@ -79,13 +79,17 @@ async def _manage_single_connection(
7979
sse_read_timeout=60 * 60 * 24,
8080
)
8181
else:
82-
session_context = streamablehttp_client(
82+
from httpx import AsyncClient, Timeout
83+
84+
session_context = streamable_http_client(
8385
server_config.url,
84-
headers=headers,
85-
auth=oauth_resolver.get_oauth_client_provider(
86-
server_config.url, token_storage
86+
http_client=AsyncClient(
87+
headers=headers,
88+
auth=oauth_resolver.get_oauth_client_provider(
89+
server_config.url, token_storage
90+
),
91+
timeout=Timeout(60, read=60 * 60 * 24),
8792
),
88-
sse_read_timeout=60 * 60 * 24,
8993
)
9094

9195
async with session_context as stream_context:

docker/pyproject.docker.toml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ name = "agentcrew-ai"
33
version = "0.8.9"
44
requires-python = ">=3.12"
55
classifiers = [
6-
"Programming Language :: Python :: 3",
7-
"Operating System :: OS Independent",
8-
"Development Status :: 4 - Beta",
9-
"Intended Audience :: Developers",
10-
"Topic :: Software Development :: Libraries :: Python Modules",
11-
"Topic :: Scientific/Engineering :: Artificial Intelligence",
6+
"Programming Language :: Python :: 3",
7+
"Operating System :: OS Independent",
8+
"Development Status :: 4 - Beta",
9+
"Intended Audience :: Developers",
10+
"Topic :: Software Development :: Libraries :: Python Modules",
11+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
1212
]
1313
license = "Apache-2.0"
1414
license-files = ["LICENSE"]
1515
description = "Multi-Agents Interactive Chat Tool"
16-
authors = [
17-
{name = "Quy Truong", email = "[email protected]"},
18-
]
16+
authors = [{ name = "Quy Truong", email = "[email protected]" }]
1917
readme = "README.md"
2018

2119
dependencies = [
@@ -32,7 +30,7 @@ dependencies = [
3230
"chromadb>=1.0.0",
3331
"openai>=1.65.2",
3432
"tree-sitter>=0.23.2",
35-
"mcp>=1.3.0",
33+
"mcp>=1.24.0",
3634
"google-genai>=1.7.0",
3735
"toml>=0.10.2",
3836
"markdown>=3.7",
@@ -67,12 +65,7 @@ nvidia = [
6765
]
6866

6967
[tool.uv]
70-
conflicts = [
71-
[
72-
{ extra = "cpu" },
73-
{ extra = "nvidia" },
74-
],
75-
]
68+
conflicts = [[{ extra = "cpu" }, { extra = "nvidia" }]]
7669

7770
[tool.uv.sources]
7871
torch = [
@@ -118,8 +111,4 @@ include-package-data = true
118111
where = ["./"]
119112

120113
[dependency-groups]
121-
dev = [
122-
"pygments>=2.19.1",
123-
"pyinstaller>=6.13.0",
124-
"langfuse>=3.0.1",
125-
]
114+
dev = ["pygments>=2.19.1", "pyinstaller>=6.13.0", "langfuse>=3.0.1"]

pyproject.toml

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ name = "agentcrew-ai"
33
version = "0.8.10"
44
requires-python = ">=3.12"
55
classifiers = [
6-
"Programming Language :: Python :: 3",
7-
"Operating System :: OS Independent",
8-
"Development Status :: 4 - Beta",
9-
"Intended Audience :: Developers",
10-
"Topic :: Software Development :: Libraries :: Python Modules",
11-
"Topic :: Scientific/Engineering :: Artificial Intelligence",
6+
"Programming Language :: Python :: 3",
7+
"Operating System :: OS Independent",
8+
"Development Status :: 4 - Beta",
9+
"Intended Audience :: Developers",
10+
"Topic :: Software Development :: Libraries :: Python Modules",
11+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
1212
]
1313
license = "Apache-2.0"
1414
license-files = ["LICENSE"]
1515
description = "Multi-Agents Interactive Chat Tool"
16-
authors = [
17-
{name = "Quy Truong", email = "[email protected]"},
18-
]
16+
authors = [{ name = "Quy Truong", email = "[email protected]" }]
1917
readme = "README.md"
2018

2119
dependencies = [
@@ -32,7 +30,7 @@ dependencies = [
3230
"chromadb>=1.0.0",
3331
"openai>=1.65.2",
3432
"tree-sitter>=0.23.2",
35-
"mcp>=1.3.0",
33+
"mcp>=1.24.0",
3634
"google-genai>=1.7.0",
3735
"pyside6>=6.8.3",
3836
"markdown>=3.7",
@@ -72,28 +70,23 @@ nvidia = [
7270
]
7371

7472
[tool.uv]
75-
conflicts = [
76-
[
77-
{ extra = "cpu" },
78-
{ extra = "nvidia" },
79-
],
80-
]
73+
conflicts = [[{ extra = "cpu" }, { extra = "nvidia" }]]
8174

8275
[tool.uv.sources]
8376
torch = [
84-
{ index = "pytorch-default", extra= "cpu", marker = "sys_platform == 'darwin'" },
85-
{ index = "pytorch-cpu", extra = "cpu", marker = "sys_platform != 'darwin'"},
77+
{ index = "pytorch-default", extra = "cpu", marker = "sys_platform == 'darwin'" },
78+
{ index = "pytorch-cpu", extra = "cpu", marker = "sys_platform != 'darwin'" },
8679
{ index = "pytorch-cu128", extra = "nvidia" },
8780
]
8881
torchvision = [
89-
{ index = "pytorch-default", extra= "cpu", marker = "sys_platform == 'darwin'" },
90-
{ index = "pytorch-cpu", extra = "cpu", marker = "sys_platform != 'darwin'"},
82+
{ index = "pytorch-default", extra = "cpu", marker = "sys_platform == 'darwin'" },
83+
{ index = "pytorch-cpu", extra = "cpu", marker = "sys_platform != 'darwin'" },
9184
{ index = "pytorch-cu128", extra = "nvidia" },
9285
]
9386

9487
torchaudio = [
95-
{ index = "pytorch-default", extra= "cpu", marker = "sys_platform == 'darwin'" },
96-
{ index = "pytorch-cpu", extra = "cpu", marker = "sys_platform != 'darwin'"},
88+
{ index = "pytorch-default", extra = "cpu", marker = "sys_platform == 'darwin'" },
89+
{ index = "pytorch-cpu", extra = "cpu", marker = "sys_platform != 'darwin'" },
9790
{ index = "pytorch-cu128", extra = "nvidia" },
9891
]
9992

@@ -133,8 +126,4 @@ include-package-data = true
133126
where = ["./"]
134127

135128
[dependency-groups]
136-
dev = [
137-
"pygments>=2.19.1",
138-
"pyinstaller>=6.13.0",
139-
"langfuse>=3.0.1",
140-
]
129+
dev = ["pygments>=2.19.1", "pyinstaller>=6.13.0", "langfuse>=3.0.1"]

0 commit comments

Comments
 (0)