Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

fix: load MCP and platform tools when agent tools is None

Greyson LaLondee7f17d228429
diff --git a/lib/crewai/src/crewai/agent/core.py b/lib/crewai/src/crewai/agent/core.py
index 21edbd160..9c9b43c06 100644
--- a/lib/crewai/src/crewai/agent/core.py
+++ b/lib/crewai/src/crewai/agent/core.py
@@ -1156,11 +1156,15 @@ class Agent(BaseAgent):
# Process platform apps and MCP tools
if self.apps:
platform_tools = self.get_platform_tools(self.apps)
- if platform_tools and self.tools is not None:
+ if platform_tools:
+ if self.tools is None:
+ self.tools = []
self.tools.extend(platform_tools)
if self.mcps:
mcps = self.get_mcp_tools(self.mcps)
- if mcps and self.tools is not None:
+ if mcps:
+ if self.tools is None:
+ self.tools = []
self.tools.extend(mcps)
# Prepare tools