Skip to content

[mcp] Cannot use multiple MCP servers (MCPToolSets) with Agent #2369

@tstadel

Description

@tstadel

Describe the bug
Maybe I'm missing something but from the definition of Agent's tools init param, one can pass only a list of Tool or one ToolSet. For MCP servers we have MCPToolSet. So we can only use one MCPServer. This is a heavy limitation if you want to use, e.g. github MCP server and gmail MCP server together.

Agent's tool definition:
https://github.com/deepset-ai/haystack/blob/2a27e0d13193fd3910600ef2cbda21cabc2da659/haystack/components/agents/agent.py#L100

MCPToolSet:

To Reproduce

Describe your environment (please complete the following information):

  • OS: [e.g. iOS]
  • Haystack version: 2.18.0
  • Integration version: 0.7.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions