Description
when I use mcp like this
sandbox_agent = Agent(
role="…",
goal="…",
backstory="…",
mcps=[
MCPServerHTTP(
url="http://localhost:8022/mcp",
)
],
)
mcp will not load. I check the source code at crewai/agent/core.py ,
if mcps and self.tools is not None:
self.tools.extend(mcps)
Steps to Reproduce
use mcps but tools is None
Expected behavior
can just use mcps
Screenshots/Code snippets
above
Operating System
macOS Ventura
Python Version
3.10
crewAI Version
1.7.2
crewAI Tools Version
1.7.2
Virtual Environment
Venv
Evidence
if mcps and self.tools is not None:
self.tools.extend(mcps)
Possible Solution
when tools is None, let it []
Additional context
no more