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.

Files changed (83) hide show
  1. {mcp_use-1.2.11 → mcp_use-1.2.12}/.github/workflows/publish.yml +8 -4
  2. {mcp_use-1.2.11 → mcp_use-1.2.12}/PKG-INFO +1 -1
  3. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/client.py +6 -5
  4. {mcp_use-1.2.11 → mcp_use-1.2.12}/pyproject.toml +1 -1
  5. {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_client.py +3 -3
  6. {mcp_use-1.2.11 → mcp_use-1.2.12}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  7. {mcp_use-1.2.11 → mcp_use-1.2.12}/.github/pull_request_template.md +0 -0
  8. {mcp_use-1.2.11 → mcp_use-1.2.12}/.github/workflows/tests.yml +0 -0
  9. {mcp_use-1.2.11 → mcp_use-1.2.12}/.gitignore +0 -0
  10. {mcp_use-1.2.11 → mcp_use-1.2.12}/.pre-commit-config.yaml +0 -0
  11. {mcp_use-1.2.11 → mcp_use-1.2.12}/CONTRIBUTING.md +0 -0
  12. {mcp_use-1.2.11 → mcp_use-1.2.12}/LICENSE +0 -0
  13. {mcp_use-1.2.11 → mcp_use-1.2.12}/README.md +0 -0
  14. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/README.md +0 -0
  15. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/api-reference/introduction.mdx +0 -0
  16. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/api-reference/mcpagent.mdx +0 -0
  17. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/building-custom-agents.mdx +0 -0
  18. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/development.mdx +0 -0
  19. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/docs.json +0 -0
  20. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/essentials/configuration.mdx +0 -0
  21. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/essentials/connection-types.mdx +0 -0
  22. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/essentials/debugging.mdx +0 -0
  23. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/essentials/llm-integration.mdx +0 -0
  24. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/essentials/server-manager.mdx +0 -0
  25. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/favicon.svg +0 -0
  26. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/images/hero-dark.png +0 -0
  27. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/images/hero-light.png +0 -0
  28. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/introduction.mdx +0 -0
  29. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/logo/dark.svg +0 -0
  30. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/logo/light.svg +0 -0
  31. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/quickstart.mdx +0 -0
  32. {mcp_use-1.2.11 → mcp_use-1.2.12}/docs/snippets/snippet-intro.mdx +0 -0
  33. {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/airbnb_mcp.json +0 -0
  34. {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/airbnb_use.py +0 -0
  35. {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/blender_use.py +0 -0
  36. {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/browser_mcp.json +0 -0
  37. {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/browser_use.py +0 -0
  38. {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/chat_example.py +0 -0
  39. {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/filesystem_use.py +0 -0
  40. {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/http_example.py +0 -0
  41. {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/mcp_everything.py +0 -0
  42. {mcp_use-1.2.11 → mcp_use-1.2.12}/examples/multi_server_example.py +0 -0
  43. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/__init__.py +0 -0
  44. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/adapters/__init__.py +0 -0
  45. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/adapters/base.py +0 -0
  46. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/adapters/langchain_adapter.py +0 -0
  47. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/agents/__init__.py +0 -0
  48. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/agents/base.py +0 -0
  49. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/agents/mcpagent.py +0 -0
  50. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/agents/prompts/system_prompt_builder.py +0 -0
  51. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/agents/prompts/templates.py +0 -0
  52. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/config.py +0 -0
  53. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/connectors/__init__.py +0 -0
  54. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/connectors/base.py +0 -0
  55. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/connectors/http.py +0 -0
  56. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/connectors/stdio.py +0 -0
  57. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/connectors/websocket.py +0 -0
  58. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/logging.py +0 -0
  59. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/__init__.py +0 -0
  60. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/server_manager.py +0 -0
  61. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/__init__.py +0 -0
  62. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/base_tool.py +0 -0
  63. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/connect_server.py +0 -0
  64. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/disconnect_server.py +0 -0
  65. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/get_active_server.py +0 -0
  66. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/list_servers_tool.py +0 -0
  67. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/search_tools.py +0 -0
  68. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/managers/tools/use_tool.py +0 -0
  69. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/session.py +0 -0
  70. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/task_managers/__init__.py +0 -0
  71. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/task_managers/base.py +0 -0
  72. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/task_managers/sse.py +0 -0
  73. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/task_managers/stdio.py +0 -0
  74. {mcp_use-1.2.11 → mcp_use-1.2.12}/mcp_use/task_managers/websocket.py +0 -0
  75. {mcp_use-1.2.11 → mcp_use-1.2.12}/pytest.ini +0 -0
  76. {mcp_use-1.2.11 → mcp_use-1.2.12}/ruff.toml +0 -0
  77. {mcp_use-1.2.11 → mcp_use-1.2.12}/static/image.jpg +0 -0
  78. {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/conftest.py +0 -0
  79. {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_config.py +0 -0
  80. {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_http_connector.py +0 -0
  81. {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_logging.py +0 -0
  82. {mcp_use-1.2.11 → mcp_use-1.2.12}/tests/unit/test_session.py +0 -0
  83. {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
- push:
4
+ workflow_run:
5
+ workflows: ["Python Tests"]
5
6
  branches:
6
7
  - main
7
- paths:
8
- - 'pyproject.toml'
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 # This fetches all history for comparing versions
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-use
3
- Version: 1.2.11
3
+ Version: 1.2.12
4
4
  Summary: MCP Library for LLMs
5
5
  Author-email: Pietro Zullo <pietro.zullo@gmail.com>
6
6
  License: MIT
@@ -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 no servers are configured or the specified server doesn't exist.
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
- logger.warning("No MCP servers defined in config")
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
- Raises:
157
- ValueError: If no servers are configured or the specified server doesn't exist.
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
- logger.warning("No MCP servers defined in config")
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,6 +1,6 @@
1
1
  [project]
2
2
  name = "mcp-use"
3
- version = "1.2.11"
3
+ version = "1.2.12"
4
4
  description = "MCP Library for LLMs"
5
5
  authors = [
6
6
  {name = "Pietro Zullo", email = "pietro.zullo@gmail.com"}
@@ -231,11 +231,11 @@ class TestMCPClientSessionManagement:
231
231
  """Test creating a session when no servers are configured."""
232
232
  client = MCPClient()
233
233
 
234
- # Test create_session raises ValueError
235
- with pytest.raises(ValueError) as exc_info:
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.value)
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