AgentcyAlpha
Integrations/Haystack

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.

SETUP
5 STEPS
  1. 01

    Sign up at app.goagentcy.com and create an API key

  2. 02

    Install the integration: pip install haystack-ai mcp-haystack

  3. 03

    Create an MCPTool with StreamableHTTPServerInfo

  4. 04

    Replace YOUR_AGENTCY_API_KEY with your actual key

  5. 05

    Add the tool to a Haystack Agent or pipeline

CONFIG

path: pip install mcp-haystack

python
# 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?"}]
)
Last verified: March 5, 2026Official docs
TIPS

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.

EXAMPLE QUERIES
4 SAMPLES

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

v1.0Need help?