Commit Graph

380 Commits

Author SHA1 Message Date
pietrozullo 5f79320bd2 simplified example 2025-07-11 10:31:07 -07:00
pietrozullo e0a96dccfc release1.3.6 2025-07-06 21:50:25 -07:00
pietrozullo 864cad8822 fix inexistent variables that shadow errors 2025-07-06 21:23:37 -07:00
pietrozullo bb86cdd986 release1.3.5 2025-07-06 20:57:23 -07:00
pietrozullo 2d9468d256 New release drafter template 2025-07-06 20:56:51 -07:00
Pietro Zullo 44127f8101 remove double init in http connections (#161) 2025-07-06 20:56:11 -07:00
pietrozullo 40fdd6074b release1.3.4 2025-07-06 18:30:41 -07:00
Pietro Zullo e6295ab1f3 fix: Renamed client to client session, fixed bug (#160)
* Renamed client to client session, fixed bug

* Fixed resource access typing
2025-07-06 17:53:26 -07:00
pietrozullo 11fb180e7a fix ensure logic 2025-07-06 17:28:16 -07:00
pietrozullo 01957e4137 Removed artifact 2025-07-06 16:29:27 -07:00
Pietro Zullo c789c317a7 Feat: streaming steps (#159)
* Streaming steps implementation and example

* Changed astream to stream_events for clarity

* docs

* Changed file docsg

* Fixed telemetry
2025-07-05 17:22:31 -07:00
pietrozullo 0127296862 Close stale issues action 2025-07-05 09:59:08 -07:00
Ayush Mandowara 23cf69b74e chore(readme): fix typo (#156)
Signed-off-by: Ayush Mandowara <ayushxx7@gmail.com>
2025-07-05 09:32:11 -07:00
pietrozullo 367945a3eb Remove numpy dep 2025-07-03 20:28:38 -07:00
Pietro Zullo ebea299d1a Remove unused deps (#155) 2025-07-03 20:16:56 -07:00
NandhuKishore24 288b943741 Fixing Disallowed tool issue #62 (#151) 2025-07-03 18:04:21 -07:00
Nilanjan De 41debafd48 Fix typos (#143)
* doc: fix typos

* doc: update CONTRIBUTING.md for installing e2b dependencies for dev install
2025-06-28 19:39:58 -07:00
Luigi Pederzani 422b7f007a fix (#146) 2025-06-27 09:01:37 -07:00
Pietro Zullo 5d1b6264ed Fix/update readme (#144)
* update readme

* Update readme

---------

Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
2025-06-26 20:34:31 -07:00
pietrozullo 1e35e7a720 .io -> .com 2025-06-25 14:32:22 -07:00
pietrozullo 57782f1d8f Update changelog 2025-06-23 16:23:20 -07:00
pietrozullo 02287dda50 Push obs to docs 2025-06-23 13:50:16 -07:00
pietrozullo d9c431a24a release/1.3.3 2025-06-23 12:54:34 -07:00
pietrozullo ac8a6a4102 release/1.3.2-bis 2025-06-23 11:54:19 -07:00
pietrozullo 73e67db3be rollback 2025-06-23 11:53:56 -07:00
pietrozullo a9fb28cd3b Lock fastmcp version to 2.8 2025-06-23 11:50:04 -07:00
pietrozullo 4b8afc2fd5 Fixed and simplified state tracking tests 2025-06-23 11:43:41 -07:00
pietrozullo 739bc61b58 release action does not overwrite body 2025-06-23 11:36:05 -07:00
pietrozullo 2fb656d5c0 Make release depend on tests success 2025-06-23 11:23:04 -07:00
pietrozullo 44e1c007e1 FastAPI to dev deps 2025-06-23 11:03:55 -07:00
pietrozullo 8bd143f6c6 release/1.3.2 2025-06-23 09:48:24 -07:00
Luigi Pederzani 5e7ab23b89 Fix: search tools tuple unpacking error (#138) (#142)
* fix: resolve tuple unpacking error in search_tools when using server manager

Fixes #138 - ValueError: not enough values to unpack (expected 3, got 1)

**Problem:**
When using MCPAgent with use_server_manager=True, users encountered a tuple
unpacking error in search_tools.py. The issue occurred because:
1. ToolSearchEngine.search_tools() sometimes returned a string (when no results)
   and sometimes returned a list of tuples (when results found)
2. SearchToolsTool._arun() expected search_tools() to return a list of tuples
   to pass to format_search_results()
3. When search_tools() returned a string, format_search_results() tried to
   iterate over the string characters, causing the unpacking error

**Solution:**
- Modified ToolSearchEngine.search_tools() to consistently return formatted
  strings by calling a new _format_search_results() method
- Added _format_search_results() method to ToolSearchEngine class
- Updated SearchToolsTool._arun() to return the already-formatted results
  directly instead of calling format_search_results() again
- Updated CLAUDE.md to include virtual environment activation instructions

**Testing:**
- Successfully reproduced the original error
- Verified the fix resolves the issue
- All unit tests pass (113/113)
- Applied code formatting and linting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test: add comprehensive test suite for issue #138 tuple unpacking bug

- test_tool_search_engine_consistent_return_type_with_results: ensures search_tools
  returns string when results are found (not list of tuples as in the bug)
- test_tool_search_engine_consistent_return_type_no_results: ensures search_tools
  returns string when no results found
- test_tool_search_engine_not_indexed_scenario: tests the 'still preparing' scenario
- test_search_tools_tool_arun_with_string_result: tests SearchToolsTool._arun()
  correctly handles string results from search_tools
- test_search_tools_tool_integration_scenario: integration test simulating the
  exact scenario from issue #138 that was causing the tuple unpacking error
- test_format_search_results_method_exists: validates the new _format_search_results method
- test_server_manager_active_server_marking: tests active server marking functionality
- test_search_tools_input_validation: validates ToolSearchInput model

These tests ensure the tuple unpacking bug (ValueError: not enough values to unpack
expected 3, got 1) will not regress in the future and verify the fix works correctly.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: resolve logger mock issues in search_tools tests

Added @patch decorators to mock the logger in tests that call _format_search_results
to avoid TypeError with logging level comparisons during testing.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Update documentation to use session-based API instead of deprecated client methods

- Replace all references to non-existent client.connect_all() with client.create_all_sessions()
- Replace all references to non-existent client.disconnect_all() with client.close_all_sessions()
- Replace all references to client.list_tools() with session.list_tools()
- Replace all references to client.call_tool() with session.call_tool()
- Update API documentation to reflect actual MCPClient implementation
- Fix code examples to use proper session-based architecture
- Ensure all documentation matches the real codebase API

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Improve docs

* remove unused

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-06-21 23:03:04 -07:00
Pietro Zullo 80786eb382 fix: Raise import error for fastembed, server manager does not silently fail (#141)
* Raise import error for fastembed

* add trailing space

A trailing space is missing after 'pip install mcp-use[search]', which causes the concatenated error message to run words together. Please add a space at the end of this string literal to ensure clear messaging.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>

---------

Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-21 22:30:07 -07:00
Ermias Baዩ a3a085f9dd fix: prevent double async cleanup and event loop errors in astream (#133)
* Fix: prevent double async cleanup and event loop errors in astream generator

* update manage_connector as flag for cleanup

Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>

* fix line too long

* lint2

---------

Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
2025-06-21 21:18:44 -07:00
Pietro Zullo 9364d9c853 Create CODE_OF_CONDUCT.md
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
2025-06-21 13:52:31 -07:00
pietrozullo a24b715e77 community docs 2025-06-20 18:16:45 -07:00
pietrozullo cb7383fb97 Discord readme members 2025-06-20 18:16:45 -07:00
Pietro Zullo 2351c072c3 feat: Set default logging level to info (#136)
* Set default debug to 1

* Update docs
2025-06-18 16:22:17 +02:00
pietrozullo 459cf44a83 Fix anthropic and openai deps in pyproject 2025-06-18 15:48:27 +02:00
Pietro Zullo 8a32d3c23c fix: pre commit run all files (#135)
* Set line lenght to 120

* Run pre commit all files
2025-06-18 10:12:58 +02:00
Luigi Pederzani 8aa2861202 feat: Add Scarf telemetry alongside existing PostHog analytics (#134)
* Add scarf telemetry and download tracking

* Remove unused function

---------

Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
2025-06-18 09:45:34 +02:00
Pietro Zullo f6bed01fcb feat: observability (#131)
* Add support for langfuse and laminar observaility layers

* Example env file

* fix: improve observability transparency and documentation

- Add debug logging for package import failures and missing API keys
- Fix documentation to correctly state LANGFUSE_HOST is supported  
- Centralize dotenv loading to avoid multiple calls

Co-authored-by: Pietro Zullo <pietrozullo@users.noreply.github.com>

* Ruff fix

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Pietro Zullo <pietrozullo@users.noreply.github.com>
2025-06-17 21:15:20 +02:00
pietrozullo 296c596ced Change docs dropdowns to tabs 2025-06-16 11:14:44 +02:00
pietrozullo 928620b1ab moved changelog updates to changelog workflow 2025-06-16 10:57:28 +02:00
pietrozullo cd9109b845 Claude code action 2025-06-16 10:47:24 +02:00
pietrozullo 3910aaaaf7 Remove release notes geneeration from publisher 2025-06-16 10:46:43 +02:00
pietrozullo 07d2f2398f Auto release drafting 2025-06-16 10:38:47 +02:00
pietrozullo b246285283 release1.3.1 2025-06-16 10:24:19 +02:00
pietrozullo b585ca96dc Publish action updates changelog 2025-06-16 10:20:05 +02:00
Pietro Zullo e72baf9b8a Claude.md (#126) 2025-06-16 09:59:35 +02:00