> For the complete documentation index, see [llms.txt](https://docs.controltheory.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/mcp-integration.md). Agents can also search and read this documentation through its [MCP server](https://docs.controltheory.com/~gitbook/mcp).

# MCP Integration

Get runtime context where you work

Dstl8 exposes an MCP (Model Context Protocol) server for each organization, giving AI assistants direct access to your logs, metrics, traces, incidents and the rest of your observability data.

{% hint style="info" %}
**Quickest setup:** run `dstl8 install` with the [Dstl8 CLI](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/dstl8-cli.md). It detects the AI clients on your machine and configures them for you. The steps below are for setting a client up by hand.
{% endhint %}

### Get your MCP credentials

#### 1. Find your MCP endpoint

Each organization has a unique MCP endpoint:

```
https://<org_id>.app.dstl8.ai/mcp
```

Find your full URL on the **MCP / CLI** page (left navigation), under **MCP Server URL**. The `org_id` is also surfaced in the product sign-in URL for the Dstl8 UI.

#### 2. Generate an API token

1. Go to **Organization Settings → Tokens**
2. Click **Create API Token**
3. Give it a descriptive name (e.g. "Claude Code - Jon")
4. Copy the token — it won't be shown again

Your token will look like `dstl8_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx`.

### Available tools

Once connected, your AI assistant has these groups of tools:

| Group                 | What your assistant can do                                                                                                                                                                                                                                                                                    |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Logs**              | Search log samples and patterns, read sentiment and severity over time, and list anomalies.                                                                                                                                                                                                                   |
| **Metrics**           | Find the metrics in scope, describe one, chart its values over time, read what Dstl8 found in your metrics (anomalies, trends and forecasts), project a metric forward, and set watches. See [Metrics MCP tools](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/metrics/mcp-tools.md). |
| **Traces**            | List services, search traces, open one trace with its spans and their logs, and read the service map, request paths and each service's request rate, errors and latency. See [Traces MCP tools](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/traces/mcp-tools.md).                   |
| **Cross-signal**      | See what correlated with an incident or anomaly, compare two time windows, and ask what changed since a given time.                                                                                                                                                                                           |
| **Incidents**         | List, read, create and update incidents, and add notes and links to them.                                                                                                                                                                                                                                     |
| **Incident timeline** | Read and add entries on an incident's timeline.                                                                                                                                                                                                                                                               |
| **Events**            | List, search and send platform events such as deploys, configuration changes and CI runs. See [Events](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/events.md).                                                                                                                      |
| **Topology**          | Explore your Kubernetes clusters, one resource's relationships, and what a change would affect. See [Topology](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/topology.md).                                                                                                            |
| **Code**              | Link log patterns to the code that emits them, and deploys to the files they changed. See [Code Graph MCP Tools](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/code-graph/mcp-tools.md).                                                                                              |
| **Sources**           | List sources, their streams, and the streams each workspace receives.                                                                                                                                                                                                                                         |
| **Memory**            | Read and add to what's known about your system's entities and how they relate.                                                                                                                                                                                                                                |
| **Docs**              | Search and read this documentation.                                                                                                                                                                                                                                                                           |
| **Utilities**         | Workspaces, the current time, time conversion, arithmetic, and the filter values other tools accept.                                                                                                                                                                                                          |

### Client setup guides

Choose your AI assistant:

* [Claude Code](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/mcp-integration/claude-code.md)
* [Claude Desktop](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/mcp-integration/claude-desktop.md)
* [Codex](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/mcp-integration/codex.md)
* [ChatGPT](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/mcp-integration/chatgpt.md)
* [Cursor](https://docs.controltheory.com/controltheory-documentation/dstl8-docs/mcp-integration/cursor.md)

### Example prompts

Once connected, try asking:

**Situational awareness**

* "What are my active incidents?"
* "What's going on in production?"
* "Give me a health pulse across all services"
* "Any active incidents in staging?"

**Targeted investigation**

* "Why is the auth service throwing 500s?"
* "Is this error happening in staging too, or just prod?"
* "Show me recurring patterns in the payments service"

**Metrics and traces**

* "Which services have the highest error rate right now?"
* "Show me the slowest requests to checkout in the last hour, and where the time goes"
* "Is any container heading for its memory limit?"
* "What changed in the payments service's latency since this morning's deploy?"

**Deploy verification**

* "Did my last deploy fix the connection timeout issue?"
* "Compare error rates before and after the 2pm deploy"
* "Is staging converging with production after the hotfix?"

**Pre-coding context**

* "What should I know about the billing service before I make changes?"
* "Any known incidents or patterns related to the webhook handler?"
* "Show me recent anomalies in the service I'm about to refactor"

**Cross-environment correlation**

* "Is the error I'm seeing locally also showing up in prod?"
* "Compare my local logs against staging for the same service"
* "Is this safe to promote to production?"


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.controltheory.com/controltheory-documentation/dstl8-docs/mcp-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
