Set up Haystack
Deepset’s LLM orchestration framework. Use mcp-haystack to add Agentcy tools to your Haystack pipelines and agents for marketing data retrieval and analysis.
- 01
Sign up at app.goagentcy.com and create an API key
- 02
Install the integration: pip install haystack-ai mcp-haystack
- 03
Create an MCPTool with StreamableHTTPServerInfo
- 04
Replace YOUR_AGENTCY_API_KEY with your actual key
- 05
Add the tool to a Haystack Agent or pipeline
path: pip install mcp-haystack
# Python — Haystack with MCP
# pip install haystack-ai mcp-haystack
from haystack.tools import MCPTool, StreamableHTTPServerInfo
tool = MCPTool(
name="agentcy",
server_info=StreamableHTTPServerInfo(
url="https://data.goagentcy.com/mcp",
headers={"Authorization": "Bearer YOUR_AGENTCY_API_KEY"},
),
)
# Use in a Haystack pipeline with an agent
from haystack.components.agents import Agent
from haystack.components.generators.chat import OpenAIChatGenerator
agent = Agent(
chat_generator=OpenAIChatGenerator(),
tools=[tool],
)
result = agent.run(
messages=[{"role": "user", "content": "How is my site performing?"}]
)Haystack supports stdio and Streamable HTTP transports via MCPTool. Use MCPToolset to auto-load all tools from an MCP server. Haystack pipelines can also be exposed as MCP servers via Hayhooks. Part of the deepset ecosystem.
“Build a pipeline that combines document retrieval with live marketing data”
“Create an agent that answers questions using GA4 and Search Console”
“Integrate marketing insights into your existing Haystack RAG system”
“Build a multi-step pipeline: fetch data → analyze → generate report”