> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/references/interfaces/ai-activation/data-product-mcp-lifecycle.md).

# Data Product MCP lifecycle

See how a Data Product MCP session initializes, operates, and ends.

When an AI host adds Data Product MCP, the MCP client and server follow a three-phase lifecycle.

```mermaid
%%{init: {"theme":"base","themeVariables":{"fontFamily":"PP Neue Montreal, Inter, Helvetica Neue, Arial, sans-serif","fontSize":"14px","primaryColor":"#EDE9E5","primaryTextColor":"#242422","primaryBorderColor":"#242422","lineColor":"#242422","secondaryColor":"#D6CDC6","tertiaryColor":"#FFFFFF","clusterBkg":"#EDE9E5","clusterBorder":"#54DED1","edgeLabelBackground":"#FFFFFF"},"flowchart":{"curve":"basis","padding":12,"nodeSpacing":40,"rankSpacing":50}}}%%
flowchart LR
    A(["🔌 Host adds\nData Product MCP"])
    B["**Initialization**\nVersion & capability\nnegotiation"]
    C["**Operation**\nTool calls, queries,\ndiscovery, inspection"]
    D(["✅ Session ends\nclean transport close"])

    A --> B
    B -->|"Capabilities agreed"| C
    C -->|"Session complete"| D

    classDef primary-teal fill:#54DED1,color:#202F36,stroke:#009293,stroke-width:1.5px,font-weight:600;
    classDef dark-teal    fill:#009293,color:#FFFFFF,stroke:#242422,stroke-width:1.5px,font-weight:600;
    classDef cream        fill:#EDE9E5,color:#242422,stroke:#242422,stroke-width:1px;
    classDef sandpaper    fill:#D6CDC6,color:#242422,stroke:#242422,stroke-width:1px;

    class A cream;
    class B sandpaper;
    class C dark-teal;
    class D primary-teal;
```

## Initialization

Initialization runs once at the start of every session.

The MCP client sends its supported protocol version and capabilities. Data Product MCP responds with its version, server details, and supported capabilities, including the tool catalog.

The client reads that catalog and makes the available tools visible to the model. No tool calls happen in this phase.

If the client and server cannot agree on a compatible protocol version, the session does not proceed.

## Operation

Operation is the active phase. All Data Product MCP work happens here.

The model receives the user's prompt and the tool descriptions negotiated during initialization. When the model decides a Data Product tool is needed, it requests the tool call through the MCP client.

The client sends a structured JSON-RPC request to Data Product MCP. The server validates identity, applies DataOS authorization and policies, calls the appropriate Data Product API, and returns a structured response.

A single user question may trigger several tool calls in sequence. For example, the assistant may search for a Data Product, then check its quality status, then run a query against it.

## Shutdown

Shutdown ends the session.

MCP does not require a dedicated shutdown message. The session ends when the underlying transport closes.

For HTTP-based connections, this happens when the connection is released. After shutdown, no further tool calls can be made. A new session starts with a fresh initialization phase.


---

# 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://v2.dataos.info/references/interfaces/ai-activation/data-product-mcp-lifecycle.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.
