mcp-use 1.3.10__tar.gz → 1.3.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 (253) hide show
  1. mcp_use-1.3.12/.github/workflows/docs.yml +108 -0
  2. {mcp_use-1.3.10 → mcp_use-1.3.12}/.github/workflows/tests.yml +1 -1
  3. {mcp_use-1.3.10 → mcp_use-1.3.12}/PKG-INFO +21 -25
  4. {mcp_use-1.3.10 → mcp_use-1.3.12}/README.md +16 -22
  5. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/advanced/building-custom-agents.mdx +86 -13
  6. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/advanced/logging.mdx +37 -3
  7. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/advanced/multi-server-setup.mdx +258 -14
  8. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/advanced/security.mdx +75 -4
  9. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/agent/agent-configuration.mdx +192 -14
  10. mcp_use-1.3.12/docs/agent/interactive-chat-patterns.mdx +569 -0
  11. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/agent/llm-integration.mdx +12 -1
  12. mcp_use-1.3.12/docs/agent/memory-management.mdx +137 -0
  13. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/agent/server-manager.mdx +141 -23
  14. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/agent/streaming.mdx +86 -6
  15. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/agent/structured-output.mdx +45 -2
  16. mcp_use-1.3.12/docs/api-reference/mcp_use_adapters_base.mdx +102 -0
  17. mcp_use-1.3.12/docs/api-reference/mcp_use_adapters_langchain_adapter.mdx +68 -0
  18. mcp_use-1.3.12/docs/api-reference/mcp_use_agents_base.mdx +109 -0
  19. mcp_use-1.3.12/docs/api-reference/mcp_use_agents_mcpagent.mdx +333 -0
  20. mcp_use-1.3.12/docs/api-reference/mcp_use_agents_prompts_system_prompt_builder.mdx +115 -0
  21. mcp_use-1.3.12/docs/api-reference/mcp_use_agents_prompts_templates.mdx +12 -0
  22. mcp_use-1.3.12/docs/api-reference/mcp_use_agents_remote.mdx +118 -0
  23. mcp_use-1.3.12/docs/api-reference/mcp_use_auth_bearer.mdx +57 -0
  24. mcp_use-1.3.12/docs/api-reference/mcp_use_auth_oauth.mdx +432 -0
  25. mcp_use-1.3.12/docs/api-reference/mcp_use_auth_oauth_callback.mdx +138 -0
  26. mcp_use-1.3.12/docs/api-reference/mcp_use_cli.mdx +322 -0
  27. mcp_use-1.3.12/docs/api-reference/mcp_use_client.mdx +256 -0
  28. mcp_use-1.3.12/docs/api-reference/mcp_use_config.mdx +84 -0
  29. mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_base.mdx +345 -0
  30. mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_http.mdx +61 -0
  31. mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_sandbox.mdx +83 -0
  32. mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_stdio.mdx +61 -0
  33. mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_utils.mdx +37 -0
  34. mcp_use-1.3.12/docs/api-reference/mcp_use_connectors_websocket.mdx +54 -0
  35. mcp_use-1.3.12/docs/api-reference/mcp_use_errors_error_formatting.mdx +38 -0
  36. mcp_use-1.3.12/docs/api-reference/mcp_use_exceptions.mdx +174 -0
  37. mcp_use-1.3.12/docs/api-reference/mcp_use_logging.mdx +37 -0
  38. mcp_use-1.3.12/docs/api-reference/mcp_use_managers_base.mdx +81 -0
  39. mcp_use-1.3.12/docs/api-reference/mcp_use_managers_server_manager.mdx +82 -0
  40. mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_base_tool.mdx +62 -0
  41. mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_connect_server.mdx +95 -0
  42. mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_disconnect_server.mdx +88 -0
  43. mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_get_active_server.mdx +88 -0
  44. mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_list_servers_tool.mdx +88 -0
  45. mcp_use-1.3.12/docs/api-reference/mcp_use_managers_tools_search_tools.mdx +203 -0
  46. mcp_use-1.3.12/docs/api-reference/mcp_use_middleware_logging.mdx +33 -0
  47. mcp_use-1.3.12/docs/api-reference/mcp_use_middleware_metrics.mdx +185 -0
  48. mcp_use-1.3.12/docs/api-reference/mcp_use_middleware_middleware.mdx +595 -0
  49. mcp_use-1.3.12/docs/api-reference/mcp_use_observability_callbacks_manager.mdx +180 -0
  50. mcp_use-1.3.12/docs/api-reference/mcp_use_observability_laminar.mdx +16 -0
  51. mcp_use-1.3.12/docs/api-reference/mcp_use_observability_langfuse.mdx +12 -0
  52. mcp_use-1.3.12/docs/api-reference/mcp_use_session.mdx +232 -0
  53. mcp_use-1.3.12/docs/api-reference/mcp_use_task_managers_base.mdx +95 -0
  54. mcp_use-1.3.12/docs/api-reference/mcp_use_task_managers_sse.mdx +57 -0
  55. mcp_use-1.3.12/docs/api-reference/mcp_use_task_managers_stdio.mdx +54 -0
  56. mcp_use-1.3.12/docs/api-reference/mcp_use_task_managers_streamable_http.mdx +57 -0
  57. mcp_use-1.3.12/docs/api-reference/mcp_use_task_managers_websocket.mdx +52 -0
  58. mcp_use-1.3.12/docs/api-reference/mcp_use_types_sandbox.mdx +58 -0
  59. mcp_use-1.3.12/docs/api-reference/mcp_use_utils.mdx +44 -0
  60. mcp_use-1.3.12/docs/blog/middleware.mdx +136 -0
  61. mcp_use-1.3.12/docs/changelog/1_3_11.mdx +73 -0
  62. mcp_use-1.3.12/docs/changelog/1_3_12.mdx +85 -0
  63. mcp_use-1.3.12/docs/changelog/changelog.mdx +82 -0
  64. mcp_use-1.3.12/docs/client/authentication.mdx +487 -0
  65. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/client-configuration.mdx +38 -4
  66. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/connection-types.mdx +10 -2
  67. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/direct-tool-calls.mdx +193 -8
  68. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/elicitation.mdx +39 -1
  69. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/logging.mdx +36 -1
  70. mcp_use-1.3.12/docs/client/middleware.mdx +294 -0
  71. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/notifications.mdx +28 -1
  72. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/prompts.mdx +227 -8
  73. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/resources.mdx +190 -8
  74. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/sampling.mdx +38 -2
  75. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/sandbox.mdx +43 -2
  76. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/client/tools.mdx +121 -5
  77. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/docs.json +174 -16
  78. mcp_use-1.3.12/docs/generate_docs.py +1371 -0
  79. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/getting-started/configuration.mdx +100 -8
  80. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/getting-started/installation.mdx +121 -15
  81. mcp_use-1.3.12/docs/getting-started/quickstart.mdx +287 -0
  82. mcp_use-1.3.12/docs/images/Middleware.jpg +0 -0
  83. mcp_use-1.3.12/docs/images/Release1.3.11.png +0 -0
  84. mcp_use-1.3.12/docs/images/Release1.3.12.png +0 -0
  85. mcp_use-1.3.12/docs/snippets/gradient.jsx +75 -0
  86. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/troubleshooting/connection-errors.mdx +12 -5
  87. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/chat_example.py +5 -7
  88. mcp_use-1.3.12/examples/example_middleware.py +72 -0
  89. mcp_use-1.3.12/examples/limited_memory_chat.py +88 -0
  90. mcp_use-1.3.12/examples/simple_oauth_example.py +37 -0
  91. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/adapters/langchain_adapter.py +9 -52
  92. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/agents/mcpagent.py +88 -37
  93. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/agents/prompts/templates.py +1 -10
  94. mcp_use-1.3.12/mcp_use/agents/remote.py +353 -0
  95. mcp_use-1.3.12/mcp_use/auth/__init__.py +6 -0
  96. mcp_use-1.3.12/mcp_use/auth/bearer.py +17 -0
  97. mcp_use-1.3.12/mcp_use/auth/oauth.py +625 -0
  98. mcp_use-1.3.12/mcp_use/auth/oauth_callback.py +214 -0
  99. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/client.py +25 -1
  100. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/config.py +7 -2
  101. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/connectors/base.py +25 -12
  102. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/connectors/http.py +135 -27
  103. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/connectors/sandbox.py +12 -3
  104. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/connectors/stdio.py +11 -3
  105. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/connectors/websocket.py +15 -6
  106. mcp_use-1.3.12/mcp_use/exceptions.py +31 -0
  107. mcp_use-1.3.12/mcp_use/middleware/__init__.py +50 -0
  108. mcp_use-1.3.12/mcp_use/middleware/logging.py +31 -0
  109. mcp_use-1.3.12/mcp_use/middleware/metrics.py +314 -0
  110. mcp_use-1.3.12/mcp_use/middleware/middleware.py +262 -0
  111. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/task_managers/base.py +13 -23
  112. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/task_managers/sse.py +5 -0
  113. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/task_managers/streamable_http.py +5 -0
  114. {mcp_use-1.3.10 → mcp_use-1.3.12}/pyproject.toml +5 -3
  115. mcp_use-1.3.12/tests/integration/conftest.py +76 -0
  116. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/others/test_custom_streaming_integration.py +3 -1
  117. mcp_use-1.3.12/tests/integration/primitives/test_auth.py +200 -0
  118. mcp_use-1.3.12/tests/integration/servers_for_testing/auth_server.py +140 -0
  119. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/transports/test_sse.py +3 -1
  120. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/transports/test_streamable_http.py +3 -1
  121. mcp_use-1.3.12/tests/unit/test_agent.py +234 -0
  122. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/unit/test_client.py +6 -0
  123. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/unit/test_config.py +10 -10
  124. mcp_use-1.3.12/tests/unit/test_enum_handling.py +109 -0
  125. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/unit/test_http_connector.py +11 -8
  126. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/unit/test_sandbox_connector.py +2 -1
  127. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/unit/test_stdio_connector.py +2 -1
  128. mcp_use-1.3.10/.github/workflows/changelog.yml +0 -74
  129. mcp_use-1.3.10/docs/agent/interactive-chat-patterns.mdx +0 -272
  130. mcp_use-1.3.10/docs/api-reference/adapters.mdx +0 -519
  131. mcp_use-1.3.10/docs/api-reference/introduction.mdx +0 -587
  132. mcp_use-1.3.10/docs/api-reference/mcpagent.mdx +0 -181
  133. mcp_use-1.3.10/docs/api-reference/mcpclient.mdx +0 -492
  134. mcp_use-1.3.10/docs/changelog.mdx +0 -60
  135. mcp_use-1.3.10/docs/getting-started/quickstart.mdx +0 -184
  136. mcp_use-1.3.10/mcp_use/agents/remote.py +0 -327
  137. mcp_use-1.3.10/tests/integration/conftest.py +0 -38
  138. mcp_use-1.3.10/tests/unit/test_logging.py +0 -117
  139. {mcp_use-1.3.10 → mcp_use-1.3.12}/.env.example +0 -0
  140. {mcp_use-1.3.10 → mcp_use-1.3.12}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  141. {mcp_use-1.3.10 → mcp_use-1.3.12}/.github/pull_request_template.md +0 -0
  142. {mcp_use-1.3.10 → mcp_use-1.3.12}/.github/release-drafter.yml +0 -0
  143. {mcp_use-1.3.10 → mcp_use-1.3.12}/.github/workflows/publish.yml +0 -0
  144. {mcp_use-1.3.10 → mcp_use-1.3.12}/.github/workflows/release-drafter.yml +0 -0
  145. {mcp_use-1.3.10 → mcp_use-1.3.12}/.github/workflows/stale.yml +0 -0
  146. {mcp_use-1.3.10 → mcp_use-1.3.12}/.github/workflows/update-readme.yml +0 -0
  147. {mcp_use-1.3.10 → mcp_use-1.3.12}/.gitignore +0 -0
  148. {mcp_use-1.3.10 → mcp_use-1.3.12}/.pre-commit-config.yaml +0 -0
  149. {mcp_use-1.3.10 → mcp_use-1.3.12}/CHANGELOG.md +0 -0
  150. {mcp_use-1.3.10 → mcp_use-1.3.12}/CLAUDE.md +0 -0
  151. {mcp_use-1.3.10 → mcp_use-1.3.12}/CODE_OF_CONDUCT.md +0 -0
  152. {mcp_use-1.3.10 → mcp_use-1.3.12}/CONTRIBUTING.md +0 -0
  153. {mcp_use-1.3.10 → mcp_use-1.3.12}/LICENSE +0 -0
  154. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/README.md +0 -0
  155. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/community/showcase.mdx +0 -0
  156. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/development/observability.mdx +0 -0
  157. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/development/telemetry.mdx +0 -0
  158. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/development.mdx +0 -0
  159. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/favicon.svg +0 -0
  160. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/fonts.css +0 -0
  161. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/getting-started/index.mdx +0 -0
  162. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/01.png +0 -0
  163. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/02.png +0 -0
  164. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/configuration-dark.png +0 -0
  165. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/configuration-light.png +0 -0
  166. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/examples-dark.png +0 -0
  167. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/examples-light.png +0 -0
  168. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/hero-dark.png +0 -0
  169. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/hero-light.png +0 -0
  170. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/installation-dark.png +0 -0
  171. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/installation-light.png +0 -0
  172. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/quickstart-dark.png +0 -0
  173. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/images/quickstart-light.png +0 -0
  174. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/logo/dark.svg +0 -0
  175. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/logo/light.svg +0 -0
  176. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/logo/react.svg +0 -0
  177. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/snippets/snippet-intro.mdx +0 -0
  178. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/snippets/youtube-embed.mdx +0 -0
  179. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/troubleshooting/common-issues.mdx +0 -0
  180. {mcp_use-1.3.10 → mcp_use-1.3.12}/docs/troubleshooting/performance.mdx +0 -0
  181. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/airbnb_mcp.json +0 -0
  182. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/airbnb_use.py +0 -0
  183. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/blender_use.py +0 -0
  184. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/browser_use.py +0 -0
  185. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/direct_tool_call.py +0 -0
  186. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/filesystem_use.py +0 -0
  187. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/http_example.py +0 -0
  188. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/mcp_everything.py +0 -0
  189. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/multi_server_example.py +0 -0
  190. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/sandbox_everything.py +0 -0
  191. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/simple_server_manager_use.py +0 -0
  192. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/stream_example.py +0 -0
  193. {mcp_use-1.3.10 → mcp_use-1.3.12}/examples/structured_output.py +0 -0
  194. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/__init__.py +0 -0
  195. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/adapters/__init__.py +0 -0
  196. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/adapters/base.py +0 -0
  197. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/agents/__init__.py +0 -0
  198. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/agents/base.py +0 -0
  199. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/agents/prompts/system_prompt_builder.py +0 -0
  200. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/cli.py +0 -0
  201. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/connectors/__init__.py +0 -0
  202. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/connectors/utils.py +0 -0
  203. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/errors/__init__.py +0 -0
  204. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/errors/error_formatting.py +0 -0
  205. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/logging.py +0 -0
  206. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/managers/__init__.py +0 -0
  207. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/managers/base.py +0 -0
  208. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/managers/server_manager.py +0 -0
  209. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/managers/tools/__init__.py +0 -0
  210. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/managers/tools/base_tool.py +0 -0
  211. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/managers/tools/connect_server.py +0 -0
  212. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/managers/tools/disconnect_server.py +0 -0
  213. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/managers/tools/get_active_server.py +0 -0
  214. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/managers/tools/list_servers_tool.py +0 -0
  215. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/managers/tools/search_tools.py +0 -0
  216. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/observability/__init__.py +0 -0
  217. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/observability/callbacks_manager.py +0 -0
  218. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/observability/laminar.py +0 -0
  219. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/observability/langfuse.py +0 -0
  220. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/session.py +0 -0
  221. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/task_managers/__init__.py +0 -0
  222. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/task_managers/stdio.py +0 -0
  223. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/task_managers/websocket.py +0 -0
  224. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/telemetry/__init__.py +0 -0
  225. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/telemetry/events.py +0 -0
  226. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/telemetry/telemetry.py +0 -0
  227. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/telemetry/utils.py +0 -0
  228. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/types/sandbox.py +0 -0
  229. {mcp_use-1.3.10 → mcp_use-1.3.12}/mcp_use/utils.py +0 -0
  230. {mcp_use-1.3.10 → mcp_use-1.3.12}/pytest.ini +0 -0
  231. {mcp_use-1.3.10 → mcp_use-1.3.12}/ruff.toml +0 -0
  232. {mcp_use-1.3.10 → mcp_use-1.3.12}/static/logo-gh.jpg +0 -0
  233. {mcp_use-1.3.10 → mcp_use-1.3.12}/static/logo_black.svg +0 -0
  234. {mcp_use-1.3.10 → mcp_use-1.3.12}/static/logo_white.svg +0 -0
  235. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/conftest.py +0 -0
  236. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/__init__.py +0 -0
  237. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/primitives/test_discovery.py +0 -0
  238. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/primitives/test_elicitation.py +0 -0
  239. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/primitives/test_logging.py +0 -0
  240. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/primitives/test_notifications.py +0 -0
  241. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/primitives/test_prompts.py +0 -0
  242. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/primitives/test_resources.py +0 -0
  243. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/primitives/test_sampling.py +0 -0
  244. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/primitives/test_tools.py +0 -0
  245. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/servers_for_testing/__init__.py +0 -0
  246. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/servers_for_testing/custom_streaming_server.py +0 -0
  247. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/servers_for_testing/primitive_server.py +0 -0
  248. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/servers_for_testing/simple_server.py +0 -0
  249. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/servers_for_testing/timeout_test_server.py +0 -0
  250. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/integration/transports/test_stdio.py +0 -0
  251. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/unit/test_search_tools_issue_138.py +0 -0
  252. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/unit/test_session.py +0 -0
  253. {mcp_use-1.3.10 → mcp_use-1.3.12}/tests/unit/test_websocket_connection_manager.py +0 -0
