mcp-use 1.3.1__tar.gz → 1.3.2__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 (152) hide show
  1. mcp_use-1.3.2/.env.example +61 -0
  2. mcp_use-1.3.2/.github/release-drafter.yml +32 -0
  3. mcp_use-1.3.2/.github/workflows/changelog.yml +74 -0
  4. mcp_use-1.3.2/.github/workflows/claude.yml +36 -0
  5. {mcp_use-1.3.1 → mcp_use-1.3.2}/.github/workflows/publish.yml +1 -52
  6. mcp_use-1.3.2/.github/workflows/release-drafter.yml +41 -0
  7. {mcp_use-1.3.1 → mcp_use-1.3.2}/CLAUDE.md +26 -2
  8. mcp_use-1.3.2/CODE_OF_CONDUCT.md +128 -0
  9. {mcp_use-1.3.1 → mcp_use-1.3.2}/PKG-INFO +10 -4
  10. {mcp_use-1.3.1 → mcp_use-1.3.2}/README.md +1 -1
  11. mcp_use-1.3.2/docs/api-reference/adapters.mdx +519 -0
  12. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/api-reference/mcpclient.mdx +163 -122
  13. mcp_use-1.3.2/docs/community/showcase.mdx +196 -0
  14. mcp_use-1.3.2/docs/development/observability.mdx +274 -0
  15. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/development/telemetry.mdx +5 -3
  16. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/docs.json +17 -8
  17. mcp_use-1.3.1/docs/guides/debugging.mdx → mcp_use-1.3.2/docs/guides/logging.mdx +7 -30
  18. mcp_use-1.3.2/docs/snippets/youtube-embed.mdx +14 -0
  19. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/troubleshooting/common-issues.mdx +3 -1
  20. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/troubleshooting/connection-errors.mdx +14 -13
  21. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/troubleshooting/performance.mdx +1 -1
  22. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/mcp_everything.py +1 -3
  23. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/__init__.py +2 -0
  24. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/adapters/base.py +2 -6
  25. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/adapters/langchain_adapter.py +4 -11
  26. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/agents/base.py +1 -3
  27. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/agents/mcpagent.py +19 -42
  28. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/agents/prompts/system_prompt_builder.py +1 -3
  29. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/client.py +1 -3
  30. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/connectors/base.py +9 -3
  31. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/connectors/http.py +4 -12
  32. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/connectors/sandbox.py +5 -15
  33. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/connectors/stdio.py +1 -3
  34. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/connectors/websocket.py +1 -3
  35. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/logging.py +1 -1
  36. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/managers/server_manager.py +5 -16
  37. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/managers/tools/disconnect_server.py +1 -3
  38. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/managers/tools/get_active_server.py +1 -4
  39. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/managers/tools/search_tools.py +29 -36
  40. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/managers/tools/use_tool.py +5 -18
  41. mcp_use-1.3.2/mcp_use/observability/__init__.py +8 -0
  42. mcp_use-1.3.2/mcp_use/observability/laminar.py +21 -0
  43. mcp_use-1.3.2/mcp_use/observability/langfuse.py +35 -0
  44. mcp_use-1.3.2/mcp_use/telemetry/__init__.py +0 -0
  45. mcp_use-1.3.2/mcp_use/telemetry/telemetry.py +306 -0
  46. {mcp_use-1.3.1 → mcp_use-1.3.2}/pyproject.toml +9 -3
  47. {mcp_use-1.3.1 → mcp_use-1.3.2}/ruff.toml +1 -1
  48. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/servers_for_testing/custom_streaming_server.py +12 -12
  49. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/servers_for_testing/long_timeout_test_server.py +33 -6
  50. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/servers_for_testing/timeout_test_server.py +17 -3
  51. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/transports/customStreaming/test_custom_streaming_integration.py +4 -1
  52. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/transports/sse/test_connection_state_tracking.py +3 -1
  53. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/unit/test_client.py +1 -3
  54. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/unit/test_config.py +3 -9
  55. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/unit/test_http_connector.py +9 -27
  56. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/unit/test_sandbox_connector.py +3 -9
  57. mcp_use-1.3.2/tests/unit/test_search_tools_issue_138.py +185 -0
  58. mcp_use-1.3.1/docs/api-reference/adapters.mdx +0 -491
  59. mcp_use-1.3.1/mcp_use/telemetry/posthog.py +0 -214
  60. {mcp_use-1.3.1 → mcp_use-1.3.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  61. {mcp_use-1.3.1 → mcp_use-1.3.2}/.github/pull_request_template.md +0 -0
  62. {mcp_use-1.3.1 → mcp_use-1.3.2}/.github/workflows/transportstests.yml +0 -0
  63. {mcp_use-1.3.1 → mcp_use-1.3.2}/.github/workflows/unittests.yml +0 -0
  64. {mcp_use-1.3.1 → mcp_use-1.3.2}/.github/workflows/update-readme.yml +0 -0
  65. {mcp_use-1.3.1 → mcp_use-1.3.2}/.gitignore +0 -0
  66. {mcp_use-1.3.1 → mcp_use-1.3.2}/.pre-commit-config.yaml +0 -0
  67. /mcp_use-1.3.1/mcp_use/telemetry/__init__.py → /mcp_use-1.3.2/CHANGELOG.md +0 -0
  68. {mcp_use-1.3.1 → mcp_use-1.3.2}/CONTRIBUTING.md +0 -0
  69. {mcp_use-1.3.1 → mcp_use-1.3.2}/LICENSE +0 -0
  70. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/README.md +0 -0
  71. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/api-reference/introduction.mdx +0 -0
  72. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/api-reference/mcpagent.mdx +0 -0
  73. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/changelog.mdx +0 -0
  74. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/development.mdx +0 -0
  75. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/essentials/agent-configuration.mdx +0 -0
  76. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/essentials/client-configuration.mdx +0 -0
  77. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/essentials/configuration.mdx +0 -0
  78. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/essentials/connection-types.mdx +0 -0
  79. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/essentials/llm-integration.mdx +0 -0
  80. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/essentials/server-manager.mdx +0 -0
  81. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/favicon.svg +0 -0
  82. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/fonts.css +0 -0
  83. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/guides/building-custom-agents.mdx +0 -0
  84. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/guides/multi-server-setup.mdx +0 -0
  85. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/guides/security.mdx +0 -0
  86. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/guides/streaming.mdx +0 -0
  87. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/01.png +0 -0
  88. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/02.png +0 -0
  89. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/configuration-dark.png +0 -0
  90. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/configuration-light.png +0 -0
  91. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/examples-dark.png +0 -0
  92. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/examples-light.png +0 -0
  93. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/hero-dark.png +0 -0
  94. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/hero-light.png +0 -0
  95. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/installation-dark.png +0 -0
  96. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/installation-light.png +0 -0
  97. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/quickstart-dark.png +0 -0
  98. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/images/quickstart-light.png +0 -0
  99. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/index.mdx +0 -0
  100. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/installation.mdx +0 -0
  101. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/logo/dark.svg +0 -0
  102. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/logo/light.svg +0 -0
  103. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/logo/react.svg +0 -0
  104. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/quickstart.mdx +0 -0
  105. {mcp_use-1.3.1 → mcp_use-1.3.2}/docs/snippets/snippet-intro.mdx +0 -0
  106. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/airbnb_mcp.json +0 -0
  107. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/airbnb_use.py +0 -0
  108. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/blender_use.py +0 -0
  109. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/browser_mcp.json +0 -0
  110. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/browser_use.py +0 -0
  111. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/chat_example.py +0 -0
  112. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/filesystem_use.py +0 -0
  113. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/http_example.py +0 -0
  114. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/multi_server_example.py +0 -0
  115. {mcp_use-1.3.1 → mcp_use-1.3.2}/examples/sandbox_everything.py +0 -0
  116. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/adapters/__init__.py +0 -0
  117. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/agents/__init__.py +0 -0
  118. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/agents/prompts/templates.py +0 -0
  119. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/config.py +0 -0
  120. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/connectors/__init__.py +0 -0
  121. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/connectors/utils.py +0 -0
  122. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/managers/__init__.py +0 -0
  123. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/managers/tools/__init__.py +0 -0
  124. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/managers/tools/base_tool.py +0 -0
  125. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/managers/tools/connect_server.py +0 -0
  126. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/managers/tools/list_servers_tool.py +0 -0
  127. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/session.py +0 -0
  128. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/task_managers/__init__.py +0 -0
  129. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/task_managers/base.py +0 -0
  130. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/task_managers/sse.py +0 -0
  131. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/task_managers/stdio.py +0 -0
  132. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/task_managers/streamable_http.py +0 -0
  133. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/task_managers/websocket.py +0 -0
  134. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/telemetry/events.py +0 -0
  135. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/telemetry/utils.py +0 -0
  136. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/types/sandbox.py +0 -0
  137. {mcp_use-1.3.1 → mcp_use-1.3.2}/mcp_use/utils.py +0 -0
  138. {mcp_use-1.3.1 → mcp_use-1.3.2}/pytest.ini +0 -0
  139. {mcp_use-1.3.1 → mcp_use-1.3.2}/static/logo_black.svg +0 -0
  140. {mcp_use-1.3.1 → mcp_use-1.3.2}/static/logo_white.svg +0 -0
  141. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/conftest.py +0 -0
  142. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/__init__.py +0 -0
  143. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/servers_for_testing/__init__.py +0 -0
  144. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/servers_for_testing/simple_server.py +0 -0
  145. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/transports/customStreaming/__init__.py +0 -0
  146. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/transports/sse/test_sse_integration.py +0 -0
  147. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/transports/stdio/test_stdio_integration.py +0 -0
  148. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/integration/transports/streamableHttp/test_streamable_http_integration.py +0 -0
  149. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/unit/test_logging.py +0 -0
  150. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/unit/test_session.py +0 -0
  151. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/unit/test_stdio_connector.py +0 -0
  152. {mcp_use-1.3.1 → mcp_use-1.3.2}/tests/unit/test_websocket_connection_manager.py +0 -0
@@ -0,0 +1,61 @@
1
+ # =============================================================================
2
+ # MCP-Use Environment Configuration
3
+ # =============================================================================
4
+ # Copy this file to .env and fill in your actual values
5
+ # The .env file is already in .gitignore and won't be committed
6
+
7
+ # =============================================================================
8
+ # Observability - Optional but recommended for debugging and monitoring
9
+ # =============================================================================
10
+
11
+ # Langfuse Configuration (https://langfuse.com)
12
+ # Sign up at https://cloud.langfuse.com or self-host
13
+ LANGFUSE_PUBLIC_KEY=pk-lf-your-public-key-here
14
+ LANGFUSE_SECRET_KEY=sk-lf-your-secret-key-here
15
+ # LANGFUSE_HOST=https://cloud.langfuse.com # Default, uncomment for self-hosted
16
+
17
+ # Laminar Configuration (https://www.lmnr.ai)
18
+ # Sign up at https://www.lmnr.ai and get your project API key
19
+ LAMINAR_PROJECT_API_KEY=your-laminar-project-api-key-here
20
+
21
+ # =============================================================================
22
+ # LLM Provider API Keys
23
+ # =============================================================================
24
+
25
+ # OpenAI
26
+ OPENAI_API_KEY=sk-your-openai-api-key-here
27
+
28
+ # Anthropic
29
+ ANTHROPIC_API_KEY=sk-ant-your-anthropic-api-key-here
30
+
31
+ # Google (for Gemini)
32
+ GOOGLE_API_KEY=your-google-api-key-here
33
+
34
+ # Azure OpenAI
35
+ AZURE_OPENAI_API_KEY=your-azure-openai-key-here
36
+ AZURE_OPENAI_ENDPOINT=https://your-resource-name.openai.azure.com/
37
+
38
+ # =============================================================================
39
+ # Debug and Development
40
+ # =============================================================================
41
+
42
+ # MCP-Use Debug Level (1=INFO, 2=DEBUG)
43
+ DEBUG=1
44
+ # Alternative debug variable
45
+ MCP_USE_DEBUG=1
46
+
47
+ # Disable specific features (set to 'false' to disable)
48
+ # MCP_USE_LANGFUSE=false
49
+ # MCP_USE_LAMINAR=false
50
+ # MCP_USE_TELEMETRY=false
51
+
52
+ # =============================================================================
53
+ # MCP Server Specific Configuration
54
+ # =============================================================================
55
+
56
+ # E2B Sandbox (for sandboxed execution)
57
+ E2B_API_KEY=your-e2b-api-key-here
58
+
59
+ # Custom MCP server endpoints (if using HTTP/WebSocket servers)
60
+ # MCP_SERVER_URL=http://localhost:8080
61
+ # MCP_WEBSOCKET_URL=ws://localhost:8081
@@ -0,0 +1,32 @@
1
+ name-template: 'v$RESOLVED_VERSION 🌈'
2
+ tag-template: 'v$RESOLVED_VERSION'
3
+ categories:
4
+ - title: '🚀 Features'
5
+ labels:
6
+ - 'feature'
7
+ - 'feat'
8
+ - 'enhancement'
9
+ - title: '🐛 Bug Fixes'
10
+ labels:
11
+ - 'fix'
12
+ - 'bugfix'
13
+ - 'bug'
14
+ - title: '🧰 Maintenance'
15
+ label: 'chore'
16
+ change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
17
+ change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
18
+ version-resolver:
19
+ major:
20
+ labels:
21
+ - 'major'
22
+ minor:
23
+ labels:
24
+ - 'minor'
25
+ patch:
26
+ labels:
27
+ - 'patch'
28
+ default: patch
29
+ template: |
30
+ ## Changes
31
+
32
+ $CHANGES
@@ -0,0 +1,74 @@
1
+ name: "Update Changelogs"
2
+
3
+ on:
4
+ release:
5
+ types: [released]
6
+
7
+ jobs:
8
+ update:
9
+ runs-on: ubuntu-latest
10
+
11
+ permissions:
12
+ # Give the default GITHUB_TOKEN write permission to commit and push the
13
+ # updated CHANGELOG back to the repository.
14
+ # https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
15
+ contents: write
16
+
17
+ steps:
18
+ - name: Checkout code
19
+ uses: actions/checkout@v4
20
+ with:
21
+ ref: ${{ github.event.release.target_commitish }}
22
+ fetch-depth: 0
23
+ token: ${{ secrets.GITHUB_TOKEN }}
24
+
25
+ - name: Update Changelog
26
+ uses: stefanzweifel/changelog-updater-action@v1
27
+ with:
28
+ latest-version: ${{ github.event.release.tag_name }}
29
+ release-notes: ${{ github.event.release.body }}
30
+
31
+ - name: Update Docs Changelog
32
+ run: |
33
+ # Get current date in the required format
34
+ CURRENT_DATE=$(date +"%Y‑%m‑%d")
35
+
36
+ # Create the new changelog entry
37
+ NEW_ENTRY="<Update label=\"$CURRENT_DATE\">
38
+ ## ${{ github.event.release.tag_name }}
39
+ ${{ github.event.release.body }}
40
+ </Update>
41
+
42
+ "
43
+
44
+ # Read the current changelog and insert the new entry after the front matter
45
+ python -c "
46
+ import re
47
+
48
+ # Read the current changelog
49
+ with open('docs/changelog.mdx', 'r') as f:
50
+ content = f.read()
51
+
52
+ # Find the end of the front matter
53
+ front_matter_end = content.find('---', content.find('---') + 1) + 3
54
+
55
+ # Split content into front matter and body
56
+ front_matter = content[:front_matter_end]
57
+ body = content[front_matter_end:]
58
+
59
+ # Create new entry
60
+ new_entry = '''$NEW_ENTRY'''
61
+
62
+ # Combine and write back
63
+ new_content = front_matter + '\n\n' + new_entry + body.lstrip()
64
+
65
+ with open('docs/changelog.mdx', 'w') as f:
66
+ f.write(new_content)
67
+ "
68
+
69
+ - name: Commit updated CHANGELOG
70
+ uses: stefanzweifel/git-auto-commit-action@v5
71
+ with:
72
+ branch: ${{ github.event.release.target_commitish }}
73
+ commit_message: Update CHANGELOG and docs changelog
74
+ file_pattern: CHANGELOG.md docs/changelog.mdx
@@ -0,0 +1,36 @@
1
+ name: Claude PR Assistant
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_review_comment:
7
+ types: [created]
8
+ issues:
9
+ types: [opened, assigned]
10
+ pull_request_review:
11
+ types: [submitted]
12
+
13
+ jobs:
14
+ claude-code-action:
15
+ if: |
16
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19
+ (github.event_name == 'issues' && contains(github.event.issue.body, '@claude'))
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: read
23
+ pull-requests: read
24
+ issues: read
25
+ id-token: write
26
+ steps:
27
+ - name: Checkout repository
28
+ uses: actions/checkout@v4
29
+ with:
30
+ fetch-depth: 1
31
+
32
+ - name: Run Claude PR Action
33
+ uses: anthropics/claude-code-action@beta
34
+ with:
35
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
36
+ timeout_minutes: "60"
@@ -72,58 +72,7 @@ jobs:
72
72
  name: Release v${{ steps.check-version.outputs.new_version }}
73
73
  draft: false
74
74
  prerelease: false
75
- generateReleaseNotes: true
76
-
77
- - name: Update Docs Changelog
78
- if: steps.check-version.outputs.is_new_version == 'true'
79
- run: |
80
- # Get the release notes from the created release
81
- RELEASE_NOTES=$(gh release view v${{ steps.check-version.outputs.new_version }} --json body --jq '.body')
82
-
83
- # Get current date in the required format
84
- CURRENT_DATE=$(date +"%Y‑%m‑%d")
85
-
86
- # Create the new changelog entry
87
- NEW_ENTRY="<Update label=\"$CURRENT_DATE\">
88
- ## v${{ steps.check-version.outputs.new_version }}
89
- $RELEASE_NOTES
90
- </Update>
91
-
92
- "
93
-
94
- # Read the current changelog and insert the new entry after the front matter
95
- python -c "
96
- import re
97
-
98
- # Read the current changelog
99
- with open('docs/changelog.mdx', 'r') as f:
100
- content = f.read()
101
-
102
- # Find the end of the front matter
103
- front_matter_end = content.find('---', content.find('---') + 1) + 3
104
-
105
- # Split content into front matter and body
106
- front_matter = content[:front_matter_end]
107
- body = content[front_matter_end:]
108
-
109
- # Create new entry
110
- new_entry = '''$NEW_ENTRY'''
111
-
112
- # Combine and write back
113
- new_content = front_matter + '\n\n' + new_entry + body.lstrip()
114
-
115
- with open('docs/changelog.mdx', 'w') as f:
116
- f.write(new_content)
117
- "
118
-
119
- # Commit and push the updated changelog
120
- git config --local user.email "action@github.com"
121
- git config --local user.name "GitHub Action"
122
- git add docs/changelog.mdx
123
- git commit -m "docs: update changelog for v${{ steps.check-version.outputs.new_version }}" || echo "No changes to commit"
124
- git push || echo "No changes to push"
125
- env:
126
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75
+ generateReleaseNotes: false
127
76
 
128
77
  - name: Publish to PyPI
129
78
  if: steps.check-version.outputs.is_new_version == 'true'
@@ -0,0 +1,41 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ # pull_request event is required only for autolabeler
9
+ pull_request:
10
+ # Only following types are handled by the action, but one can default to all as well
11
+ types: [opened, reopened, synchronize]
12
+ # pull_request_target event is required for autolabeler to support PRs from forks
13
+ # pull_request_target:
14
+ # types: [opened, reopened, synchronize]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ update_release_draft:
21
+ permissions:
22
+ # write permission is required to create a github release
23
+ contents: write
24
+ # write permission is required for autolabeler
25
+ # otherwise, read permission is required at least
26
+ pull-requests: write
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ # (Optional) GitHub Enterprise requires GHE_HOST variable set
30
+ #- name: Set GHE_HOST
31
+ # run: |
32
+ # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
33
+
34
+ # Drafts your next Release notes as Pull Requests are merged into "master"
35
+ - uses: release-drafter/release-drafter@v6
36
+ # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
37
+ # with:
38
+ # config-name: my-config.yml
39
+ # disable-autolabeler: true
40
+ env:
41
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -9,7 +9,14 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
9
9
  ## Development Commands
10
10
 
11
11
  ### Setup
12
+
12
13
  ```bash
14
+ # Activate virtual environment (if it exists)
15
+ source env/bin/activate
16
+
17
+ # Create virtual environment if it doesn't exist
18
+ # python -m venv env && source env/bin/activate
19
+
13
20
  # Install for development
14
21
  pip install -e ".[dev,search]"
15
22
 
@@ -18,6 +25,7 @@ pip install -e ".[dev,anthropic,openai,e2b,search]"
18
25
  ```
19
26
 
20
27
  ### Code Quality
28
+
21
29
  ```bash
22
30
  # Run linting and formatting
23
31
  ruff check --fix
@@ -31,6 +39,7 @@ pre-commit run --all-files
31
39
  ```
32
40
 
33
41
  ### Testing
42
+
34
43
  ```bash
35
44
  # Run all tests
36
45
  pytest
@@ -50,6 +59,7 @@ DEBUG=2 pytest tests/unit/test_client.py -v -s
50
59
  ```
51
60
 
52
61
  ### Local Development
62
+
53
63
  ```bash
54
64
  # Debug mode environment variable
55
65
  export DEBUG=1 # INFO level
@@ -64,23 +74,27 @@ export MCP_USE_DEBUG=2
64
74
  ### Core Components
65
75
 
66
76
  **MCPClient** (`mcp_use/client.py`)
77
+
67
78
  - Main entry point for MCP server management
68
79
  - Handles configuration loading from files or dictionaries
69
80
  - Manages multiple MCP server sessions
70
81
  - Supports sandboxed execution via E2B
71
82
 
72
83
  **MCPAgent** (`mcp_use/agents/mcpagent.py`)
84
+
73
85
  - High-level agent interface using LangChain's agent framework
74
86
  - Integrates LLMs with MCP tools
75
87
  - Supports streaming responses and conversation memory
76
88
  - Can use ServerManager for dynamic server selection
77
89
 
78
90
  **MCPSession** (`mcp_use/session.py`)
91
+
79
92
  - Manages individual MCP server connections
80
93
  - Handles tool discovery and resource management
81
94
  - Maintains connection state and lifecycle
82
95
 
83
96
  **Connectors** (`mcp_use/connectors/`)
97
+
84
98
  - Abstraction layer for different MCP transport protocols
85
99
  - `StdioConnector`: Process-based MCP servers
86
100
  - `HttpConnector`: HTTP-based MCP servers
@@ -88,6 +102,7 @@ export MCP_USE_DEBUG=2
88
102
  - `SandboxConnector`: E2B sandboxed execution
89
103
 
90
104
  **ServerManager** (`mcp_use/managers/server_manager.py`)
105
+
91
106
  - Provides dynamic server selection capabilities
92
107
  - Allows agents to choose appropriate servers for tasks
93
108
  - Manages server tool discovery and activation
@@ -102,24 +117,26 @@ export MCP_USE_DEBUG=2
102
117
 
103
118
  **Multi-Transport Support**: Supports stdio, HTTP, WebSocket, and sandboxed connections to MCP servers.
104
119
 
105
- **Telemetry**: Built-in telemetry using PostHog for usage analytics (can be disabled).
120
+ **Telemetry**: Built-in telemetry using PostHog and Scarf.sh for usage analytics (can be disabled).
106
121
 
107
122
  ## Configuration Examples
108
123
 
109
124
  ### Basic Server Configuration
125
+
110
126
  ```json
111
127
  {
112
128
  "mcpServers": {
113
129
  "playwright": {
114
130
  "command": "npx",
115
131
  "args": ["@playwright/mcp@latest"],
116
- "env": {"DISPLAY": ":1"}
132
+ "env": { "DISPLAY": ":1" }
117
133
  }
118
134
  }
119
135
  }
120
136
  ```
121
137
 
122
138
  ### HTTP Server Configuration
139
+
123
140
  ```json
124
141
  {
125
142
  "mcpServers": {
@@ -131,6 +148,7 @@ export MCP_USE_DEBUG=2
131
148
  ```
132
149
 
133
150
  ### Multi-Server Configuration
151
+
134
152
  ```json
135
153
  {
136
154
  "mcpServers": {
@@ -159,17 +177,20 @@ export MCP_USE_DEBUG=2
159
177
  ## Testing Strategy
160
178
 
161
179
  ### Unit Tests (`tests/unit/`)
180
+
162
181
  - Test individual components in isolation
163
182
  - Mock external dependencies
164
183
  - Focus on business logic and edge cases
165
184
 
166
185
  ### Integration Tests (`tests/integration/`)
186
+
167
187
  - Test component interactions
168
188
  - Include real MCP server integrations
169
189
  - Organized by transport type (stdio, sse, websocket, etc.)
170
190
  - Custom test servers in `tests/integration/servers_for_testing/`
171
191
 
172
192
  ### Test Configuration
193
+
173
194
  - Uses pytest with asyncio mode
174
195
  - Fixtures defined in `conftest.py`
175
196
  - Test servers provide controlled MCP environments
@@ -187,18 +208,21 @@ export MCP_USE_DEBUG=2
187
208
  ## Common Development Tasks
188
209
 
189
210
  ### Adding a New Connector
211
+
190
212
  1. Extend `BaseConnector` in `mcp_use/connectors/`
191
213
  2. Implement required async methods
192
214
  3. Add connector to factory in `config.py`
193
215
  4. Write integration tests
194
216
 
195
217
  ### Adding New Agent Features
218
+
196
219
  1. Modify `MCPAgent` class in `mcp_use/agents/mcpagent.py`
197
220
  2. Update system prompt templates if needed
198
221
  3. Add comprehensive tests
199
222
  4. Update documentation
200
223
 
201
224
  ### Testing with Custom MCP Servers
225
+
202
226
  1. Create test server in `tests/integration/servers_for_testing/`
203
227
  2. Add integration test in appropriate transport directory
204
228
  3. Use custom servers for controlled testing scenarios
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ dev@mcp-use.io.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-use
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: MCP Library for LLMs
5
5
  Author-email: Pietro Zullo <pietro.zullo@gmail.com>
6
6
  License: MIT
@@ -15,6 +15,9 @@ Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
16
  Requires-Python: >=3.11
17
17
  Requires-Dist: aiohttp>=3.9.0
18
+ Requires-Dist: anyio>=4.0.0
19
+ Requires-Dist: authlib>=1.5.2
20
+ Requires-Dist: httpx>=0.28.1
18
21
  Requires-Dist: jsonschema-pydantic>=0.1.0
19
22
  Requires-Dist: langchain-community>=0.0.10
20
23
  Requires-Dist: langchain>=0.1.0
@@ -22,10 +25,13 @@ Requires-Dist: mcp>=1.9.3
22
25
  Requires-Dist: posthog>=4.8.0
23
26
  Requires-Dist: pydantic>=2.0.0
24
27
  Requires-Dist: python-dotenv>=1.0.0
28
+ Requires-Dist: scarf-sdk>=0.1.0
29
+ Requires-Dist: starlette>=0.41.0
25
30
  Requires-Dist: typing-extensions>=4.8.0
31
+ Requires-Dist: uvicorn>=0.32.0
26
32
  Requires-Dist: websockets>=12.0
27
33
  Provides-Extra: anthropic
28
- Requires-Dist: anthropic>=0.15.0; extra == 'anthropic'
34
+ Requires-Dist: langchain-anthropic; extra == 'anthropic'
29
35
  Provides-Extra: dev
30
36
  Requires-Dist: black>=23.9.0; extra == 'dev'
31
37
  Requires-Dist: fastmcp; extra == 'dev'
@@ -38,7 +44,7 @@ Requires-Dist: ruff>=0.1.0; extra == 'dev'
38
44
  Provides-Extra: e2b
39
45
  Requires-Dist: e2b-code-interpreter>=1.5.0; extra == 'e2b'
40
46
  Provides-Extra: openai
41
- Requires-Dist: openai>=1.10.0; extra == 'openai'
47
+ Requires-Dist: langchain-openai; extra == 'openai'
42
48
  Provides-Extra: search
43
49
  Requires-Dist: fastembed>=0.0.1; extra == 'search'
44
50
  Description-Content-Type: text/markdown
@@ -76,7 +82,7 @@ Description-Content-Type: text/markdown
76
82
  <a href="https://x.com/pederzh" alt="Twitter Follow - Luigi">
77
83
  <img src="https://img.shields.io/twitter/follow/Luigi?style=social" /></a>
78
84
  <a href="https://discord.gg/XkNkSkMz3V" alt="Discord">
79
- <img src="https://dcbadge.limes.pink/api/server/https://discord.gg/XkNkSkMz3V?style=flat" /></a>
85
+ <img src="https://dcbadge.limes.pink/api/server/XkNkSkMz3V?style=flat" /></a>
80
86
  </p>
81
87
  🌐 MCP-Use is the open source way to connect **any LLM to any MCP server** and build custom agents that have tool access, without using closed source or application clients.
82
88
 
@@ -31,7 +31,7 @@
31
31
  <a href="https://x.com/pederzh" alt="Twitter Follow - Luigi">
32
32
  <img src="https://img.shields.io/twitter/follow/Luigi?style=social" /></a>
33
33
  <a href="https://discord.gg/XkNkSkMz3V" alt="Discord">
34
- <img src="https://dcbadge.limes.pink/api/server/https://discord.gg/XkNkSkMz3V?style=flat" /></a>
34
+ <img src="https://dcbadge.limes.pink/api/server/XkNkSkMz3V?style=flat" /></a>
35
35
  </p>
36
36
  🌐 MCP-Use is the open source way to connect **any LLM to any MCP server** and build custom agents that have tool access, without using closed source or application clients.
37
37