# MCP Server

Telmai exposes a **Model Context Protocol (MCP) server** that allows Claude Desktop and other MCP-compatible clients to manage data quality operations conversationally.

***

## Connecting Claude Desktop

Add the following to your Claude Desktop config file:

* **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
* **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "telmai": {
      "url": "https://{your-telmai-domain}/mcp"
    }
  }
}
```

Restart Claude Desktop. A browser window will open to sign in with your Microsoft Entra ID credentials.

***

## Authentication

The MCP server uses OAuth 2.1. When you connect a client, it will automatically open a browser for you to sign in with your Fabric identity. No manual token management is required.

The same Fabric workspace role permissions apply as the REST API — a Viewer can only read data, while a Member or Admin can also make changes.

***

## Available Tools (18)

### Assets

| Tool                 | Permission    | Description                                             |
| -------------------- | ------------- | ------------------------------------------------------- |
| `list_products`      | `assets:read` | List all data products (grouped by Lakehouse/Warehouse) |
| `get_product`        | `assets:read` | Get a data product by ID                                |
| `get_product_assets` | `assets:read` | List assets within a product                            |
| `list_assets`        | `assets:read` | List all data assets                                    |
| `get_asset`          | `assets:read` | Get a specific asset by ID                              |
| `get_asset_metadata` | `assets:read` | Get monitoring metadata for an asset                    |

### Monitors

| Tool              | Permission        | Description                               |
| ----------------- | ----------------- | ----------------------------------------- |
| `list_monitors`   | `monitors:read`   | List monitors with optional filters       |
| `get_monitor`     | `monitors:read`   | Get a monitor by ID                       |
| `deploy_monitors` | `monitors:write`  | Deploy the 4 built-in monitors for assets |
| `update_monitor`  | `monitors:write`  | Update monitor configuration              |
| `delete_monitor`  | `monitors:delete` | Delete a monitor                          |

### Custom SQL

| Tool                        | Permission       | Description                                           |
| --------------------------- | ---------------- | ----------------------------------------------------- |
| `test_custom_sql`           | `monitors:write` | Validate a custom SQL query before creating a monitor |
| `create_custom_sql_monitor` | `monitors:write` | Create a custom SQL monitor                           |

### Incidents

| Tool                   | Permission       | Description                           |
| ---------------------- | ---------------- | ------------------------------------- |
| `list_incidents`       | `incidents:read` | List incidents with filters           |
| `get_incident`         | `incidents:read` | Get incident details                  |
| `get_incident_summary` | `incidents:read` | Summary counts by status and severity |

### Reports

| Tool                   | Permission    | Description                          |
| ---------------------- | ------------- | ------------------------------------ |
| `get_product_coverage` | `assets:read` | Monitor coverage metrics per product |
| `get_asset_coverage`   | `assets:read` | Monitor coverage metrics per asset   |
| `get_coverage_gaps`    | `assets:read` | List assets missing monitor coverage |

***

## Example: Using Telmai in Claude Desktop

Once connected, you can ask Claude:

```
How many critical incidents are open right now?
```

```
Which tables have no monitors deployed?
```

```
Deploy monitors for the sales_orders table in the Sales workspace.
```

```
What's the completeness trend for the customers table over the last 7 days?
```

Claude will automatically call the appropriate Telmai tools and return an answer based on live data from your environment.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fabric-docs.telm.ai/api-reference/mcp-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