@@ -0,0 +1,108 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+ pull-requests: write
12
+
13
+ jobs:
14
+ docs:
15
+ runs-on: ubuntu-latest
16
+ name: Generate and validate API documentation
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Set up Python
23
+ uses: actions/setup-python@v4
24
+ with:
25
+ python-version: '3.11'
26
+
27
+ - name: Install uv
28
+ run: pip install uv
29
+
30
+ - name: Create virtual environment
31
+ run: uv venv
32
+
33
+ - name: Install dependencies
34
+ run: uv pip install -e .
35
+
36
+ - name: Install Mintlify CLI
37
+ run: npm install -g mint
38
+
39
+ - name: Generate API documentation
40
+ run: cd docs && uv run python generate_docs.py ../mcp_use api-reference docs.json
41
+
42
+ - name: Check for broken links
43
+ run: |
44
+ cd docs
45
+ mint broken-links
46
+
47
+ - name: Check for documentation changes
48
+ id: check_docs
49
+ run: |
50
+ if [ -n "$(git status --porcelain docs/)" ]; then
51
+ echo "docs_outdated=true" >> $GITHUB_OUTPUT
52
+ echo "❌ API documentation is out of date!"
53
+ echo ""
54
+ echo "The following files have been modified:"
55
+ MODIFIED=$(git status --porcelain docs/)
56
+ echo "$MODIFIED"
57
+ echo "modified_files<<EOF" >> $GITHUB_OUTPUT
58
+ echo "$MODIFIED" >> $GITHUB_OUTPUT
59
+ echo "EOF" >> $GITHUB_OUTPUT
60
+ else
61
+ echo "docs_outdated=false" >> $GITHUB_OUTPUT
62
+ echo "✅ API documentation is up to date"
63
+ fi
64
+
65
+ - name: Comment on PR
66
+ if: steps.check_docs.outputs.docs_outdated == 'true' && github.event_name == 'pull_request'
67
+ uses: actions/github-script@v7
68
+ with:
69
+ script: |
70
+ const comment = `## ❌ API Documentation Out of Date
71
+
72
+ The API documentation needs to be regenerated. Please run the following commands:
73
+
74
+ \`\`\`bash
75
+ cd docs
76
+ uv run python generate_docs.py ../mcp_use api-reference docs.json
77
+ \`\`\`
78
+
79
+ Then commit the changes:
80
+
81
+ \`\`\`bash
82
+ git add docs/api-reference/ docs/docs.json
83
+ git commit -m "docs: update API documentation"
84
+ \`\`\`
85
+
86
+ <details>
87
+ <summary>Modified files</summary>
88
+
89
+ \`\`\`
90
+ ${process.env.MODIFIED_FILES}
91
+ \`\`\`
92
+ </details>`;
93
+
94
+ github.rest.issues.createComment({
95
+ issue_number: context.issue.number,
96
+ owner: context.repo.owner,
97
+ repo: context.repo.repo,
98
+ body: comment
99
+ });
100
+ env:
101
+ MODIFIED_FILES: ${{ steps.check_docs.outputs.modified_files }}
102
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103
+
104
+ - name: Fail if docs are outdated
105
+ if: steps.check_docs.outputs.docs_outdated == 'true'
106
+ run: |
107
+ echo "Please update the API documentation and commit the changes."
108
+ exit 1
@@ -77,7 +77,7 @@ jobs:
77
77
  strategy:
