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

# Context Engine

The Context Engine is the knowledge layer that powers the Elementary AI Agent and the MCP Server.

It connects lineage across your entire stack — from your data warehouse and dbt models through to BI dashboards and code — and layers in everything Elementary knows about how your data is actually performing. The result is a unified, always-current picture of your stack: what exists, how it's connected, how it's running, and its health status.

## What it holds

**From your connected integrations:**

* **Data warehouse** — table metadata, schema definitions, query history, usage stats
* **dbt** — model definitions, test configurations, run results, documentation
* **BI tools** — dashboards, reports, and their upstream dependencies
* **Code repository** — recent commits, pull requests, change history
* **Orchestration** — job runs, execution history

**From Elementary's own monitoring:**

* **Test results** — pass/fail history across dbt, Python, and Cloud tests, coverage gaps
* **Test performance** — execution times and cost per test run
* **Model performance** — execution times, cost, trends over time
* **Health scores** — data quality dimensions across all assets

Lineage connects these layers. A table in your warehouse maps to a dbt model, which feeds a dashboard, which is owned by a team. When something breaks, the Context Engine already knows the blast radius.

## What it enables

Because the Context Engine holds a complete, connected view of your stack, the Elementary AI Agent can:

* Trace the root cause of an incident across models, code changes, and upstream dependencies
* Understand the downstream impact before escalating or fixing
* Identify coverage gaps and recommend tests for the right assets
* Understand which tests are redundant and remove them to speed up the pipeline
* Enrich metadata with descriptions that reflect how assets are actually used

The MCP Server exposes this same context to external AI tools — Claude, Cursor, or any MCP-compatible client — so they can query your stack with full awareness.

<Note>The more integrations you connect, the more complete the context. Lineage between dbt and BI tools, for example, only works when both are connected.</Note>

<CardGroup cols={2}>
  <Card title="Connect integrations" icon="plug" href="/cloud/integrations/elementary-integrations">
    Add data sources to expand what the Context Engine can see.
  </Card>

  <Card title="MCP Server" icon="message-code" href="/cloud/mcp/overview">
    Expose the Context Engine to external AI tools.
  </Card>
</CardGroup>
