Add autouse fixture to isolate CREWAI_STORAGE_DIR in MCP test modules.
This prevents any potential interference with other tests that use the same storage directory.
Co-Authored-By: João <joao@crewai.com>
Remove terminate_on_close parameter from sse_client call in SSETransport.
This parameter is only valid for streamable HTTP transport, not for SSE transport.
Fixes#3938
Changes:
- Remove terminate_on_close=True from sse_client() call in SSETransport.connect()
- Add comprehensive unit tests for SSETransport that mock sse_client and verify correct parameters
- Add error-path tests to ensure Agent._get_native_mcp_tools raises proper RuntimeError instead of UnboundLocalError when connection fails
Co-Authored-By: João <joao@crewai.com>
- Enhanced the MCP tool execution in both synchronous and asynchronous contexts by utilizing for better event loop management.
- Updated error handling to provide clearer messages for connection issues and task cancellations.
- Added tests to validate MCP tool execution in both sync and async scenarios, ensuring robust functionality across different contexts.
* WIP transport support mcp
* refactor: streamline MCP tool loading and error handling
* linted
* Self type from typing with typing_extensions in MCP transport modules
* added tests for mcp setup
* added tests for mcp setup
* docs: enhance MCP overview with detailed integration examples and structured configurations
* feat: implement MCP event handling and logging in event listener and client
- Added MCP event types and handlers for connection and tool execution events.
- Enhanced MCPClient to emit events on connection status and tool execution.
- Updated ConsoleFormatter to handle MCP event logging.
- Introduced new MCP event types for better integration and monitoring.