78
78
  fail-fast: false
79
79
  matrix:
80
- primitive: [sampling, tools, resources, prompts, elicitation, notifications]
80
+ primitive: [sampling, tools, resources, prompts, elicitation, notifications, auth]
81
81
  steps:
82
82
  - uses: actions/checkout@v3
83
83
  - name: Set up Python 3.11
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-use
3
- Version: 1.3.10
3
+ Version: 1.3.12
4
4
  Summary: MCP Library for LLMs
5
5
  Author-email: Pietro Zullo <pietro.zullo@gmail.com>
6
6
  License: MIT
@@ -15,14 +15,16 @@ 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: authlib>=1.6.3
18
19
  Requires-Dist: jsonschema-pydantic>=0.1.0
19
20
  Requires-Dist: langchain>=0.1.0
20
21
  Requires-Dist: mcp>=1.10.0
21
22
  Requires-Dist: posthog>=4.8.0
22
- Requires-Dist: pydantic>=2.0.0
23
+ Requires-Dist: pydantic-core==2.33.2
24
+ Requires-Dist: pydantic==2.11.10
23
25
  Requires-Dist: python-dotenv>=1.0.0
24
26
  Requires-Dist: scarf-sdk>=0.1.0
25
- Requires-Dist: websockets>=12.0
27
+ Requires-Dist: websockets>=15.0
26
28
  Provides-Extra: anthropic
