---
title: Elastic Agent Builder MCP
description: >-
  Bits queries Elasticsearch logs and telemetry to surface relevant events
  during investigations.
breadcrumbs: Docs > Integrations > Elastic Agent Builder MCP
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Elastic Agent Builder MCP
Integration version1.0.0
{% callout %}
# Important note for users on the following Datadog sites: us2.ddog-gov.com

{% alert level="info" %}
To find out if this integration is available in your organization, see your [Datadog Integrations](https://app.datadoghq.com/integrations) page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [support@ddog-gov.com](mailto:support@ddog-gov.com).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

The Datadog–Elastic Agent Builder integration is an MCP-based integration that enables Datadog to securely access an [Elastic Agent Builder MCP server instance](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/mcp-server). Through this integration, the Bits AI SRE agent is granted access to designated indexes and data sources that are exposed via the available MCP tools.

## Setup{% #setup %}

### Prerequisites{% #prerequisites %}

Your Elastic Agent Builder MCP Server must be hosted on Elastic Cloud or Enterprise and available from the public internet. See the Elastic instructions for [getting started with Elastic Agent Builder](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/get-started).

### Create a Kibana API key{% #create-a-kibana-api-key %}

Follow the Elastic instructions to [create a Kibana API key](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/mcp-server#configuring-mcp-clients).

### Allow Datadog IP addresses to reach your Elastic Agent Builder MCP server{% #allow-datadog-ip-addresses-to-reach-your-elastic-agent-builder-mcp-server %}

If your Elastic deployment uses [IP filtering](https://www.elastic.co/docs/deploy-manage/security/ip-filtering), ensure Datadog IP addresses have been added to the allow list. Retrieve the current Datadog IP addresses from the [Datadog IP ranges endpoint](https://docs.datadoghq.com/api/latest/ip-ranges.md). Use the IP addresses listed under the `webhooks` key in the response.

### Connect your Elastic Agent Builder MCP Server account to Datadog{% #connect-your-elastic-agent-builder-mcp-server-account-to-datadog %}

1. Add your Elastic Agent Builder MCP server URL and Kibana API key
| Parameters                                             | Description                                                                                                                |
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------- |
| Account name                                           | Choose a name that will help you identify this account later.                                                              |
| Elastic Agent Builder MCP Server URL                   | This is the URL for your MCP server. Example: {KIBANA_URL}/api/agent_builder/mcp                                           |
| The Kibana API key used to connect to your MCP server. | The API key created above.                                                                                                 |
| Description of the account scope                       | Provide additional context that will help Bits AI SRE understand which aspects of your infrastructure this account covers. |
1. Click the **Save** button to save your settings.
1. In [Bits.md](https://app.datadoghq.com/bits-ai/settings/bits-md), fill in the **Third-Party Integration Context** snippet to help Bits make better use of this account's data during investigations.

## Support{% #support %}

Need help? Contact [Datadog Support](https://docs.datadoghq.com/help/).
