Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

vblagoje
Copy link
Member

Why:

Separates pipeline validation from MCP server connection. Allows pipelines to validate successfully without requiring server connectivity, then connect during pipeline warm_up.

Keep in draft stage until deepset-ai/haystack#9856 is merge and Haystack 2.19 released.

What:

  • Added eager_connect parameter to MCPTool and MCPToolset (defaults to True)
  • Implemented _ensure_connected() with thread-safe lazy initialization
  • Added warm_up() methods for connecting during pipeline warm_up phase

How can it be used:

# Validate pipeline without connecting to MCP server
tool = MCPTool(name="add", server_info=info, eager_connect=False)
pipeline.add_component("invoker", ToolInvoker(tools=[tool]))  # ✓ Validates

# Connect during pipeline warm_up
pipeline.run()  # triggers tool.warm_up() → connects to server

How did you test it:

  • Test verifies permissive schema → strict schema transition on first use
  • Confirmed backward compatibility (eager_connect=True by default)
  • Tested with itinerary agent

Notes for the reviewer:

  • Placeholder schema allows validation; strict schema loaded post-connection
  • warm_up() is idempotent

@github-actions github-actions bot added integration:mcp type:documentation Improvements or additions to documentation labels Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:mcp type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.