---
title: MCP, API, CLI
description: >-
  Use Bits Investigation from AI assistants, applications, and the command line
  with MCP tools, the Bits AI API, and pup.
breadcrumbs: Docs > Bits AI > Bits Investigation > MCP, API, CLI
---

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

# MCP, API, CLI

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

Use Bits Investigation from AI assistants, applications, and the command line to search and read existing investigations, trigger new investigations, and steer running investigations with additional context.

## Requirements{% #requirements %}

Triggering and steering investigations requires the `Bits Investigations Write` [permission](https://docs.datadoghq.com/account_management/rbac/permissions.md#bits-ai). Searching and retrieving investigations requires `Bits Investigations Read`.

## Datadog MCP Server{% #datadog-mcp-server %}

The Datadog Model Context Protocol (MCP) Server's `investigator` toolset includes read tools to search and read existing investigations and their findings. It also lets AI assistants trigger investigations for monitor alerts, incidents, or a natural-language description, and steer a running investigation with additional context.

For available tools, required permissions, and example prompts, see [Investigations in the MCP tools reference](https://docs.datadoghq.com/mcp_server/tools.md#investigations).

### Setup and testing{% #setup-and-testing %}

Enter the following prompt in your AI assistant to check tool availability and try an investigation. For setup details, see [Set Up the Datadog MCP Server](https://docs.datadoghq.com/mcp_server/setup.md).

```text
Check whether Bits Investigation tools, such as trigger_bits_ai_investigation, are available. If they aren't available, help me set them up by following https://docs.datadoghq.com/mcp_server/setup/. The investigator toolset is included in toolsets=all.

Once the tools are available, help me find a monitor that is currently alerting and trigger a Bits investigation to figure out what's wrong.
```

## Bits AI API{% #bits-ai-api %}

Use the Bits AI API to trigger, list, and retrieve investigations from applications and automation scripts. For request parameters, authentication, and code examples, see the [Bits AI API reference](https://docs.datadoghq.com/api/latest/bits-ai.md).

## Pup CLI{% #pup-cli %}

Use [pup](https://github.com/DataDog/pup), the Datadog command-line tool, to list, retrieve, and trigger investigations: `pup investigations list`, `pup investigations get`, and `pup investigations trigger`. The trigger command accepts an investigation request from a JSON file with `--file`.

Run `pup investigations --help` for command usage and options.
