> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sazabi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Elastic Cloud

> Give the Sazabi agent tools to search Elasticsearch indices and query Agent Builder tools from your Kibana-hosted MCP endpoint.

[All Elastic Cloud integration capabilities](https://docs.sazabi.com/catalogs/integrations/elastic-cloud)

## About

This is an MCP connector that gives the Sazabi agent tools from Elastic Cloud's built-in MCP server, hosted at `/api/agent_builder/mcp` on your Kibana instance. Sazabi connects using an Elastic API key, which it stores securely and sends as the `Authorization` header to your Kibana-based MCP endpoint. Because the server URL comes from your own Kibana deployment, you supply the Kibana base URL and Sazabi builds the full endpoint.

**What the agent can do:**

* Search Elasticsearch indices using full Query DSL
* List available indices and retrieve field mappings
* Fetch documents by ID
* Call custom Agent Builder tools you have defined in Kibana
* Analyze logs, metrics, and traces stored in Elasticsearch

## Prerequisites

* An Elastic Cloud account on version 9.2+ or a Serverless project
* Agent Builder enabled in your Kibana AI Assistant configuration
* Your Kibana base URL. Go to [Elastic Cloud deployments](https://cloud.elastic.co/deployments), open the deployment you want to connect, open Kibana, then copy the Kibana base URL from the browser.
* An Elastic API key with the following privileges:
  * Kibana application: `feature_agentBuilder.read` and `feature_actions.read` on `kibana-.kibana`
  * Cluster: `monitor_inference`
  * Index: `read` and `view_index_metadata` on the indices you want agents to access

## Set up in the dashboard

Configure connectors in the dashboard under [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

**Step 1**

### Open the connector

Find Elastic Cloud in [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

**Step 2**

### Add your key

Sazabi needs two values:

1. **Kibana URL** — Go to [Elastic Cloud deployments](https://cloud.elastic.co/deployments), open the deployment you want to connect, then open Kibana and copy the Kibana base URL from the browser. If your Kibana URL contains `/s/<space>/`, note the space name for the optional Kibana space field.

2. **Elastic API key** — In Kibana, go to **Stack Management > API keys** and create an API key with the Agent Builder MCP server privileges listed in the prerequisites. Copy the generated key.

Sazabi stores the key securely and sends it as the `Authorization` header to Elastic Cloud's hosted MCP endpoint, built from your Kibana base URL as `<kibana-url>/api/agent_builder/mcp`.

## Set up with the CLI

Elastic Cloud authenticates with an Elastic API key. With the [Sazabi CLI](https://docs.sazabi.com/reference/cli.md) installed and authenticated (see [`sazabi mcp-connectors` reference](https://docs.sazabi.com/reference/cli/mcp-connectors)), connect it in one command, passing the credential as a header. Elastic Cloud has no default server, so `--server-url` names your deployment's MCP endpoint:

```bash theme={"system"}
sazabi mcp-connectors connect elastic-cloud --server-url <your-server-url> --header "Authorization=ApiKey <api-key>"
```

The CLI connects to the MCP server at once and prints the connection with the tools it discovered; a credential the server rejects is reported, and the connection is left needing attention. Use `NAME=@<file>` to read a value from a file, or `--header-file <file.json>` for a JSON object of header names and values. To rotate the stored credentials later, use `sazabi mcp-connectors update-credentials <connection-id>`; find the connection ID with `sazabi mcp-connectors list`.

## Verify

Open the connector's connection page under [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors) and confirm Sazabi lists the tools it discovered. Then, in a thread, ask the agent to search an index and confirm it returns results. If no tools appear, confirm Agent Builder is enabled and the API key has the required privileges.

## Troubleshooting

**No tools discovered** — Confirm Agent Builder is enabled in your Kibana AI Assistant configuration, the API key has the required privileges, and the Kibana URL is correct.

**Connection shows needs attention** — The API key may have expired or been revoked; create a new key and reconnect from [**Settings > MCP connectors**](https://app.sazabi.com/settings/mcp-connectors).

## Further reading

> [card] [Agent tools](https://docs.sazabi.com/guides/investigate/agent-tools.md)
>
> How the agent uses connector tools.

> [card] [MCP connectors](https://docs.sazabi.com/catalogs/mcp-connectors.md)
>
> Browse the connector catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.