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

> Overview of Model Context Protocol and the ClickHouse MCP server

# Model Context Protocol (MCP)

export const Image = ({img, alt, size = "lg", background}) => {
  const normalizedSize = ["sm", "md", "lg"].includes(size) ? size : "lg";
  const backgroundColor = background === "white" ? "white" : background === "black" ? "rgb(31 31 28)" : undefined;
  return <div className={`ch-image-${normalizedSize}`}>
      <Frame>
        <img src={img} alt={alt} style={{
    backgroundColor
  }} />
      </Frame>
    </div>;
};

[Model Context Protocol](https://www.anthropic.com/news/model-context-protocol) (MCP) is an open standard that enables AI assistants to connect to external systems.
It provides a consistent interface for models to access data sources, APIs, databases, and tools without requiring a custom integration for every combination of model and service.

An AI application only needs to implement MCP once to connect to any compatible server.
Similarly, an MCP server can expose its capabilities to any compatible client.

<h2 id="architecture">
  Architecture
</h2>

MCP follows a client-server architecture:

* MCP clients, such as Claude Desktop, Cursor, or VS Code, establish connections with MCP servers.
* MCP servers expose tools and capabilities through a standardized interface.
* AI models use the exposed tools to access external data and functionality when needed.

<Image img="https://mintcdn.com/private-7c7dfe99/RMrV3JZHbEy3aFh9/images/use-cases/AI_ML/MCP/mcp_overview.webp?fit=max&auto=format&n=RMrV3JZHbEy3aFh9&q=85&s=6ee6aea8e44095d8851e1a3ff5beae0d" alt="MCP client-server architecture" size="lg" width="1551" height="641" data-path="images/use-cases/AI_ML/MCP/mcp_overview.webp" />

You can find community-maintained collections of [MCP clients](https://github.com/punkpeye/awesome-mcp-clients) and [MCP servers](https://github.com/punkpeye/awesome-mcp-servers) on GitHub.

<h2 id="clickhouse-mcp-server">
  ClickHouse MCP server
</h2>

The [ClickHouse MCP server](https://github.com/ClickHouse/mcp-clickhouse) lets an AI assistant discover databases and tables, inspect schemas, and run SQL queries against a ClickHouse cluster.
The tools exposed by the server may vary by version, so refer to the relevant integration guide for the tool names used in its examples.

The server allows read-only queries by default.
Use a dedicated ClickHouse user with only the permissions that the assistant needs.

To connect a local MCP client, see [Set up the ClickHouse MCP server](/docs/guides/use-cases/ai-ml/MCP/claude-desktop).
For a managed remote server, see [Remote MCP server in ClickHouse Cloud](/docs/products/cloud/features/ai-ml/remote-mcp).

<Tip>
  **Agent Skills**

  The [ClickHouse Agent Skills repository](https://github.com/ClickHouse/agent-skills) provides packaged instructions that extend AI coding agents with ClickHouse-specific expertise, including schema design, query optimization, and data ingestion patterns.
</Tip>
