mcp-use 1.2.10__py3-none-any.whl → 1.2.11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mcp-use might be problematic. Click here for more details.
- mcp_use/agents/mcpagent.py +3 -2
- mcp_use/client.py +4 -2
- {mcp_use-1.2.10.dist-info → mcp_use-1.2.11.dist-info}/METADATA +1 -1
- {mcp_use-1.2.10.dist-info → mcp_use-1.2.11.dist-info}/RECORD +6 -6
- {mcp_use-1.2.10.dist-info → mcp_use-1.2.11.dist-info}/WHEEL +0 -0
- {mcp_use-1.2.10.dist-info → mcp_use-1.2.11.dist-info}/licenses/LICENSE +0 -0
mcp_use/agents/mcpagent.py
CHANGED
|
@@ -15,6 +15,7 @@ from langchain.schema import AIMessage, BaseMessage, HumanMessage, SystemMessage
|
|
|
15
15
|
from langchain.schema.language_model import BaseLanguageModel
|
|
16
16
|
from langchain_core.agents import AgentAction, AgentFinish
|
|
17
17
|
from langchain_core.exceptions import OutputParserException
|
|
18
|
+
from langchain_core.runnables.schema import StreamEvent
|
|
18
19
|
from langchain_core.tools import BaseTool
|
|
19
20
|
from langchain_core.utils.input import get_color_mapping
|
|
20
21
|
|
|
@@ -311,7 +312,7 @@ class MCPAgent:
|
|
|
311
312
|
max_steps: int | None = None,
|
|
312
313
|
manage_connector: bool = True,
|
|
313
314
|
external_history: list[BaseMessage] | None = None,
|
|
314
|
-
) -> AsyncIterator[
|
|
315
|
+
) -> AsyncIterator[StreamEvent]:
|
|
315
316
|
"""Internal async generator yielding response chunks.
|
|
316
317
|
|
|
317
318
|
The implementation purposefully keeps the logic compact:
|
|
@@ -352,7 +353,7 @@ class MCPAgent:
|
|
|
352
353
|
|
|
353
354
|
# 3. Stream & diff -------------------------------------------------------
|
|
354
355
|
accumulated = ""
|
|
355
|
-
async for event in self._agent_executor.
|
|
356
|
+
async for event in self._agent_executor.astream_events(inputs):
|
|
356
357
|
yield event
|
|
357
358
|
|
|
358
359
|
# 4. Persist assistant message ------------------------------------------
|
mcp_use/client.py
CHANGED
|
@@ -120,7 +120,8 @@ class MCPClient:
|
|
|
120
120
|
# Get server config
|
|
121
121
|
servers = self.config.get("mcpServers", {})
|
|
122
122
|
if not servers:
|
|
123
|
-
|
|
123
|
+
logger.warning("No MCP servers defined in config")
|
|
124
|
+
return None
|
|
124
125
|
|
|
125
126
|
if server_name not in servers:
|
|
126
127
|
raise ValueError(f"Server '{server_name}' not found in config")
|
|
@@ -158,7 +159,8 @@ class MCPClient:
|
|
|
158
159
|
# Get server config
|
|
159
160
|
servers = self.config.get("mcpServers", {})
|
|
160
161
|
if not servers:
|
|
161
|
-
|
|
162
|
+
logger.warning("No MCP servers defined in config")
|
|
163
|
+
return {}
|
|
162
164
|
|
|
163
165
|
# Create sessions for all servers
|
|
164
166
|
for name in servers:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
mcp_use/__init__.py,sha256=FikKagS6u8mugJOeslN3xfSA-tBLhjOywZSEcQ-y23g,1006
|
|
2
|
-
mcp_use/client.py,sha256=
|
|
2
|
+
mcp_use/client.py,sha256=hLaebFjVPiTDQbFnj6TN7hKctMXDFm-jqsQcQ5GaY0c,8320
|
|
3
3
|
mcp_use/config.py,sha256=O9V4pa-shZ2mPokRTrd7KZQ2GpuTcYBGUslefl1fosw,1653
|
|
4
4
|
mcp_use/logging.py,sha256=UhQdMx0H0q08-ZPjY_hAJVErkEUAkU1oahHqwdfdK_U,4274
|
|
5
5
|
mcp_use/session.py,sha256=Z4EZTUnQUX0QyGMzkJIrMRTX4SDk6qQUoBld408LIJE,3449
|
|
@@ -8,7 +8,7 @@ mcp_use/adapters/base.py,sha256=ixLHXp8FWdyZPx7Kh6s-4jEVs3qT4DWrApSLXfqzNws,6141
|
|
|
8
8
|
mcp_use/adapters/langchain_adapter.py,sha256=s8IHPPtqqXMmWQfeBqwESs3SZA6_ECSiGRwdTOIWki0,6417
|
|
9
9
|
mcp_use/agents/__init__.py,sha256=N3eVYP2PxqNO2KcQv5fY8UMUX2W3eLTNkkzuFIJ1DUA,261
|
|
10
10
|
mcp_use/agents/base.py,sha256=bfuldi_89AbSbNc8KeTiCArRT9V62CNxHOWYkLHWjyA,1605
|
|
11
|
-
mcp_use/agents/mcpagent.py,sha256=
|
|
11
|
+
mcp_use/agents/mcpagent.py,sha256=xZr-ihW5CW2wKAi0Gi-9GIXlJE0MGu-18xR8vi-Fu6Q,27025
|
|
12
12
|
mcp_use/agents/prompts/system_prompt_builder.py,sha256=GH5Pvl49IBpKpZA9YTI83xMsdYSkRN_hw4LFHkKtxbg,4122
|
|
13
13
|
mcp_use/agents/prompts/templates.py,sha256=AZKrGWuI516C-PmyOPvxDBibNdqJtN24sOHTGR06bi4,1933
|
|
14
14
|
mcp_use/connectors/__init__.py,sha256=jnd-7pPPJMb0UNJ6aD9lInj5Tlamc8lA_mFyG8RWJpo,385
|
|
@@ -31,7 +31,7 @@ mcp_use/task_managers/base.py,sha256=ksNdxTwq8N-zqymxVoKGnWXq9iqkLYC61uB91o6Mh-4
|
|
|
31
31
|
mcp_use/task_managers/sse.py,sha256=WysmjwqRI3meXMZY_F4y9tSBMvSiUZfTJQfitM5l6jQ,2529
|
|
32
32
|
mcp_use/task_managers/stdio.py,sha256=DEISpXv4mo3d5a-WT8lkWbrXJwUh7QW0nMT_IM3fHGg,2269
|
|
33
33
|
mcp_use/task_managers/websocket.py,sha256=ZbCqdGgzCRtsXzRGFws-f2OzH8cPAkN4sJNDwEpRmCc,1915
|
|
34
|
-
mcp_use-1.2.
|
|
35
|
-
mcp_use-1.2.
|
|
36
|
-
mcp_use-1.2.
|
|
37
|
-
mcp_use-1.2.
|
|
34
|
+
mcp_use-1.2.11.dist-info/METADATA,sha256=HudT6j4l5spNbzm-JTfi-Eo3yfwf6fFeG4T1-lV-ZaE,20199
|
|
35
|
+
mcp_use-1.2.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
36
|
+
mcp_use-1.2.11.dist-info/licenses/LICENSE,sha256=7Pw7dbwJSBw8zH-WE03JnR5uXvitRtaGTP9QWPcexcs,1068
|
|
37
|
+
mcp_use-1.2.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|