Connect to the Haystack Platform MCP Server
Connect your coding agent to the Haystack Platform MCP server to manage and debug Haystack Enterprise Platform pipelines, indexes, and services.
About This Task
The Haystack Platform MCP server is hosted by deepset. You don't install or run anything locally. For what the server can do, see MCP Servers.
The examples use the European cloud, https://api.cloud.deepset.ai. If you use the US cloud, replace the host with api.us.deepset.ai.
You can sign in with your Haystack Platform user account (OAuth) or use an API key.
| OAuth | API key | |
|---|---|---|
| Sign-in | In the browser, with your user account | None. The key goes in the request header. |
| Organizations | All organizations your account belongs to | The organization the key belongs to |
| Workspaces | All workspaces you can access | The workspaces the key can access |
Prerequisites
- A Haystack Platform account.
- An MCP client, such as Claude Code or Cursor.
- For API key authentication: an API key. For safety, use a workspace-scoped key. Your agent can see and list only the workspaces the key can access. For instructions, see Generate an API Key.
Connect with OAuth
Claude Code
-
Add the server:
claude mcp add --transport http haystack-platform https://api.cloud.deepset.ai/mcp -
In Claude Code, run
/mcp, select haystack-platform, and choose Authenticate. A browser window opens. -
Sign in with your Haystack Platform account and approve the access.
The tools of the server are now available in Claude Code. To make the server available in all your projects, add --scope user to the command.
Other Clients
Most MCP clients that support remote servers with OAuth work with the server URL alone:
https://api.cloud.deepset.ai/mcp
Add it in your client's MCP settings as a remote server with the Streamable HTTP transport, then follow the sign-in prompt. For Cursor, add the server to .cursor/mcp.json:
{
"mcpServers": {
"haystack-platform": {
"url": "https://api.cloud.deepset.ai/mcp"
}
}
}
Connect with an API Key
Use this method if your client doesn't support OAuth, or for automation. Pass the key as a bearer token.
For Claude Code:
claude mcp add --transport http haystack-platform https://api.cloud.deepset.ai/mcp \
--header "Authorization: Bearer <your-api-key>"
For Cursor:
{
"mcpServers": {
"haystack-platform": {
"url": "https://api.cloud.deepset.ai/mcp",
"headers": {
"Authorization": "Bearer <your-api-key>"
}
}
}
}
Treat the API key like a password. Don't commit configuration files that contain it to version control.
Work with Multiple Organizations
If your account belongs to several organizations and you signed in with OAuth, tell your agent which organization to use, for example: "In the organization Acme, list the pipelines in the workspace production." The server has a tool that lists your organizations, and the agent passes the organization ID to the other tools.
With an API key, the server only gives access to the organization the key belongs to. To work with another organization, add the server again with a key from that organization, under a different name.
Verify the Connection
Ask your agent: "List my workspaces in Haystack Platform." If the agent returns your workspaces, the connection works.
Troubleshooting
- The sign-in window doesn't open: Run
/mcpin Claude Code and authenticate again, or remove the server withclaude mcp remove haystack-platformand add it again. - The agent can't see a workspace: With an API key, check that the key has access to the workspace. With OAuth, check that your account has a role in that workspace.
- A tool fails with a permission error: The tools use your permissions. Ask a workspace admin for the required role.
- The agent works with the wrong organization: Name the organization in your request, or use an API key from the right organization.
Related Information
Was this page helpful?