Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

MCP Servers

Haystack Enterprise Platform offers an MCP server that gives your AI assistant access to the platform. You can also use your services as MCP tools, so that AI assistants can call them.


What Do You Want to Do?​

I want to…UseLearn more
Build, debug, and operate pipelines, indexes, and services from my AI assistant or coding agentThe Haystack Platform MCP serverConnect to the Haystack Platform MCP Server
Let AI assistants call my services as toolsA Gateway MCP serverUse Your Services as MCP Tools

Building an AI application and using it are different jobs, which is why they use different MCP servers. The Haystack Platform MCP server gives access to the whole platform, including tools that change or delete resources. A Gateway MCP server only exposes the services you choose. You can use both from the same client.

What the Haystack Platform MCP Server Does​

The Haystack Platform MCP server lets your coding agent work with Haystack Enterprise Platform the way you do in the UI. Use it to ask your agent to create a pipeline, find out why a pipeline returned a particular answer, or check what a service costs.

The server is hosted by deepset, so you don't install anything. You connect your agent to the server URL and sign in.

With the Haystack Platform MCP server, your agent can work with:

  • Pipelines: create, validate, deploy, search, read logs, and debug.
  • Pipeline versions: list, create, update, and restore.
  • Indexes: create, validate, deploy, and update.
  • Services (deployments) and their revisions, tags, metrics, and activity.
  • Search history and traces, to inspect a run step by step. To look up a single trace, give your agent the trace ID from the UI or the query ID.
  • Pipeline and index templates.
  • Components and custom components: list them, read their parameters, and run them.
  • Evaluation: datasets, evaluators, and experiments.
  • Costs and token usage.
  • Organizations (with OAuth), workspaces, models, and secrets.
  • The platform documentation.

Your agent can only do what your permissions allow.

tip

Ask your agent to list the available tools. The set of tools grows over time.

For setup instructions, see Connect to the Haystack Platform MCP Server.

Using Your Services as MCP Tools​

A Gateway MCP server exposes your services as tools. An AI assistant that connects to it, such as Claude Code or Cursor, can call your services and use the results in its own answers. For example, a RAG service that answers questions about your internal documents can become a tool in your assistant.

A service is the stable endpoint under which a pipeline runs, so a pipeline must be published as a service first. You then turn on each service you want to expose as a tool. The server URL stays the same when you publish a new pipeline version to the service.

A Gateway MCP server is for assistants and agents. It returns each answer in one piece and doesn't stream. For streaming in your own application, use the REST API.

For setup instructions, see Use Your Services as MCP Tools.

Authentication​

You can sign in to the Haystack Platform MCP server and to a Gateway MCP server in these ways:

  • OAuth with dynamic client registration (DCR): Your MCP client registers itself, opens a browser window, and you sign in with your Haystack Platform user account. You don't need to create an API key. This is the recommended method.
  • API key: Send an API key as a bearer token. Use this for automation or for clients that don't support OAuth.

Organizations​

With OAuth, you can use your account with all organizations it belongs to. An API key belongs to a single organization, so it only gives access to that organization. To work with another organization, use a key from that organization or sign in with OAuth.

  • Haystack Platform MCP server: Your agent can list your organizations and passes the organization to each tool call. You can tell the agent which organization to use.
  • Gateway MCP server: If you belong to several organizations, add the X-Organization-ID header when you add the server to your client. For details, see Connect with OAuth.

To find an organization ID, see Find Your Organization ID.