How to integrate multiple MCP servers with CrewAI

Hey Nahum, welcome!

Taking a look at the official Python documentation, you should be able to nest the with statements, maybe something like this:

with MCPServerAdapter1(server_params1) as tools1, MCPServerAdapter2(server_params2) as tools2:
    # Combine the tools from both adapters
    all_tools = [*tools1, *tools2]

    agent = Agent(
        role="Role",
        goal="Goal",
        backstory="Backstory",
        tools=all_tools, # 👈 Pass the combined list of tools here
        verbose=True
    )

Full disclosure, I haven’t tested this exact approach, but I’ve used something similar to mix MCP tools with standard CrewAI tools over in this other thread.