27
29
  Requires-Dist: langchain-anthropic; extra == 'anthropic'
28
30
  Provides-Extra: dev
@@ -52,12 +54,6 @@ Description-Content-Type: text/markdown
52
54
  </picture>
53
55
  </div>
54
56
 
55
- <div align="center">
56
- <h2>🎉 <strong>We're LIVE on Product Hunt!</strong> 🎉</h2>
57
- <p><strong>Support us today and help us reach #1!</strong></p>
58
- <a href="https://www.producthunt.com/products/mcp-use?embed=true&utm_source=badge-featured&utm_medium=badge&utm_source=badge-mcp&#0045;use" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1002629&theme=neutral&t=1754609432704" alt="mcp&#0045;use - Open&#0032;source&#0032;SDK&#0032;and&#0032;infra&#0032;for&#0032;MCP&#0032;servers&#0032;&#0038;&#0032;agents | Product Hunt" style="width: 220px; height: 54px;" width="250" height="54" /></a>
59
- <p>👆 <em>Click to upvote and leave a comment!</em></p>
60
- </div>
61
57
 
62
58
  <h1 align="center">🚀 Create MCP Clients and Agents</h1>
63
59
  <p align="center">
@@ -96,7 +92,7 @@ Description-Content-Type: text/markdown
96
92
 
