mcp-use 1.3.12__tar.gz → 1.3.13__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.3.12 → mcp_use-1.3.13}/.pre-commit-config.yaml +1 -2
- {mcp_use-1.3.12 → mcp_use-1.3.13}/PKG-INFO +59 -34
- {mcp_use-1.3.12 → mcp_use-1.3.13}/README.md +55 -30
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/__init__.py +1 -1
- mcp_use-1.3.13/mcp_use/adapters/__init__.py +21 -0
- mcp_use-1.3.13/mcp_use/adapters/base.py +17 -0
- mcp_use-1.3.13/mcp_use/adapters/langchain_adapter.py +18 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/adapters/base.py +6 -3
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/adapters/langchain_adapter.py +7 -4
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/agents/base.py +1 -1
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/server_manager.py +11 -4
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/tools/connect_server.py +1 -2
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/tools/disconnect_server.py +1 -2
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/tools/get_active_server.py +1 -1
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/tools/list_servers_tool.py +1 -2
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/tools/search_tools.py +2 -2
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/agents/mcpagent.py +16 -14
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/agents/remote.py +14 -1
- mcp_use-1.3.13/mcp_use/auth/__init__.py +21 -0
- mcp_use-1.3.13/mcp_use/auth/bearer.py +16 -0
- mcp_use-1.3.13/mcp_use/auth/oauth.py +16 -0
- mcp_use-1.3.13/mcp_use/auth/oauth_callback.py +23 -0
- mcp_use-1.3.13/mcp_use/client/__init__.py +1 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/auth/bearer.py +6 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/auth/oauth.py +8 -4
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/auth/oauth_callback.py +1 -1
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/client.py +12 -6
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/config.py +7 -5
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/connectors/base.py +13 -4
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/connectors/http.py +5 -6
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/connectors/sandbox.py +25 -4
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/connectors/stdio.py +4 -4
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/connectors/websocket.py +3 -3
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/middleware/logging.py +2 -2
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/middleware/metrics.py +1 -1
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/middleware/middleware.py +4 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/session.py +9 -1
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/task_managers/base.py +1 -1
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/task_managers/sse.py +2 -2
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/task_managers/stdio.py +2 -2
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/task_managers/streamable_http.py +2 -2
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/task_managers/websocket.py +2 -2
- mcp_use-1.3.13/mcp_use/client.py +18 -0
- mcp_use-1.3.13/mcp_use/config.py +27 -0
- mcp_use-1.3.13/mcp_use/connectors/.deprecated +0 -0
- mcp_use-1.3.13/mcp_use/connectors/__init__.py +46 -0
- mcp_use-1.3.13/mcp_use/connectors/base.py +18 -0
- mcp_use-1.3.13/mcp_use/connectors/http.py +18 -0
- mcp_use-1.3.13/mcp_use/connectors/sandbox.py +18 -0
- mcp_use-1.3.13/mcp_use/connectors/stdio.py +18 -0
- mcp_use-1.3.13/mcp_use/connectors/utils.py +20 -0
- mcp_use-1.3.13/mcp_use/connectors/websocket.py +18 -0
- mcp_use-1.3.13/mcp_use/exceptions.py +46 -0
- mcp_use-1.3.13/mcp_use/managers/.deprecated +0 -0
- mcp_use-1.3.13/mcp_use/managers/__init__.py +58 -0
- mcp_use-1.3.13/mcp_use/managers/base.py +18 -0
- mcp_use-1.3.13/mcp_use/managers/server_manager.py +18 -0
- mcp_use-1.3.13/mcp_use/managers/tools/__init__.py +45 -0
- mcp_use-1.3.13/mcp_use/managers/tools/base_tool.py +8 -0
- mcp_use-1.3.13/mcp_use/managers/tools/connect_server.py +8 -0
- mcp_use-1.3.13/mcp_use/managers/tools/disconnect_server.py +8 -0
- mcp_use-1.3.13/mcp_use/managers/tools/get_active_server.py +8 -0
- mcp_use-1.3.13/mcp_use/managers/tools/list_servers_tool.py +8 -0
- mcp_use-1.3.13/mcp_use/managers/tools/search_tools.py +24 -0
- mcp_use-1.3.13/mcp_use/middleware/.deprecated +0 -0
- mcp_use-1.3.13/mcp_use/middleware/__init__.py +89 -0
- mcp_use-1.3.13/mcp_use/middleware/logging.py +19 -0
- mcp_use-1.3.13/mcp_use/middleware/metrics.py +41 -0
- mcp_use-1.3.13/mcp_use/middleware/middleware.py +55 -0
- mcp_use-1.3.13/mcp_use/session.py +18 -0
- mcp_use-1.3.13/mcp_use/task_managers/.deprecated +0 -0
- mcp_use-1.3.13/mcp_use/task_managers/__init__.py +48 -0
- mcp_use-1.3.13/mcp_use/task_managers/base.py +18 -0
- mcp_use-1.3.13/mcp_use/task_managers/sse.py +18 -0
- mcp_use-1.3.13/mcp_use/task_managers/stdio.py +18 -0
- mcp_use-1.3.13/mcp_use/task_managers/streamable_http.py +20 -0
- mcp_use-1.3.13/mcp_use/task_managers/websocket.py +18 -0
- mcp_use-1.3.13/mcp_use/telemetry/__init__.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/telemetry/events.py +58 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/telemetry/telemetry.py +71 -1
- mcp_use-1.3.13/mcp_use/types/.deprecated +0 -0
- mcp_use-1.3.13/mcp_use/types/sandbox.py +18 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/pyproject.toml +4 -2
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/primitives/test_auth.py +7 -7
- mcp_use-1.3.13/tests/unit/backward_compatibility.py +104 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/unit/test_client.py +15 -10
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/unit/test_config.py +4 -4
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/unit/test_http_connector.py +15 -15
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/unit/test_sandbox_connector.py +14 -15
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/unit/test_search_tools_issue_138.py +4 -4
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/unit/test_stdio_connector.py +12 -12
- mcp_use-1.3.12/.github/ISSUE_TEMPLATE/bug_report.md +0 -38
- mcp_use-1.3.12/.github/pull_request_template.md +0 -43
- mcp_use-1.3.12/.github/release-drafter.yml +0 -32
- mcp_use-1.3.12/.github/workflows/docs.yml +0 -108
- mcp_use-1.3.12/.github/workflows/publish.yml +0 -81
- mcp_use-1.3.12/.github/workflows/release-drafter.yml +0 -41
- mcp_use-1.3.12/.github/workflows/stale.yml +0 -18
- mcp_use-1.3.12/.github/workflows/tests.yml +0 -115
- mcp_use-1.3.12/.github/workflows/update-readme.yml +0 -112
- mcp_use-1.3.12/CODE_OF_CONDUCT.md +0 -128
- mcp_use-1.3.12/CONTRIBUTING.md +0 -146
- mcp_use-1.3.12/LICENSE +0 -21
- mcp_use-1.3.12/docs/README.md +0 -32
- mcp_use-1.3.12/docs/advanced/building-custom-agents.mdx +0 -309
- mcp_use-1.3.12/docs/advanced/logging.mdx +0 -186
- mcp_use-1.3.12/docs/advanced/multi-server-setup.mdx +0 -695
- mcp_use-1.3.12/docs/advanced/security.mdx +0 -667
- mcp_use-1.3.12/docs/agent/agent-configuration.mdx +0 -651
- mcp_use-1.3.12/docs/agent/interactive-chat-patterns.mdx +0 -569
- mcp_use-1.3.12/docs/agent/llm-integration.mdx +0 -317
- mcp_use-1.3.12/docs/agent/memory-management.mdx +0 -137
- mcp_use-1.3.12/docs/agent/server-manager.mdx +0 -385
- mcp_use-1.3.12/docs/agent/streaming.mdx +0 -376
- mcp_use-1.3.12/docs/agent/structured-output.mdx +0 -104
- mcp_use-1.3.12/docs/api-reference/mcp_use_adapters_base.mdx +0 -102
- mcp_use-1.3.12/docs/api-reference/mcp_use_adapters_langchain_adapter.mdx +0 -68
- mcp_use-1.3.12/docs/api-reference/mcp_use_agents_base.mdx +0 -109
- mcp_use-1.3.12/docs/api-reference/mcp_use_agents_mcpagent.mdx +0 -333
- mcp_use-1.3.12/docs/api-reference/mcp_use_agents_prompts_system_prompt_builder.mdx +0 -115
- mcp_use-1.3.12/docs/api-reference/mcp_use_agents_prompts_templates.mdx +0 -12
- mcp_use-1.3.12/docs/api-reference/mcp_use_agents_remote.mdx +0 -118
- mcp_use-1.3.12/docs/api-reference/mcp_use_auth_bearer.mdx +0 -57
- mcp_use-1.3.12/docs/api-reference/mcp_use_auth_oauth.mdx +0 -432
- mcp_use-1.3.12/docs/api-reference/mcp_use_auth_oauth_callback.mdx +0 -138
- mcp_use-1.3.12/docs/api-reference/mcp_use_cli.mdx +0 -322
- mcp_use-1.3.12/docs/api-reference/mcp_use_client.mdx +0 -256
- mcp_use-1.3.12/docs/api-reference/mcp_use_config.mdx +0 -84
- mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_base.mdx +0 -345
- mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_http.mdx +0 -61
- mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_sandbox.mdx +0 -83
- mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_stdio.mdx +0 -61
- mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_utils.mdx +0 -37
- mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_websocket.mdx +0 -54
- mcp_use-1.3.12/docs/api-reference/mcp_use_errors_error_formatting.mdx +0 -38
- mcp_use-1.3.12/docs/api-reference/mcp_use_exceptions.mdx +0 -174
- mcp_use-1.3.12/docs/api-reference/mcp_use_logging.mdx +0 -37
- mcp_use-1.3.12/docs/api-reference/mcp_use_managers_base.mdx +0 -81
- mcp_use-1.3.12/docs/api-reference/mcp_use_managers_server_manager.mdx +0 -82
- mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_base_tool.mdx +0 -62
- mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_connect_server.mdx +0 -95
- mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_disconnect_server.mdx +0 -88
- mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_get_active_server.mdx +0 -88
- mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_list_servers_tool.mdx +0 -88
- mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_search_tools.mdx +0 -203
- mcp_use-1.3.12/docs/api-reference/mcp_use_middleware_logging.mdx +0 -33
- mcp_use-1.3.12/docs/api-reference/mcp_use_middleware_metrics.mdx +0 -185
- mcp_use-1.3.12/docs/api-reference/mcp_use_middleware_middleware.mdx +0 -595
- mcp_use-1.3.12/docs/api-reference/mcp_use_observability_callbacks_manager.mdx +0 -180
- mcp_use-1.3.12/docs/api-reference/mcp_use_observability_laminar.mdx +0 -16
- mcp_use-1.3.12/docs/api-reference/mcp_use_observability_langfuse.mdx +0 -12
- mcp_use-1.3.12/docs/api-reference/mcp_use_session.mdx +0 -232
- mcp_use-1.3.12/docs/api-reference/mcp_use_task_managers_base.mdx +0 -95
- mcp_use-1.3.12/docs/api-reference/mcp_use_task_managers_sse.mdx +0 -57
- mcp_use-1.3.12/docs/api-reference/mcp_use_task_managers_stdio.mdx +0 -54
- mcp_use-1.3.12/docs/api-reference/mcp_use_task_managers_streamable_http.mdx +0 -57
- mcp_use-1.3.12/docs/api-reference/mcp_use_task_managers_websocket.mdx +0 -52
- mcp_use-1.3.12/docs/api-reference/mcp_use_types_sandbox.mdx +0 -58
- mcp_use-1.3.12/docs/api-reference/mcp_use_utils.mdx +0 -44
- mcp_use-1.3.12/docs/blog/middleware.mdx +0 -136
- mcp_use-1.3.12/docs/changelog/1_3_11.mdx +0 -73
- mcp_use-1.3.12/docs/changelog/1_3_12.mdx +0 -85
- mcp_use-1.3.12/docs/changelog/changelog.mdx +0 -82
- mcp_use-1.3.12/docs/client/authentication.mdx +0 -487
- mcp_use-1.3.12/docs/client/client-configuration.mdx +0 -211
- mcp_use-1.3.12/docs/client/connection-types.mdx +0 -141
- mcp_use-1.3.12/docs/client/direct-tool-calls.mdx +0 -420
- mcp_use-1.3.12/docs/client/elicitation.mdx +0 -401
- mcp_use-1.3.12/docs/client/logging.mdx +0 -96
- mcp_use-1.3.12/docs/client/middleware.mdx +0 -294
- mcp_use-1.3.12/docs/client/notifications.mdx +0 -138
- mcp_use-1.3.12/docs/client/prompts.mdx +0 -485
- mcp_use-1.3.12/docs/client/resources.mdx +0 -411
- mcp_use-1.3.12/docs/client/sampling.mdx +0 -122
- mcp_use-1.3.12/docs/client/sandbox.mdx +0 -122
- mcp_use-1.3.12/docs/client/tools.mdx +0 -276
- mcp_use-1.3.12/docs/community/showcase.mdx +0 -196
- mcp_use-1.3.12/docs/development/observability.mdx +0 -275
- mcp_use-1.3.12/docs/development/telemetry.mdx +0 -173
- mcp_use-1.3.12/docs/development.mdx +0 -115
- mcp_use-1.3.12/docs/docs.json +0 -461
- mcp_use-1.3.12/docs/favicon.svg +0 -8
- mcp_use-1.3.12/docs/fonts.css +0 -24
- mcp_use-1.3.12/docs/generate_docs.py +0 -1371
- mcp_use-1.3.12/docs/getting-started/configuration.mdx +0 -254
- mcp_use-1.3.12/docs/getting-started/index.mdx +0 -187
- mcp_use-1.3.12/docs/getting-started/installation.mdx +0 -409
- mcp_use-1.3.12/docs/getting-started/quickstart.mdx +0 -287
- mcp_use-1.3.12/docs/images/01.png +0 -0
- mcp_use-1.3.12/docs/images/02.png +0 -0
- mcp_use-1.3.12/docs/images/Middleware.jpg +0 -0
- mcp_use-1.3.12/docs/images/Release1.3.11.png +0 -0
- mcp_use-1.3.12/docs/images/Release1.3.12.png +0 -0
- mcp_use-1.3.12/docs/images/configuration-dark.png +0 -0
- mcp_use-1.3.12/docs/images/configuration-light.png +0 -0
- mcp_use-1.3.12/docs/images/examples-dark.png +0 -0
- mcp_use-1.3.12/docs/images/examples-light.png +0 -0
- mcp_use-1.3.12/docs/images/hero-dark.png +0 -0
- mcp_use-1.3.12/docs/images/hero-light.png +0 -0
- mcp_use-1.3.12/docs/images/installation-dark.png +0 -0
- mcp_use-1.3.12/docs/images/installation-light.png +0 -0
- mcp_use-1.3.12/docs/images/quickstart-dark.png +0 -0
- mcp_use-1.3.12/docs/images/quickstart-light.png +0 -0
- mcp_use-1.3.12/docs/logo/dark.svg +0 -8
- mcp_use-1.3.12/docs/logo/light.svg +0 -8
- mcp_use-1.3.12/docs/logo/react.svg +0 -1
- mcp_use-1.3.12/docs/snippets/gradient.jsx +0 -75
- mcp_use-1.3.12/docs/snippets/snippet-intro.mdx +0 -10
- mcp_use-1.3.12/docs/snippets/youtube-embed.mdx +0 -14
- mcp_use-1.3.12/docs/troubleshooting/common-issues.mdx +0 -388
- mcp_use-1.3.12/docs/troubleshooting/connection-errors.mdx +0 -674
- mcp_use-1.3.12/docs/troubleshooting/performance.mdx +0 -553
- mcp_use-1.3.12/mcp_use/types/sandbox.py +0 -23
- {mcp_use-1.3.12 → mcp_use-1.3.13}/.env.example +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/.gitignore +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/CLAUDE.md +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/airbnb_mcp.json +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/airbnb_use.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/blender_use.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/browser_use.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/chat_example.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/direct_tool_call.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/example_middleware.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/filesystem_use.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/http_example.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/limited_memory_chat.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/mcp_everything.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/multi_server_example.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/sandbox_everything.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/simple_oauth_example.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/simple_server_manager_use.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/stream_example.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/examples/structured_output.py +0 -0
- /mcp_use-1.3.12/CHANGELOG.md → /mcp_use-1.3.13/mcp_use/adapters/.deprecated +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/agents/__init__.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/adapters/__init__.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/__init__.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/base.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/tools/__init__.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/tools/base_tool.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/observability/__init__.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/observability/callbacks_manager.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/observability/laminar.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/observability/langfuse.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/agents/prompts/system_prompt_builder.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/agents/prompts/templates.py +0 -0
- /mcp_use-1.3.12/mcp_use/telemetry/__init__.py → /mcp_use-1.3.13/mcp_use/auth/.deprecated +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/cli.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/auth/__init__.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/connectors/__init__.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/connectors/utils.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/exceptions.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/middleware/__init__.py +0 -0
- {mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/client}/task_managers/__init__.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/errors/__init__.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/errors/error_formatting.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/logging.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/telemetry/utils.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/mcp_use/utils.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/pytest.ini +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/ruff.toml +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/static/logo-gh.jpg +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/static/logo_black.svg +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/static/logo_white.svg +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/conftest.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/__init__.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/conftest.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/others/test_custom_streaming_integration.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/primitives/test_discovery.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/primitives/test_elicitation.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/primitives/test_logging.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/primitives/test_notifications.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/primitives/test_prompts.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/primitives/test_resources.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/primitives/test_sampling.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/primitives/test_tools.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/servers_for_testing/__init__.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/servers_for_testing/auth_server.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/servers_for_testing/custom_streaming_server.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/servers_for_testing/primitive_server.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/servers_for_testing/simple_server.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/servers_for_testing/timeout_test_server.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/transports/test_sse.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/transports/test_stdio.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/integration/transports/test_streamable_http.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/unit/test_agent.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/unit/test_enum_handling.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/unit/test_session.py +0 -0
- {mcp_use-1.3.12 → mcp_use-1.3.13}/tests/unit/test_websocket_connection_manager.py +0 -0
|
@@ -4,10 +4,9 @@ repos:
|
|
|
4
4
|
rev: v0.3.2
|
|
5
5
|
hooks:
|
|
6
6
|
- id: ruff
|
|
7
|
-
args: [--fix, --exit-non-zero-on-fix
|
|
7
|
+
args: [--fix, --exit-non-zero-on-fix]
|
|
8
8
|
types: [python]
|
|
9
9
|
- id: ruff-format
|
|
10
|
-
args: [--config=ruff.toml]
|
|
11
10
|
types: [python]
|
|
12
11
|
|
|
13
12
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcp-use
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.13
|
|
4
4
|
Summary: MCP Library for LLMs
|
|
5
|
-
Author-email: Pietro Zullo <pietro.zullo@gmail.com>
|
|
5
|
+
Author-email: "mcp-use, Inc." <dev@mcp-use.io>, Pietro Zullo <pietro.zullo@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
|
-
License-File: LICENSE
|
|
8
7
|
Classifier: Development Status :: 3 - Alpha
|
|
9
8
|
Classifier: Intended Audience :: Developers
|
|
10
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -17,7 +16,8 @@ Requires-Python: >=3.11
|
|
|
17
16
|
Requires-Dist: aiohttp>=3.9.0
|
|
18
17
|
Requires-Dist: authlib>=1.6.3
|
|
19
18
|
Requires-Dist: jsonschema-pydantic>=0.1.0
|
|
20
|
-
Requires-Dist: langchain
|
|
19
|
+
Requires-Dist: langchain-core==0.3.79
|
|
20
|
+
Requires-Dist: langchain==0.3.27
|
|
21
21
|
Requires-Dist: mcp>=1.10.0
|
|
22
22
|
Requires-Dist: posthog>=4.8.0
|
|
23
23
|
Requires-Dist: pydantic-core==2.33.2
|
|
@@ -54,8 +54,7 @@ Description-Content-Type: text/markdown
|
|
|
54
54
|
</picture>
|
|
55
55
|
</div>
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
<h1 align="center">🚀 Create MCP Clients and Agents</h1>
|
|
57
|
+
<h1 align="center">🚀 MCP-Use for Python</h1>
|
|
59
58
|
<p align="center">
|
|
60
59
|
<a href="https://github.com/pietrozullo/mcp-use/stargazers" alt="GitHub stars">
|
|
61
60
|
<img src="https://img.shields.io/github/stars/pietrozullo/mcp-use?style=social" /></a>
|
|
@@ -63,37 +62,42 @@ Description-Content-Type: text/markdown
|
|
|
63
62
|
<img src="https://static.pepy.tech/badge/mcp-use" /></a>
|
|
64
63
|
<a href="https://pypi.org/project/mcp_use/" alt="PyPI Version">
|
|
65
64
|
<img src="https://img.shields.io/pypi/v/mcp_use.svg"/></a>
|
|
66
|
-
<a href="https://github.com/mcp-use/mcp-use-ts" alt="TypeScript">
|
|
67
|
-
<img src="https://img.shields.io/badge/TypeScript-mcp--use-3178C6?logo=typescript&logoColor=white" /></a>
|
|
68
65
|
<a href="https://github.com/pietrozullo/mcp-use/blob/main/LICENSE" alt="License">
|
|
69
66
|
<img src="https://img.shields.io/github/license/pietrozullo/mcp-use" /></a>
|
|
70
67
|
<a href="https://docs.mcp-use.com" alt="Documentation">
|
|
71
68
|
<img src="https://img.shields.io/badge/docs-mcp--use.com-blue" /></a>
|
|
72
|
-
<a href="https://mcp-use.com" alt="Website">
|
|
73
|
-
<img src="https://img.shields.io/badge/website-mcp--use.com-blue" /></a>
|
|
74
|
-
</p>
|
|
75
|
-
<p align="center">
|
|
76
|
-
<a href="https://x.com/pietrozullo" alt="Twitter Follow - Pietro">
|
|
77
|
-
<img src="https://img.shields.io/twitter/follow/Pietro?style=social" /></a>
|
|
78
|
-
<a href="https://x.com/pederzh" alt="Twitter Follow - Luigi">
|
|
79
|
-
<img src="https://img.shields.io/twitter/follow/Luigi?style=social" /></a>
|
|
80
69
|
<a href="https://discord.gg/XkNkSkMz3V" alt="Discord">
|
|
81
70
|
<img src="https://dcbadge.limes.pink/api/server/XkNkSkMz3V?style=flat" /></a>
|
|
82
71
|
</p>
|
|
83
72
|
</div>
|
|
84
73
|
|
|
85
|
-
|
|
74
|
+
> **📦 Part of the [MCP-Use Monorepo](../../README.md)** - This is the Python implementation. Also available in [TypeScript](../typescript/README.md).
|
|
75
|
+
|
|
76
|
+
🌐 **MCP-Use for Python** is the complete way to connect **any LLM to any MCP server** and build custom MCP agents with tool access.
|
|
77
|
+
|
|
78
|
+
💡 Let your Python applications leverage the power of the Model Context Protocol with support for agents, clients, and advanced features.
|
|
79
|
+
|
|
80
|
+
## 🏗️ What's Included
|
|
81
|
+
|
|
82
|
+
MCP-Use for Python provides three main capabilities:
|
|
83
|
+
|
|
84
|
+
- **🤖 MCP Agent** - Build AI agents that can use tools and reason across multiple steps
|
|
85
|
+
- **🔌 MCP Client** - Connect directly to MCP servers for programmatic tool access
|
|
86
|
+
- **🛠️ MCP Server** - _Coming soon!_ For now, use the [TypeScript version](../typescript/README.md#%EF%B8%8F-mcp-server-framework)
|
|
86
87
|
|
|
87
|
-
|
|
88
|
+
---
|
|
88
89
|
|
|
89
|
-
|
|
90
|
-
- Visit the [mcp-use docs](https://docs.mcp-use.com/) to get started with mcp-use library
|
|
91
|
-
- For the TypeScript version, visit [mcp-use-ts](https://github.com/mcp-use/mcp-use-ts)
|
|
90
|
+
## 📖 Quick Links
|
|
92
91
|
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
- **[Main Repository](../../README.md)** - Overview of the entire MCP-Use ecosystem
|
|
93
|
+
- **[TypeScript Version](../typescript/README.md)** - TypeScript implementation with server framework
|
|
94
|
+
- **[Documentation](https://docs.mcp-use.com)** - Complete online documentation
|
|
95
|
+
- **[Examples](./examples/)** - Python code examples
|
|
96
|
+
|
|
97
|
+
| Supports | |
|
|
98
|
+
| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
95
99
|
| **Primitives** | [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) |
|
|
96
|
-
| **Transports** | [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml)
|
|
100
|
+
| **Transports** | [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) |
|
|
97
101
|
|
|
98
102
|
## Features
|
|
99
103
|
|
|
@@ -140,7 +144,13 @@ Description-Content-Type: text/markdown
|
|
|
140
144
|
</tr>
|
|
141
145
|
</table>
|
|
142
146
|
|
|
143
|
-
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
# 🤖 MCP Agent
|
|
150
|
+
|
|
151
|
+
The **MCP Agent** is an AI-powered agent that can use tools from MCP servers to accomplish complex tasks. It reasons across multiple steps, selecting and executing tools as needed.
|
|
152
|
+
|
|
153
|
+
## Quick Start
|
|
144
154
|
|
|
145
155
|
With pip:
|
|
146
156
|
|
|
@@ -675,7 +685,13 @@ The `SandboxOptions` type provides configuration for the sandbox environment:
|
|
|
675
685
|
- **Consistent environment**: Ensure consistent behavior across different systems
|
|
676
686
|
- **Resource efficiency**: Offload resource-intensive tasks to cloud infrastructure
|
|
677
687
|
|
|
678
|
-
|
|
688
|
+
---
|
|
689
|
+
|
|
690
|
+
# 🔌 MCP Client
|
|
691
|
+
|
|
692
|
+
The **MCP Client** allows you to connect directly to MCP servers and call tools programmatically without an AI agent. This is useful when you know exactly which tools to call and don't need AI reasoning.
|
|
693
|
+
|
|
694
|
+
## Direct Tool Calls (Without LLM)
|
|
679
695
|
|
|
680
696
|
You can call MCP server tools directly without an LLM when you need programmatic control:
|
|
681
697
|
|
|
@@ -752,6 +768,23 @@ if __name__ == "__main__":
|
|
|
752
768
|
|
|
753
769
|
```
|
|
754
770
|
|
|
771
|
+
---
|
|
772
|
+
|
|
773
|
+
# 🛠️ MCP Server
|
|
774
|
+
|
|
775
|
+
**Coming Soon!** Python support for creating MCP servers is under development.
|
|
776
|
+
|
|
777
|
+
In the meantime, you can create MCP servers using our [TypeScript implementation](../typescript/README.md#%EF%B8%8F-mcp-server-framework), which offers:
|
|
778
|
+
|
|
779
|
+
- Complete server framework with tools, resources, and prompts
|
|
780
|
+
- Built-in inspector for debugging
|
|
781
|
+
- React-based UI widgets for interactive experiences
|
|
782
|
+
- Hot reload development workflow
|
|
783
|
+
|
|
784
|
+
Python agents and clients can connect to TypeScript servers seamlessly - the MCP protocol is language-agnostic.
|
|
785
|
+
|
|
786
|
+
---
|
|
787
|
+
|
|
755
788
|
# Debugging
|
|
756
789
|
|
|
757
790
|
MCP-Use provides a built-in debug mode that increases log verbosity and helps diagnose issues in your agent implementation.
|
|
@@ -815,14 +848,6 @@ This is useful when you only need to see the agent's steps and decision-making p
|
|
|
815
848
|
|
|
816
849
|
We love contributions! Feel free to open issues for bugs or feature requests. Look at [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
817
850
|
|
|
818
|
-
## Contributors
|
|
819
|
-
|
|
820
|
-
Thanks to all our amazing contributors!
|
|
821
|
-
|
|
822
|
-
<a href="https://github.com/mcp-use/mcp-use/graphs/contributors">
|
|
823
|
-
<img src="https://contrib.rocks/image?repo=mcp-use/mcp-use" />
|
|
824
|
-
</a>
|
|
825
|
-
|
|
826
851
|
## Top Starred Dependents
|
|
827
852
|
|
|
828
853
|
<!-- gh-dependents-info-used-by-start -->
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
</picture>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
<h1 align="center">🚀 Create MCP Clients and Agents</h1>
|
|
10
|
+
<h1 align="center">🚀 MCP-Use for Python</h1>
|
|
12
11
|
<p align="center">
|
|
13
12
|
<a href="https://github.com/pietrozullo/mcp-use/stargazers" alt="GitHub stars">
|
|
14
13
|
<img src="https://img.shields.io/github/stars/pietrozullo/mcp-use?style=social" /></a>
|
|
@@ -16,37 +15,42 @@
|
|
|
16
15
|
<img src="https://static.pepy.tech/badge/mcp-use" /></a>
|
|
17
16
|
<a href="https://pypi.org/project/mcp_use/" alt="PyPI Version">
|
|
18
17
|
<img src="https://img.shields.io/pypi/v/mcp_use.svg"/></a>
|
|
19
|
-
<a href="https://github.com/mcp-use/mcp-use-ts" alt="TypeScript">
|
|
20
|
-
<img src="https://img.shields.io/badge/TypeScript-mcp--use-3178C6?logo=typescript&logoColor=white" /></a>
|
|
21
18
|
<a href="https://github.com/pietrozullo/mcp-use/blob/main/LICENSE" alt="License">
|
|
22
19
|
<img src="https://img.shields.io/github/license/pietrozullo/mcp-use" /></a>
|
|
23
20
|
<a href="https://docs.mcp-use.com" alt="Documentation">
|
|
24
21
|
<img src="https://img.shields.io/badge/docs-mcp--use.com-blue" /></a>
|
|
25
|
-
<a href="https://mcp-use.com" alt="Website">
|
|
26
|
-
<img src="https://img.shields.io/badge/website-mcp--use.com-blue" /></a>
|
|
27
|
-
</p>
|
|
28
|
-
<p align="center">
|
|
29
|
-
<a href="https://x.com/pietrozullo" alt="Twitter Follow - Pietro">
|
|
30
|
-
<img src="https://img.shields.io/twitter/follow/Pietro?style=social" /></a>
|
|
31
|
-
<a href="https://x.com/pederzh" alt="Twitter Follow - Luigi">
|
|
32
|
-
<img src="https://img.shields.io/twitter/follow/Luigi?style=social" /></a>
|
|
33
22
|
<a href="https://discord.gg/XkNkSkMz3V" alt="Discord">
|
|
34
23
|
<img src="https://dcbadge.limes.pink/api/server/XkNkSkMz3V?style=flat" /></a>
|
|
35
24
|
</p>
|
|
36
25
|
</div>
|
|
37
26
|
|
|
38
|
-
|
|
27
|
+
> **📦 Part of the [MCP-Use Monorepo](../../README.md)** - This is the Python implementation. Also available in [TypeScript](../typescript/README.md).
|
|
28
|
+
|
|
29
|
+
🌐 **MCP-Use for Python** is the complete way to connect **any LLM to any MCP server** and build custom MCP agents with tool access.
|
|
30
|
+
|
|
31
|
+
💡 Let your Python applications leverage the power of the Model Context Protocol with support for agents, clients, and advanced features.
|
|
32
|
+
|
|
33
|
+
## 🏗️ What's Included
|
|
34
|
+
|
|
35
|
+
MCP-Use for Python provides three main capabilities:
|
|
36
|
+
|
|
37
|
+
- **🤖 MCP Agent** - Build AI agents that can use tools and reason across multiple steps
|
|
38
|
+
- **🔌 MCP Client** - Connect directly to MCP servers for programmatic tool access
|
|
39
|
+
- **🛠️ MCP Server** - _Coming soon!_ For now, use the [TypeScript version](../typescript/README.md#%EF%B8%8F-mcp-server-framework)
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
---
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
- Visit the [mcp-use docs](https://docs.mcp-use.com/) to get started with mcp-use library
|
|
44
|
-
- For the TypeScript version, visit [mcp-use-ts](https://github.com/mcp-use/mcp-use-ts)
|
|
43
|
+
## 📖 Quick Links
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
- **[Main Repository](../../README.md)** - Overview of the entire MCP-Use ecosystem
|
|
46
|
+
- **[TypeScript Version](../typescript/README.md)** - TypeScript implementation with server framework
|
|
47
|
+
- **[Documentation](https://docs.mcp-use.com)** - Complete online documentation
|
|
48
|
+
- **[Examples](./examples/)** - Python code examples
|
|
49
|
+
|
|
50
|
+
| Supports | |
|
|
51
|
+
| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
48
52
|
| **Primitives** | [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) |
|
|
49
|
-
| **Transports** | [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml)
|
|
53
|
+
| **Transports** | [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) |
|
|
50
54
|
|
|
51
55
|
## Features
|
|
52
56
|
|
|
@@ -93,7 +97,13 @@
|
|
|
93
97
|
</tr>
|
|
94
98
|
</table>
|
|
95
99
|
|
|
96
|
-
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
# 🤖 MCP Agent
|
|
103
|
+
|
|
104
|
+
The **MCP Agent** is an AI-powered agent that can use tools from MCP servers to accomplish complex tasks. It reasons across multiple steps, selecting and executing tools as needed.
|
|
105
|
+
|
|
106
|
+
## Quick Start
|
|
97
107
|
|
|
98
108
|
With pip:
|
|
99
109
|
|
|
@@ -628,7 +638,13 @@ The `SandboxOptions` type provides configuration for the sandbox environment:
|
|
|
628
638
|
- **Consistent environment**: Ensure consistent behavior across different systems
|
|
629
639
|
- **Resource efficiency**: Offload resource-intensive tasks to cloud infrastructure
|
|
630
640
|
|
|
631
|
-
|
|
641
|
+
---
|
|
642
|
+
|
|
643
|
+
# 🔌 MCP Client
|
|
644
|
+
|
|
645
|
+
The **MCP Client** allows you to connect directly to MCP servers and call tools programmatically without an AI agent. This is useful when you know exactly which tools to call and don't need AI reasoning.
|
|
646
|
+
|
|
647
|
+
## Direct Tool Calls (Without LLM)
|
|
632
648
|
|
|
633
649
|
You can call MCP server tools directly without an LLM when you need programmatic control:
|
|
634
650
|
|
|
@@ -705,6 +721,23 @@ if __name__ == "__main__":
|
|
|
705
721
|
|
|
706
722
|
```
|
|
707
723
|
|
|
724
|
+
---
|
|
725
|
+
|
|
726
|
+
# 🛠️ MCP Server
|
|
727
|
+
|
|
728
|
+
**Coming Soon!** Python support for creating MCP servers is under development.
|
|
729
|
+
|
|
730
|
+
In the meantime, you can create MCP servers using our [TypeScript implementation](../typescript/README.md#%EF%B8%8F-mcp-server-framework), which offers:
|
|
731
|
+
|
|
732
|
+
- Complete server framework with tools, resources, and prompts
|
|
733
|
+
- Built-in inspector for debugging
|
|
734
|
+
- React-based UI widgets for interactive experiences
|
|
735
|
+
- Hot reload development workflow
|
|
736
|
+
|
|
737
|
+
Python agents and clients can connect to TypeScript servers seamlessly - the MCP protocol is language-agnostic.
|
|
738
|
+
|
|
739
|
+
---
|
|
740
|
+
|
|
708
741
|
# Debugging
|
|
709
742
|
|
|
710
743
|
MCP-Use provides a built-in debug mode that increases log verbosity and helps diagnose issues in your agent implementation.
|
|
@@ -768,14 +801,6 @@ This is useful when you only need to see the agent's steps and decision-making p
|
|
|
768
801
|
|
|
769
802
|
We love contributions! Feel free to open issues for bugs or feature requests. Look at [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
770
803
|
|
|
771
|
-
## Contributors
|
|
772
|
-
|
|
773
|
-
Thanks to all our amazing contributors!
|
|
774
|
-
|
|
775
|
-
<a href="https://github.com/mcp-use/mcp-use/graphs/contributors">
|
|
776
|
-
<img src="https://contrib.rocks/image?repo=mcp-use/mcp-use" />
|
|
777
|
-
</a>
|
|
778
|
-
|
|
779
804
|
## Top Starred Dependents
|
|
780
805
|
|
|
781
806
|
<!-- gh-dependents-info-used-by-start -->
|
|
@@ -12,7 +12,7 @@ from importlib.metadata import version
|
|
|
12
12
|
from .logging import MCP_USE_DEBUG, Logger, logger # isort: skip
|
|
13
13
|
|
|
14
14
|
# Now import other modules - observability must come after logging
|
|
15
|
-
from . import observability # noqa: E402
|
|
15
|
+
from .agents import observability # noqa: E402
|
|
16
16
|
from .agents.mcpagent import MCPAgent
|
|
17
17
|
from .client import MCPClient
|
|
18
18
|
from .config import load_config_file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# mcp_use/adapters/__init__.py
|
|
2
|
+
import warnings
|
|
3
|
+
|
|
4
|
+
from typing_extensions import deprecated
|
|
5
|
+
|
|
6
|
+
from mcp_use.agents.adapters import BaseAdapter as _BaseAdapter
|
|
7
|
+
from mcp_use.agents.adapters import LangChainAdapter as _LangChainAdapter
|
|
8
|
+
|
|
9
|
+
warnings.warn(
|
|
10
|
+
"mcp_use.adapters is deprecated. Use mcp_use.agents.adapters. This import will be removed in version 1.4.0",
|
|
11
|
+
DeprecationWarning,
|
|
12
|
+
stacklevel=2,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@deprecated("Use mcp_use.agents.adapters.BaseAdapter")
|
|
17
|
+
class BaseAdapter(_BaseAdapter): ...
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@deprecated("Use mcp_use.agents.adapters.LangChainAdapter")
|
|
21
|
+
class LangChainAdapter(_LangChainAdapter): ...
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# mcp_use/adapters/base.py
|
|
2
|
+
import warnings
|
|
3
|
+
|
|
4
|
+
from typing_extensions import deprecated
|
|
5
|
+
|
|
6
|
+
from mcp_use.agents.adapters.base import BaseAdapter as _BaseAdapter
|
|
7
|
+
|
|
8
|
+
warnings.warn(
|
|
9
|
+
"mcp_use.adapters.base is deprecated. Use mcp_use.agents.adapters.base. "
|
|
10
|
+
"This import will be removed in version 1.4.0",
|
|
11
|
+
DeprecationWarning,
|
|
12
|
+
stacklevel=2,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@deprecated("Use mcp_use.agents.adapters.base.BaseAdapter")
|
|
17
|
+
class BaseAdapter(_BaseAdapter): ...
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# mcp_use/adapters/langchain_adapter.py
|
|
2
|
+
import warnings
|
|
3
|
+
|
|
4
|
+
from typing_extensions import deprecated
|
|
5
|
+
|
|
6
|
+
from mcp_use.agents.adapters.langchain_adapter import LangChainAdapter as _LangChainAdapter
|
|
7
|
+
|
|
8
|
+
warnings.warn(
|
|
9
|
+
"mcp_use.adapters.langchain_adapter is deprecated. "
|
|
10
|
+
"Use mcp_use.agents.adapters.langchain_adapter. "
|
|
11
|
+
"This import will be removed in version 1.4.0",
|
|
12
|
+
DeprecationWarning,
|
|
13
|
+
stacklevel=2,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@deprecated("Use mcp_use.agents.adapters.langchain_adapter.LangChainAdapter")
|
|
18
|
+
class LangChainAdapter(_LangChainAdapter): ...
|
|
@@ -9,9 +9,10 @@ from typing import TypeVar
|
|
|
9
9
|
|
|
10
10
|
from mcp.types import Prompt, Resource, Tool
|
|
11
11
|
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
12
|
+
from mcp_use.client.client import MCPClient
|
|
13
|
+
from mcp_use.client.connectors.base import BaseConnector
|
|
14
|
+
from mcp_use.logging import logger
|
|
15
|
+
from mcp_use.telemetry.telemetry import telemetry
|
|
15
16
|
|
|
16
17
|
# Generic type for the tools created by the adapter
|
|
17
18
|
T = TypeVar("T")
|
|
@@ -33,6 +34,7 @@ class BaseAdapter(ABC):
|
|
|
33
34
|
self.disallowed_tools = disallowed_tools or []
|
|
34
35
|
self._connector_tool_map: dict[BaseConnector, list[T]] = {}
|
|
35
36
|
|
|
37
|
+
@telemetry("adapter_create_tools")
|
|
36
38
|
async def create_tools(self, client: "MCPClient") -> list[T]:
|
|
37
39
|
"""Create tools from an MCPClient instance.
|
|
38
40
|
|
|
@@ -68,6 +70,7 @@ class BaseAdapter(ABC):
|
|
|
68
70
|
# Create tools from connectors
|
|
69
71
|
return await self._create_tools_from_connectors(connectors)
|
|
70
72
|
|
|
73
|
+
@telemetry("adapter_load_tools")
|
|
71
74
|
async def load_tools_for_connector(self, connector: BaseConnector) -> list[T]:
|
|
72
75
|
"""Dynamically load tools for a specific connector.
|
|
73
76
|
|
|
@@ -17,10 +17,11 @@ from mcp.types import (
|
|
|
17
17
|
)
|
|
18
18
|
from pydantic import BaseModel, Field, create_model
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from .
|
|
20
|
+
from mcp_use.agents.adapters.base import BaseAdapter
|
|
21
|
+
from mcp_use.client.connectors.base import BaseConnector
|
|
22
|
+
from mcp_use.errors.error_formatting import format_error
|
|
23
|
+
from mcp_use.logging import logger
|
|
24
|
+
from mcp_use.telemetry.telemetry import telemetry
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
class LangChainAdapter(BaseAdapter):
|
|
@@ -35,6 +36,7 @@ class LangChainAdapter(BaseAdapter):
|
|
|
35
36
|
super().__init__(disallowed_tools)
|
|
36
37
|
self._connector_tool_map: dict[BaseConnector, list[BaseTool]] = {}
|
|
37
38
|
|
|
39
|
+
@telemetry("adapter_fix_schema")
|
|
38
40
|
def fix_schema(self, schema: dict) -> dict:
|
|
39
41
|
"""Convert JSON Schema 'type': ['string', 'null'] to 'anyOf' format and fix enum handling.
|
|
40
42
|
|
|
@@ -57,6 +59,7 @@ class LangChainAdapter(BaseAdapter):
|
|
|
57
59
|
schema[key] = self.fix_schema(value) # Apply recursively
|
|
58
60
|
return schema
|
|
59
61
|
|
|
62
|
+
@telemetry("adapter_convert_tool")
|
|
60
63
|
def _convert_tool(self, mcp_tool: dict[str, Any], connector: BaseConnector) -> BaseTool:
|
|
61
64
|
"""Convert an MCP tool to LangChain's tool format.
|
|
62
65
|
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
from langchain_core.tools import BaseTool
|
|
2
2
|
|
|
3
|
+
from mcp_use.agents.adapters.base import BaseAdapter
|
|
4
|
+
from mcp_use.agents.managers.base import BaseServerManager
|
|
5
|
+
from mcp_use.agents.managers.tools import (
|
|
6
|
+
ConnectServerTool,
|
|
7
|
+
DisconnectServerTool,
|
|
8
|
+
GetActiveServerTool,
|
|
9
|
+
ListServersTool,
|
|
10
|
+
SearchToolsTool,
|
|
11
|
+
)
|
|
3
12
|
from mcp_use.client import MCPClient
|
|
4
13
|
from mcp_use.logging import logger
|
|
5
|
-
|
|
6
|
-
from ..adapters.base import BaseAdapter
|
|
7
|
-
from .base import BaseServerManager
|
|
8
|
-
from .tools import ConnectServerTool, DisconnectServerTool, GetActiveServerTool, ListServersTool, SearchToolsTool
|
|
14
|
+
from mcp_use.telemetry.telemetry import telemetry
|
|
9
15
|
|
|
10
16
|
|
|
11
17
|
class ServerManager(BaseServerManager):
|
|
@@ -28,6 +34,7 @@ class ServerManager(BaseServerManager):
|
|
|
28
34
|
self.initialized_servers: dict[str, bool] = {}
|
|
29
35
|
self._server_tools: dict[str, list[BaseTool]] = {}
|
|
30
36
|
|
|
37
|
+
@telemetry("server_manager_initialize")
|
|
31
38
|
async def initialize(self) -> None:
|
|
32
39
|
"""Initialize the server manager and prepare server management tools."""
|
|
33
40
|
# Make sure we have server configurations
|
|
@@ -2,11 +2,10 @@ from typing import ClassVar
|
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel, Field
|
|
4
4
|
|
|
5
|
+
from mcp_use.agents.managers.tools.base_tool import MCPServerTool
|
|
5
6
|
from mcp_use.errors.error_formatting import format_error
|
|
6
7
|
from mcp_use.logging import logger
|
|
7
8
|
|
|
8
|
-
from .base_tool import MCPServerTool
|
|
9
|
-
|
|
10
9
|
|
|
11
10
|
class ServerActionInput(BaseModel):
|
|
12
11
|
"""Base input for server-related actions"""
|
{mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/tools/disconnect_server.py
RENAMED
|
@@ -2,11 +2,10 @@ from typing import ClassVar
|
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel
|
|
4
4
|
|
|
5
|
+
from mcp_use.agents.managers.tools.base_tool import MCPServerTool
|
|
5
6
|
from mcp_use.errors.error_formatting import format_error
|
|
6
7
|
from mcp_use.logging import logger
|
|
7
8
|
|
|
8
|
-
from .base_tool import MCPServerTool
|
|
9
|
-
|
|
10
9
|
|
|
11
10
|
class DisconnectServerInput(BaseModel):
|
|
12
11
|
"""Empty input for disconnecting from the current server"""
|
{mcp_use-1.3.12/mcp_use → mcp_use-1.3.13/mcp_use/agents}/managers/tools/list_servers_tool.py
RENAMED
|
@@ -2,11 +2,10 @@ from typing import ClassVar
|
|
|
2
2
|
|
|
3
3
|
from pydantic import BaseModel
|
|
4
4
|
|
|
5
|
+
from mcp_use.agents.managers.tools.base_tool import MCPServerTool
|
|
5
6
|
from mcp_use.errors.error_formatting import format_error
|
|
6
7
|
from mcp_use.logging import logger
|
|
7
8
|
|
|
8
|
-
from .base_tool import MCPServerTool
|
|
9
|
-
|
|
10
9
|
|
|
11
10
|
class listServersInput(BaseModel):
|
|
12
11
|
"""Empty input for listing available servers"""
|
|
@@ -6,8 +6,8 @@ from typing import ClassVar
|
|
|
6
6
|
from langchain_core.tools import BaseTool
|
|
7
7
|
from pydantic import BaseModel, Field
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from .
|
|
9
|
+
from mcp_use.agents.managers.tools.base_tool import MCPServerTool
|
|
10
|
+
from mcp_use.logging import logger
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class ToolSearchInput(BaseModel):
|
|
@@ -23,21 +23,20 @@ from langchain_core.tools import BaseTool
|
|
|
23
23
|
from langchain_core.utils.input import get_color_mapping
|
|
24
24
|
from pydantic import BaseModel
|
|
25
25
|
|
|
26
|
-
from mcp_use.
|
|
27
|
-
from mcp_use.
|
|
28
|
-
from mcp_use.
|
|
29
|
-
from mcp_use.telemetry.utils import extract_model_info
|
|
30
|
-
|
|
31
|
-
from ..adapters.langchain_adapter import LangChainAdapter
|
|
32
|
-
from ..logging import logger
|
|
33
|
-
from ..managers.base import BaseServerManager
|
|
34
|
-
from ..managers.server_manager import ServerManager
|
|
26
|
+
from mcp_use.agents.adapters.langchain_adapter import LangChainAdapter
|
|
27
|
+
from mcp_use.agents.managers.base import BaseServerManager
|
|
28
|
+
from mcp_use.agents.managers.server_manager import ServerManager
|
|
35
29
|
|
|
36
30
|
# Import observability manager
|
|
37
|
-
from
|
|
38
|
-
from .prompts.system_prompt_builder import create_system_message
|
|
39
|
-
from .prompts.templates import DEFAULT_SYSTEM_PROMPT_TEMPLATE, SERVER_MANAGER_SYSTEM_PROMPT_TEMPLATE
|
|
40
|
-
from .remote import RemoteAgent
|
|
31
|
+
from mcp_use.agents.observability import ObservabilityManager
|
|
32
|
+
from mcp_use.agents.prompts.system_prompt_builder import create_system_message
|
|
33
|
+
from mcp_use.agents.prompts.templates import DEFAULT_SYSTEM_PROMPT_TEMPLATE, SERVER_MANAGER_SYSTEM_PROMPT_TEMPLATE
|
|
34
|
+
from mcp_use.agents.remote import RemoteAgent
|
|
35
|
+
from mcp_use.client import MCPClient
|
|
36
|
+
from mcp_use.client.connectors.base import BaseConnector
|
|
37
|
+
from mcp_use.logging import logger
|
|
38
|
+
from mcp_use.telemetry.telemetry import Telemetry, telemetry
|
|
39
|
+
from mcp_use.telemetry.utils import extract_model_info
|
|
41
40
|
|
|
42
41
|
set_debug(logger.level == logging.DEBUG)
|
|
43
42
|
|
|
@@ -425,6 +424,7 @@ class MCPAgent:
|
|
|
425
424
|
steps_taken += 1
|
|
426
425
|
return final_result, steps_taken
|
|
427
426
|
|
|
427
|
+
@telemetry("agent_stream")
|
|
428
428
|
async def stream(
|
|
429
429
|
self,
|
|
430
430
|
query: str,
|
|
@@ -821,6 +821,7 @@ class MCPAgent:
|
|
|
821
821
|
logger.info("🧹 Closing agent after stream completion")
|
|
822
822
|
await self.close()
|
|
823
823
|
|
|
824
|
+
@telemetry("agent_run")
|
|
824
825
|
async def run(
|
|
825
826
|
self,
|
|
826
827
|
query: str,
|
|
@@ -1038,6 +1039,7 @@ class MCPAgent:
|
|
|
1038
1039
|
logger.info("🧹 Closing agent after generator completion")
|
|
1039
1040
|
await self.close()
|
|
1040
1041
|
|
|
1042
|
+
@telemetry("agent_stream_events")
|
|
1041
1043
|
async def stream_events(
|
|
1042
1044
|
self,
|
|
1043
1045
|
query: str,
|
|
@@ -1049,7 +1051,7 @@ class MCPAgent:
|
|
|
1049
1051
|
|
|
1050
1052
|
Example::
|
|
1051
1053
|
|
|
1052
|
-
async for chunk in agent.
|
|
1054
|
+
async for chunk in agent.stream("hello"):
|
|
1053
1055
|
print(chunk, end="|", flush=True)
|
|
1054
1056
|
"""
|
|
1055
1057
|
start_time = time.time()
|