mcp-use 1.2.11__tar.gz → 1.2.12__tar.gz
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-1.2.11 → mcp_use-1.2.12}/.github/workflows/publish.yml +8 -4
- {mcp_use-1.2.11 → mcp_use-1.2.12}/PKG-INFO +1 -1
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/client.py +6 -5
- {mcp_use-1.2.11 → mcp_use-1.2.12}/pyproject.toml +1 -1
- {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_client.py +3 -3
- {mcp_use-1.2.11 → mcp_use-1.2.12}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/.github/pull_request_template.md +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/.github/workflows/tests.yml +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/.gitignore +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/.pre-commit-config.yaml +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/CONTRIBUTING.md +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/LICENSE +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/README.md +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/README.md +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/api-reference/introduction.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/api-reference/mcpagent.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/building-custom-agents.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/development.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/docs.json +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/essentials/configuration.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/essentials/connection-types.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/essentials/debugging.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/essentials/llm-integration.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/essentials/server-manager.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/favicon.svg +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/images/hero-dark.png +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/images/hero-light.png +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/introduction.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/logo/dark.svg +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/logo/light.svg +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/quickstart.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/snippets/snippet-intro.mdx +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/airbnb_mcp.json +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/airbnb_use.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/blender_use.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/browser_mcp.json +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/browser_use.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/chat_example.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/filesystem_use.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/http_example.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/mcp_everything.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/multi_server_example.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/__init__.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/adapters/__init__.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/adapters/base.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/adapters/langchain_adapter.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/agents/__init__.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/agents/base.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/agents/mcpagent.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/agents/prompts/system_prompt_builder.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/agents/prompts/templates.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/config.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/connectors/__init__.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/connectors/base.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/connectors/http.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/connectors/stdio.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/connectors/websocket.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/logging.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/__init__.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/server_manager.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/__init__.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/base_tool.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/connect_server.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/disconnect_server.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/get_active_server.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/list_servers_tool.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/search_tools.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/use_tool.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/session.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/task_managers/__init__.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/task_managers/base.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/task_managers/sse.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/task_managers/stdio.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/task_managers/websocket.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/pytest.ini +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/ruff.toml +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/static/image.jpg +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/conftest.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_config.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_http_connector.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_logging.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_session.py +0 -0
- {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_stdio_connector.py +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
name: Check Version Bump and Publish to PyPI
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: ["Python Tests"]
|
|
5
6
|
branches:
|
|
6
7
|
- main
|
|
7
|
-
|
|
8
|
-
-
|
|
8
|
+
types:
|
|
9
|
+
- completed
|
|
9
10
|
|
|
10
11
|
# Required for PyPI trusted publishing
|
|
11
12
|
permissions:
|
|
@@ -14,11 +15,14 @@ permissions:
|
|
|
14
15
|
|
|
15
16
|
jobs:
|
|
16
17
|
check-version-and-publish:
|
|
18
|
+
# Only proceed if the referenced workflow completed successfully
|
|
19
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
17
20
|
runs-on: ubuntu-latest
|
|
18
21
|
steps:
|
|
19
22
|
- uses: actions/checkout@v3
|
|
20
23
|
with:
|
|
21
|
-
fetch-depth: 0
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
ref: ${{ github.event.workflow_run.head_sha }}
|
|
22
26
|
|
|
23
27
|
- name: Set up Python
|
|
24
28
|
uses: actions/setup-python@v4
|
|
@@ -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
|
|
@@ -231,11 +231,11 @@ class TestMCPClientSessionManagement:
|
|
|
231
231
|
"""Test creating a session when no servers are configured."""
|
|
232
232
|
client = MCPClient()
|
|
233
233
|
|
|
234
|
-
#
|
|
235
|
-
with pytest.
|
|
234
|
+
# Expect a UserWarning when no servers are configured
|
|
235
|
+
with pytest.warns(UserWarning) as exc_info:
|
|
236
236
|
await client.create_session("server1")
|
|
237
237
|
|
|
238
|
-
assert "No MCP servers defined in config" in str(exc_info.
|
|
238
|
+
assert "No MCP servers defined in config" in str(exc_info[0].message)
|
|
239
239
|
|
|
240
240
|
@pytest.mark.asyncio
|
|
241
241
|
async def test_create_session_nonexistent_server(self):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|