97
93
  | Supports | |
98
94
  | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
99
- | **Primitives** | [![Tools](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-tools&label=Tools&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Resources](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-resources&label=Resources&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Prompts](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-prompts&label=Prompts&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Sampling](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-sampling&label=Sampling&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Elicitation](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-elicitation&label=Elicitation&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) |
95
+ | **Primitives** | [![Tools](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-tools&label=Tools&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Resources](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-resources&label=Resources&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Prompts](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-prompts&label=Prompts&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Sampling](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-sampling&label=Sampling&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Elicitation](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-elicitation&label=Elicitation&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Authentication](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-authentication&label=Authentication&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) |
100
96
  | **Transports** | [![Stdio](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=transport-stdio&label=Stdio&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![SSE](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=transport-sse&label=SSE&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Streamable HTTP](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=transport-streamableHttp&label=Streamable%20HTTP&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) |
101
97
 
102
98
  ## Features
@@ -254,14 +250,14 @@ For other settings, models, and more, check out the documentation.
254
250
 
255
251
  ## Streaming Agent Output
256
252
 
257
- MCP-Use supports asynchronous streaming of agent output using the `astream` method on `MCPAgent`. This allows you to receive incremental results, tool actions, and intermediate steps as they are generated by the agent, enabling real-time feedback and progress reporting.
253
+ MCP-Use supports asynchronous streaming of agent output using the `stream` method on `MCPAgent`. This allows you to receive incremental results, tool actions, and intermediate steps as they are generated by the agent, enabling real-time feedback and progress reporting.
258
254
 
259
255
  ### How to use
260
256
 
261
- Call `agent.astream(query)` and iterate over the results asynchronously:
257
+ Call `agent.stream(query)` and iterate over the results asynchronously:
262
258
 
263
259
  ```python
264
- async for chunk in agent.astream("Find the best restaurant in San Francisco"):
260
+ async for chunk in agent.stream("Find the best restaurant in San Francisco"):
265
261
  print(chunk["messages"], end="", flush=True)
266
262
  ```
267
263
 
@@ -281,7 +277,7 @@ async def main():
281
277
  client = MCPClient.from_config_file("browser_mcp.json")
282
278
  llm = ChatOpenAI(model="gpt-4o")
283
279
  agent = MCPAgent(llm=llm, client=client, max_steps=30)
284
- async for chunk in agent.astream("Look for job at nvidia for machine learning engineer."):
280
+ async for chunk in agent.stream("Look for job at nvidia for machine learning engineer."):
285
281
  print(chunk["messages"], end="", flush=True)
286
282
 
287
283
  if __name__ == "__main__":
@@ -838,31 +834,31 @@ Thanks to all our amazing contributors!
838
834
  </tr>
839
835
  <tr>
840
836
  <td><img src="https://avatars.githubusercontent.com/u/38653995?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/patchy631/ai-engineering-hub"><strong>patchy631/ai-engineering-hub</strong></a></td>
841
- <td>⭐ 17384</td>
842
- </tr>
843
- <tr>
844
- <td><img src="https://avatars.githubusercontent.com/u/170207473?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/tavily-ai/meeting-prep-agent"><strong>tavily-ai/meeting-prep-agent</strong></a></td>
845
- <td>⭐ 131</td>
837
+ <td>⭐ 18021</td>
846
838
  </tr>
847
839
  <tr>
848
840
  <td><img src="https://avatars.githubusercontent.com/u/164294848?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/buildfastwithai/gen-ai-experiments"><strong>buildfastwithai/gen-ai-experiments</strong></a></td>
849
- <td>⭐ 100</td>
841
+ <td>⭐ 202</td>
850
842
  </tr>
851
843
  <tr>
852
844
  <td><img src="https://avatars.githubusercontent.com/u/187057607?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/hud-evals/hud-python"><strong>hud-evals/hud-python</strong></a></td>
853
- <td>⭐ 78</td>
845
+ <td>⭐ 168</td>
846
+ </tr>
847
+ <tr>
848
+ <td><img src="https://avatars.githubusercontent.com/u/170207473?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/tavily-ai/meeting-prep-agent"><strong>tavily-ai/meeting-prep-agent</strong></a></td>
849
+ <td>⭐ 138</td>
854
850
  </tr>
855
851
  <tr>
856
852
  <td><img src="https://avatars.githubusercontent.com/u/20041231?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/krishnaik06/MCP-CRASH-Course"><strong>krishnaik06/MCP-CRASH-Course</strong></a></td>
857
- <td>⭐ 64</td>
853
+ <td>⭐ 74</td>
858
854
  </tr>
859
855
  <tr>
860
856
  <td><img src="https://avatars.githubusercontent.com/u/54944174?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/larksuite/lark-samples"><strong>larksuite/lark-samples</strong></a></td>
861
- <td>⭐ 35</td>
857
+ <td>⭐ 40</td>
862
858
  </tr>
863
859
  <tr>
864
860
  <td><img src="https://avatars.githubusercontent.com/u/892404?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/truemagic-coder/solana-agent-app"><strong>truemagic-coder/solana-agent-app</strong></a></td>
865
- <td>⭐ 30</td>
861
+ <td>⭐ 29</td>
866
862
  </tr>
867
863
  <tr>
868
864
  <td><img src="https://avatars.githubusercontent.com/u/8344498?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/schogini/techietalksai"><strong>schogini/techietalksai</strong></a></td>
@@ -874,7 +870,7 @@ Thanks to all our amazing contributors!
874
870
  </tr>
875
871
  <tr>
876
872
  <td><img src="https://avatars.githubusercontent.com/u/100749943?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/Deniscartin/mcp-cli"><strong>Deniscartin/mcp-cli</strong></a></td>
877
- <td>⭐ 19</td>
873
+ <td>⭐ 20</td>
878
874
  </tr>
879
875
  </table>
880
876
 
@@ -7,12 +7,6 @@
7
7
  </picture>
8
8
  </div>
9
9
 
10
- <div align="center">
11
- <h2>🎉 <strong>We're LIVE on Product Hunt!</strong> 🎉</h2>
12
- <p><strong>Support us today and help us reach #1!</strong></p>
13
- <a href="https://www.producthunt.com/products/mcp-use?embed=true&utm_source=badge-featured&utm_medium=badge&utm_source=badge-mcp&#0045;use" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1002629&theme=neutral&t=1754609432704" alt="mcp&#0045;use - Open&#0032;source&#0032;SDK&#0032;and&#0032;infra&#0032;for&#0032;MCP&#0032;servers&#0032;&#0038;&#0032;agents | Product Hunt" style="width: 220px; height: 54px;" width="250" height="54" /></a>
14
- <p>👆 <em>Click to upvote and leave a comment!</em></p>
15
- </div>
16
10
 
17
11
  <h1 align="center">🚀 Create MCP Clients and Agents</h1>
18
12
  <p align="center">
@@ -51,7 +45,7 @@
51
45
 
52
46
  | Supports | |
53
47
  | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
54
- | **Primitives** | [![Tools](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-tools&label=Tools&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Resources](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-resources&label=Resources&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Prompts](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-prompts&label=Prompts&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Sampling](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-sampling&label=Sampling&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Elicitation](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-elicitation&label=Elicitation&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) |
48
+ | **Primitives** | [![Tools](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-tools&label=Tools&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Resources](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-resources&label=Resources&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Prompts](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-prompts&label=Prompts&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Sampling](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-sampling&label=Sampling&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Elicitation](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-elicitation&label=Elicitation&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Authentication](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=primitive-authentication&label=Authentication&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) |
55
49
  | **Transports** | [![Stdio](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=transport-stdio&label=Stdio&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![SSE](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=transport-sse&label=SSE&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) [![Streamable HTTP](https://img.shields.io/github/actions/workflow/status/pietrozullo/mcp-use/tests.yml?job=transport-streamableHttp&label=Streamable%20HTTP&style=flat)](https://github.com/pietrozullo/mcp-use/actions/workflows/tests.yml) |
56
50
 
57
51
  ## Features
@@ -209,14 +203,14 @@ For other settings, models, and more, check out the documentation.
209
203
 
210
204
  ## Streaming Agent Output
211
205
 
212
- MCP-Use supports asynchronous streaming of agent output using the `astream` method on `MCPAgent`. This allows you to receive incremental results, tool actions, and intermediate steps as they are generated by the agent, enabling real-time feedback and progress reporting.
206
+ MCP-Use supports asynchronous streaming of agent output using the `stream` method on `MCPAgent`. This allows you to receive incremental results, tool actions, and intermediate steps as they are generated by the agent, enabling real-time feedback and progress reporting.
213
207
 
214
208
  ### How to use
215
209
 
216
- Call `agent.astream(query)` and iterate over the results asynchronously:
210
+ Call `agent.stream(query)` and iterate over the results asynchronously:
217
211
 
218
212
  ```python
219
- async for chunk in agent.astream("Find the best restaurant in San Francisco"):
213
+ async for chunk in agent.stream("Find the best restaurant in San Francisco"):
220
214
  print(chunk["messages"], end="", flush=True)
221
215
  ```
222
216
 
@@ -236,7 +230,7 @@ async def main():
236
230
  client = MCPClient.from_config_file("browser_mcp.json")
237
231
  llm = ChatOpenAI(model="gpt-4o")
238
232
  agent = MCPAgent(llm=llm, client=client, max_steps=30)
239
- async for chunk in agent.astream("Look for job at nvidia for machine learning engineer."):
233
+ async for chunk in agent.stream("Look for job at nvidia for machine learning engineer."):
240
234
  print(chunk["messages"], end="", flush=True)
241
235
 
242
236
  if __name__ == "__main__":
@@ -793,31 +787,31 @@ Thanks to all our amazing contributors!
793
787
  </tr>
794
788
  <tr>
795
789
  <td><img src="https://avatars.githubusercontent.com/u/38653995?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/patchy631/ai-engineering-hub"><strong>patchy631/ai-engineering-hub</strong></a></td>
796
- <td>⭐ 17384</td>
797
- </tr>
798
- <tr>
799
- <td><img src="https://avatars.githubusercontent.com/u/170207473?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/tavily-ai/meeting-prep-agent"><strong>tavily-ai/meeting-prep-agent</strong></a></td>
800
- <td>⭐ 131</td>
790
+ <td>⭐ 18021</td>
801
791
  </tr>
802
792
  <tr>
803
793
  <td><img src="https://avatars.githubusercontent.com/u/164294848?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/buildfastwithai/gen-ai-experiments"><strong>buildfastwithai/gen-ai-experiments</strong></a></td>
804
- <td>⭐ 100</td>
794
+ <td>⭐ 202</td>
805
795
  </tr>
806
796
  <tr>
807
797
  <td><img src="https://avatars.githubusercontent.com/u/187057607?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/hud-evals/hud-python"><strong>hud-evals/hud-python</strong></a></td>
808
- <td>⭐ 78</td>
798
+ <td>⭐ 168</td>
799
+ </tr>
800
+ <tr>
801
+ <td><img src="https://avatars.githubusercontent.com/u/170207473?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/tavily-ai/meeting-prep-agent"><strong>tavily-ai/meeting-prep-agent</strong></a></td>
802
+ <td>⭐ 138</td>
809
803
  </tr>
810
804
  <tr>
811
805
  <td><img src="https://avatars.githubusercontent.com/u/20041231?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/krishnaik06/MCP-CRASH-Course"><strong>krishnaik06/MCP-CRASH-Course</strong></a></td>
812
- <td>⭐ 64</td>
806
+ <td>⭐ 74</td>
813
807
  </tr>
814
808
  <tr>
815
809
  <td><img src="https://avatars.githubusercontent.com/u/54944174?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/larksuite/lark-samples"><strong>larksuite/lark-samples</strong></a></td>
816
- <td>⭐ 35</td>
810
+ <td>⭐ 40</td>
817
811
  </tr>
818
812
  <tr>
819
813
  <td><img src="https://avatars.githubusercontent.com/u/892404?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/truemagic-coder/solana-agent-app"><strong>truemagic-coder/solana-agent-app</strong></a></td>
820
- <td>⭐ 30</td>
814
+ <td>⭐ 29</td>
821
815
  </tr>
822
816
  <tr>
823
817
  <td><img src="https://avatars.githubusercontent.com/u/8344498?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/schogini/techietalksai"><strong>schogini/techietalksai</strong></a></td>
@@ -829,7 +823,7 @@ Thanks to all our amazing contributors!
829
823
  </tr>
830
824
  <tr>
831
825
  <td><img src="https://avatars.githubusercontent.com/u/100749943?s=40&v=4" width="20" height="20" style="vertical-align: middle; margin-right: 8px;"> <a href="https://github.com/Deniscartin/mcp-cli"><strong>Deniscartin/mcp-cli</strong></a></td>
832
- <td>⭐ 19</td>
826
+ <td>⭐ 20</td>
833
827
  </tr>
834
828
  </table>
835
829
 
@@ -40,7 +40,8 @@ The `LangChainAdapter` is a powerful component that converts MCP tools to LangCh
40
40
 
41
41
  Here's a simple example of creating a custom agent using the LangChain adapter:
42
42
 
43
- ```python
43
+ <CodeGroup>
44
+ ```python Python
44
45
  import asyncio
45
46
  from langchain_openai import ChatOpenAI
46
47
  from langchain.agents import AgentExecutor, create_tool_calling_agent
@@ -84,14 +85,66 @@ if __name__ == "__main__":
84
85
  asyncio.run(main())
85
86
  ```
86
87
 
88
+ ```typescript TypeScript
89
+ import { ChatOpenAI } from '@langchain/openai'
90
+ import { AgentExecutor, createToolCallingAgent } from 'langchain/agents'
91
+ import { ChatPromptTemplate, MessagesPlaceholder } from '@langchain/core/prompts'
92
+ import { MCPClient, LangChainAdapter, loadConfigFile } from 'mcp-use'
93
+
94
+ async function main() {
95
+ // Initialize the MCP client
96
+ const config = await loadConfigFile('path/to/config.json')
97
+ const client = new MCPClient(config)
98
+
99
+ // Create adapter instance
100
+ const adapter = new LangChainAdapter()
101
+
102
+ // Get LangChain tools directly from the client with a single line
103
+ const tools = await adapter.createTools(client)
104
+
105
+ // Initialize your language model
106
+ const llm = new ChatOpenAI({ model: 'gpt-4o' })
107
+
108
+ // Create a prompt template
109
+ const prompt = ChatPromptTemplate.fromMessages([
110
+ ['system', 'You are a helpful assistant with access to powerful tools.'],
111
+ new MessagesPlaceholder('chat_history'),
112
+ ['human', '{input}'],
113
+ new MessagesPlaceholder('agent_scratchpad'),
114
+ ])
115
+
116
+ // Create the agent
117
+ const agent = createToolCallingAgent({ llm, tools, prompt })
118
+
119
+ // Create the agent executor
120
+ const agentExecutor = new AgentExecutor({ agent, tools, verbose: true })
121
+
122
+ // Run the agent
123
+ const result = await agentExecutor.invoke({ input: 'What can you do?' })
124
+ console.log(result.output)
125
+
126
+ await client.closeAllSessions()
127
+ }
128
+
129
+ main().catch(console.error)
130
+ ```
131
+ </CodeGroup>
132
+
87
133
  <Tip>
88
134
  **One-Line Tool Creation**: The API simplifies tool creation - all you need is to create an adapter instance and call its `create_tools` method:
89
135
 
90
- ```python
136
+ <CodeGroup>
137
+ ```python Python
91
138
  adapter = LangChainAdapter()
92
139
  tools = await adapter.create_tools(client)
93
140
  ```
94
141
 
142
+ ```typescript TypeScript
143
+ const adapter = new LangChainAdapter()
144
+ const tools = await adapter.createTools(client)
145
+ ```
146
+ </CodeGroup>
147
+
95
148
  You don't need to worry about sessions, connectors, or initialization. The adapter handles everything for you.
96
149
  </Tip>
97
150
 
@@ -163,7 +216,8 @@ class YourFrameworkAdapter(BaseAdapter):
163
216
 
164
217
  Once you've implemented your adapter, you can use it with the simplified API:
165
218
 
166
- ```python
219
+ <CodeGroup>
220
+ ```python Python
167
221
  from your_module import YourFrameworkAdapter
168
222
  from mcp_use.client import MCPClient
169
223
 
@@ -180,37 +234,56 @@ tools = await adapter.create_tools(client)
180
234
  agent = your_framework.create_agent(tools=tools)
181
235
  ```
182
236
 
237
+ ```typescript TypeScript
238
+ import { YourFrameworkAdapter } from './your-module'
239
+ import { MCPClient, loadConfigFile } from 'mcp-use'
240
+
241
+ // Initialize the client
242
+ const config = await loadConfigFile('config.json')
243
+ const client = new MCPClient(config)
244
+
245
+ // Create an adapter instance
246
+ const adapter = new YourFrameworkAdapter()
247
+
248
+ // Get tools with a single line
249
+ const tools = await adapter.createTools(client)
250
+
251
+ // Use the tools with your framework
252
+ const agent = yourFramework.createAgent({ tools })
253
+ ```
254
+ </CodeGroup>
255
+
183
256
  ### Tips for Implementing an Adapter
184
257
 
185
- <Accordion title="Implementation Guidelines">
186
- <AccordionItem title="Schema Conversion">
258
+ <AccordionGroup>
259
+ <Accordion title="Schema Conversion">
187
260
  Most frameworks have their own way of handling argument schemas. You'll need to convert the MCP tool's JSON Schema to your framework's format.
188
261
 
189
262
  <Tip>
190
263
  Look at the LangChain adapter implementation as a reference for handling schema conversion patterns.
191
264
  </Tip>
192
- </AccordionItem>
265
+ </Accordion>
193
266
 
194
- <AccordionItem title="Tool Execution">
267
+ <Accordion title="Tool Execution">
195
268
  When a tool is called in your framework, you'll need to pass the call to the connector's `call_tool` method and handle the result.
196
269
 
197
270
  <Warning>
198
271
  Always ensure proper async/await handling when calling MCP tools, as they are inherently asynchronous.
199
272
  </Warning>
200
- </AccordionItem>
273
+ </Accordion>
201
274
 
202
- <AccordionItem title="Result Parsing">
275
+ <Accordion title="Result Parsing">
203
276
  MCP tools return structured data with types like text, images, or embedded resources. Your adapter should parse these into a format your framework understands.
204
- </AccordionItem>
277
+ </Accordion>
205
278
 
206
- <AccordionItem title="Error Handling">
279
+ <Accordion title="Error Handling">
207
280
  Ensure your adapter handles errors gracefully, both during tool conversion and execution.
208
281
 
209
282
  <Note>
210
283
  The base adapter provides logging utilities to help with error reporting and debugging.
211
284
  </Note>
212
- </AccordionItem>
213
- </Accordion>
285
+ </Accordion>
286
+ </AccordionGroup>
214
287
 
215
288
 
216
289
  ## Conclusion
@@ -57,7 +57,8 @@ There are two primary ways to enable debug mode:
57
57
  Programmatic control is useful for debugging specific parts of your application or conditionally enabling debug mode based on your application state.
58
58
  </Note>
59
59
 
60
- ```python
60
+ <CodeGroup>
61
+ ```python Python
61
62
  import mcp_use
62
63
 
63
64
  # Different debug levels
@@ -66,16 +67,36 @@ mcp_use.set_debug(2) # DEBUG level (full verbose output)
66
67
  mcp_use.set_debug(0) # Turn off debug (WARNING level)
67
68
  ```
68
69
 
70
+ ```typescript TypeScript
71
+ import { logger } from 'mcp-use'
72
+
73
+ // Set the logger level
74
+ logger.level = 'info' // INFO level
75
+ logger.level = 'debug' // DEBUG level (full verbose output)
76
+ logger.level = 'warn' // Turn off debug (WARNING level)
77
+ ```
78
+ </CodeGroup>
79
+
69
80
  <Tip>
70
81
  You can conditionally enable debugging based on environment or configuration:
71
82
 
72
- ```python
83
+ <CodeGroup>
84
+ ```python Python
73
85
  import os
74
86
  import mcp_use
75
87
 
76
88
  if os.getenv("ENVIRONMENT") == "development":
77
89
  mcp_use.set_debug(2)
78
90
  ```
91
+
92
+ ```typescript TypeScript
93
+ import { logger } from 'mcp-use'
94
+
95
+ if (process.env.ENVIRONMENT === 'development') {
96
+ logger.level = 'debug'
97
+ }
98
+ ```
99
+ </CodeGroup>
79
100
  </Tip>
80
101
 
81
102
  ## Debug Levels
@@ -110,7 +131,8 @@ if os.getenv("ENVIRONMENT") == "development":
110
131
 
111
132
  If you only want to increase verbosity for the agent component without enabling full debug mode for the entire package, you can use the `verbose` parameter when creating an MCPAgent:
112
133
 
113
- ```python
134
+ <CodeGroup>
135
+ ```python Python
114
136
  from mcp_use import MCPAgent
115
137
 
116
138
  # Create agent with increased verbosity
@@ -121,6 +143,18 @@ agent = MCPAgent(
121
143
  )
122
144
  ```
123
145
 
146
+ ```typescript TypeScript
147
+ import { MCPAgent } from 'mcp-use'
148
+
149
+ // Create agent with increased verbosity
150
+ const agent = new MCPAgent({
151
+ llm: yourLlm,
152
+ client: yourClient,
153
+ verbose: true // Only shows debug messages from the agent
154
+ })
155
+ ```
156
+ </CodeGroup>
157
+
124
158
  This option is useful when you want to see the agent's steps and decision-making process without all the low-level debug information from other components.
125
159
 
126
160
  ## Debug Information