mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 16:48:30 +00:00
The LLM was not seeing MCP tools when using standalone agent execution (without Crew) because the prepare_tools function in agent/utils.py did not inject MCP tools. Changes: - Modified prepare_tools() in agent/utils.py to inject MCP tools when agent.mcps is configured, with graceful error handling - Fixed Agent.kickoff_async() to inject MCP tools like kickoff() does - Added comprehensive tests for MCP tool injection in prepare_tools The fix ensures MCP tools are visible to the LLM in both: 1. Standalone agent execution via execute_task/aexecute_task 2. Async agent execution via kickoff_async Co-Authored-By: João <joao@crewai.com>