> For the complete documentation index, see [llms.txt](https://docs.corraldata.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.corraldata.com/kb/mcp/overview.md).

# Overview

## CorralData MCP Server

The CorralData MCP Server is a [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) integration that lets AI assistants interact with the CorralData analytics platform. It provides 40 tools for exploring data, building dashboards, and managing analytics content — all through natural conversation.

### What can it do?

**Explore your data**

* Browse database schemas, tables, and columns
* Discover foreign key relationships between tables
* Search for tables by keyword
* Execute read-only SQL queries against your data warehouse

**Build dashboards**

* Create and update boards (dashboards)
* Add and configure widgets (charts, tables, KPIs)
* Set up board filters for interactive filtering
* Bulk update widget layouts and properties

**Manage datasets**

* List and inspect reusable dataset definitions
* Create and update datasets with SQL queries
* Validate widget queries before saving

**Build Data Apps**

* Create custom HTML/JS widgets that run pre-registered SQL queries
* Update a data app's content, queries, or sizing
* Preview changes safely before persisting them

**Work with connected services**

* List upstream services connected for a customer's data warehouse
* Search and call tools exposed by connected third-party services
* Write actions require explicit user confirmation before running

**Configure AI behavior**

* List and read AskCorral's prompt templates
* Set custom instructions that steer how AskCorral responds for a customer
* List the customer accounts you have access to

### How it works

The server runs as a stateless HTTP service exposing the MCP protocol. AI assistants like Claude and ChatGPT connect to the `/mcp` endpoint, discover available tools, and invoke them on behalf of the user.

Authentication is handled via OAuth 2.0 with Keycloak. Users authenticate once, and the server enforces role-based access — read-only tools are available to all authenticated users, while write operations require specific roles like `board.edit` or `widget.edit`.

### Key features

* **Role-based access control** — Write operations are restricted by role. Read operations are open to all authenticated users.
* **Token-efficient responses** — Responses are designed for AI context windows with progressive disclosure (summaries for lists, details on demand).
* **SQL safety** — Query execution is read-only with configurable row limits.
* **Schema discovery** — AI assistants can explore your database schema to write accurate queries without prior knowledge of your data model.

{% content-ref url="/pages/1GfB1zK4pr8bHFhaxE8w" %}
[Getting Started](/kb/mcp/getting-started.md)
{% endcontent-ref %}


---

# 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 dynamically by asking a question.

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

```
GET https://docs.corraldata.com/kb/mcp/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
