mcp-use 1.2.11__py3-none-any.whl → 1.2.12__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/client.py +6 -5
- {mcp_use-1.2.11.dist-info → mcp_use-1.2.12.dist-info}/METADATA +1 -1
- {mcp_use-1.2.11.dist-info → mcp_use-1.2.12.dist-info}/RECORD +5 -5
- {mcp_use-1.2.11.dist-info → mcp_use-1.2.12.dist-info}/WHEEL +0 -0
- {mcp_use-1.2.11.dist-info → mcp_use-1.2.12.dist-info}/licenses/LICENSE +0 -0
mcp_use/client.py
CHANGED
|
@@ -6,6 +6,7 @@ and sessions from configuration.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
import json
|
|
9
|
+
import warnings
|
|
9
10
|
from typing import Any
|
|
10
11
|
|
|
11
12
|
from .config import create_connector_from_config, load_config_file
|
|
@@ -115,12 +116,12 @@ class MCPClient:
|
|
|
115
116
|
The created MCPSession.
|
|
116
117
|
|
|
117
118
|
Raises:
|
|
118
|
-
ValueError: If
|
|
119
|
+
ValueError: If the specified server doesn't exist.
|
|
119
120
|
"""
|
|
120
121
|
# Get server config
|
|
121
122
|
servers = self.config.get("mcpServers", {})
|
|
122
123
|
if not servers:
|
|
123
|
-
|
|
124
|
+
warnings.warn("No MCP servers defined in config", UserWarning, stacklevel=2)
|
|
124
125
|
return None
|
|
125
126
|
|
|
126
127
|
if server_name not in servers:
|
|
@@ -153,13 +154,13 @@ class MCPClient:
|
|
|
153
154
|
Returns:
|
|
154
155
|
The created MCPSession. If server_name is None, returns the first created session.
|
|
155
156
|
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
Warns:
|
|
158
|
+
Warning: If no servers are configured.
|
|
158
159
|
"""
|
|
159
160
|
# Get server config
|
|
160
161
|
servers = self.config.get("mcpServers", {})
|
|
161
162
|
if not servers:
|
|
162
|
-
|
|
163
|
+
warnings.warn("No MCP servers defined in config", UserWarning, stacklevel=2)
|
|
163
164
|
return {}
|
|
164
165
|
|
|
165
166
|
# Create sessions for all 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=3mEiAtGlC28iv0zeEtQcMI6cfTlllyjSvS0dwuoVBrw,8317
|
|
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
|
|
@@ -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.12.dist-info/METADATA,sha256=DGzKhjEgQ4lG-RIfokVZ_7ofR8Trq94mh-_s29RW4aI,20199
|
|
35
|
+
mcp_use-1.2.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
36
|
+
mcp_use-1.2.12.dist-info/licenses/LICENSE,sha256=7Pw7dbwJSBw8zH-WE03JnR5uXvitRtaGTP9QWPcexcs,1068
|
|
37
|
+
mcp_use-1.2.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|