Background
I have analyzed security patterns across 53+ MCP server implementations and found recurring vulnerabilities: command injection, missing auth, path traversal, SSRF, and credential leakage. Many MCP servers expose tools without input/output validation.
Haystack has integrated MCP via Hayhooks (deepset-ai/hayhooks) which runs as an MCP Server exposing pipelines as tools. The typed Pipeline architecture is excellent for data flow validation, but MCP tool execution lacks a runtime verification layer.
Problem Statement
When Haystack pipelines are exposed as MCP tools via Hayhooks:
- Tool inputs from external MCP clients are not verified against pipeline parameter constraints before execution
- Pipeline outputs sent back to MCP clients are not validated
- There is no middleware to enforce security policies on MCP pipeline invocations
This creates risk for enterprise deployments where Haystack pipelines are publicly accessible via MCP.
Proposed Solution
A runtime verification middleware for MCP pipeline execution:
- Define verification rules per pipeline (input validation, output sanitization, execution constraints)
- Hook into Hayhooks MCP server to intercept tool calls before/after pipeline execution
- Log violations and optionally reject non-compliant invocations
Integration points:
- A Hayhooks middleware wrapping pipeline execution
- A custom Haystack Component for MCP security validation
- Integration with Haystack's existing Pipeline.connect() validation at runtime
Implementation Effort
Minimal — adapter layer connecting verification rules to Haystack's pipeline abstraction.
I have published runtime verification on npm (correctover) and would contribute a PR.
Questions
- Is runtime security for MCP-exposed pipelines on the roadmap?
- What is the preferred extension point in Hayhooks for this?
Thank you for the excellent framework.
Background
I have analyzed security patterns across 53+ MCP server implementations and found recurring vulnerabilities: command injection, missing auth, path traversal, SSRF, and credential leakage. Many MCP servers expose tools without input/output validation.
Haystack has integrated MCP via Hayhooks (deepset-ai/hayhooks) which runs as an MCP Server exposing pipelines as tools. The typed Pipeline architecture is excellent for data flow validation, but MCP tool execution lacks a runtime verification layer.
Problem Statement
When Haystack pipelines are exposed as MCP tools via Hayhooks:
This creates risk for enterprise deployments where Haystack pipelines are publicly accessible via MCP.
Proposed Solution
A runtime verification middleware for MCP pipeline execution:
Integration points:
Implementation Effort
Minimal — adapter layer connecting verification rules to Haystack's pipeline abstraction.
I have published runtime verification on npm (correctover) and would contribute a PR.
Questions
Thank you for the excellent framework.