MCP guides
Model Context Protocol (MCP) is a standard developed by Anthropic that enables AI assistants to seamlessly integrate with external systems. This protocol allows AI assistants to connect to data sources, APIs, databases, and more in a secure and standardized way.
MCP creates a universal interface between AI models and various services, eliminating the need for custom tool implementations for each integration. You can think of it as a universal API standard designed specifically for AI systems.
The key advantage of MCP is that AI libraries only need to implement support for the protocol once. After that, all MCP-compatible services become immediately accessible, saving AI library maintainers a lot of time.
What is MCP's architecture?
MCP follows a client-server architecture:
- Clients (like Claude Desktop, Cursor, or VS Code) establish connections with MCP servers. You can see a collection of clients in the awesome-mcp-clients GitHub repository.
- Servers expose tools and capabilities through standardized interfaces. You can see a collection of servers in the awesome-mcp-servers GitHub repository.
- AI models can then use these tools to access external data and functionality when needed
A diagram showing the architecture is below:
Does ClickHouse have an MCP Server?
It does! The ClickHouse MCP Server offers the following tools:
run_select_query- Execute SQL queries on your ClickHouse cluster.list_databases- List all databases on your ClickHouse cluster.list_tables- List all tables in a database.
If you're looking for a remote MCP server in ClickHouse Cloud, see page "Remote MCP server in Cloud"
Guides for using the ClickHouse MCP Server
Below are some guides showing how to use the ClickHouse MCP Server.
| Page | Description |
|---|---|
| How to build a ClickHouse-backed AI Agent with Streamlit | Learn how to build a web-based AI Agent with Streamlit and the ClickHouse MCP Server |
| How to build a LangChain/LangGraph AI agent using ClickHouse MCP Server. | Learn how to build a LangChain/LangGraph AI agent that can interact with ClickHouse's SQL playground using ClickHouse's MCP Server. |
| How to build a LlamaIndex AI agent using ClickHouse MCP Server. | Learn how to build a LlamaIndex AI agent that can interact with ClickHouse MCP Server. |
| How to build a PydanticAI agent using ClickHouse MCP Server. | Learn how to build a PydanticAI agent that can interact with ClickHouse MCP Server. |
| How to build a SlackBot agent using ClickHouse MCP Server. | Learn how to build a SlackBot agent that can interact with ClickHouse MCP Server. |
| How to build an AI Agent with Agno and the ClickHouse MCP Server | Learn how build an AI Agent with Agno and the ClickHouse MCP Server |
| How to build an AI Agent with Chainlit and the ClickHouse MCP Server | Learn how to use Chainlit to build LLM-based chat apps together with the ClickHouse MCP Server |
| How to build an AI Agent with Claude Agent SDK and the ClickHouse MCP Server | Learn how build an AI Agent with Claude Agent SDK and the ClickHouse MCP Server |
| How to build an AI Agent with CopilotKit and the ClickHouse MCP Server | Learn how to build an agentic application using data stored in ClickHouse with ClickHouse MCP and CopilotKit |
| How to build an AI Agent with CrewAI and the ClickHouse MCP Server | Learn how build an AI Agent with CrewAI and the ClickHouse MCP Server |
| How to build an AI Agent with DSPy and the ClickHouse MCP Server | Learn how to build an AI agent with DSPy and the ClickHouse MCP Server |
| How to build an AI Agent with mcp-agent and the ClickHouse MCP Server | Learn how build an AI Agent with mcp-agent and the ClickHouse MCP Server |
| How to build an AI Agent with Microsoft Agent Framework and the ClickHouse MCP Server | Learn how build an AI Agent with Microsoft Agent Framework and the ClickHouse MCP Server |
| How to build an AI Agent with Upsonic and the ClickHouse MCP Server | Learn how build an AI Agent with Upsonic and the ClickHouse MCP Server |
| How to build an OpenAI agent using ClickHouse MCP Server. | Learn how to build an OpenAI agent that can interact with ClickHouse MCP Server. |
| Set Up ClickHouse MCP Server with AnythingLLM and ClickHouse Cloud | This guide explains how to set up AnythingLLM with a ClickHouse MCP server using Docker. |
| Set Up ClickHouse MCP Server with Claude Desktop | This guide explains how to set up Claude Desktop with a ClickHouse MCP server. |
| Set Up ClickHouse MCP Server with Jan.ai | This guide explains how to set up Jan.ai with a ClickHouse MCP server. |
| Set Up ClickHouse MCP Server with LibreChat and ClickHouse Cloud | This guide explains how to set up LibreChat with a ClickHouse MCP server using Docker. |
| Set Up ClickHouse MCP Server with Ollama | This guide explains how to set up Ollama with a ClickHouse MCP server. |
| Set Up ClickHouse MCP Server with Open WebUI and ClickHouse Cloud | This guide explains how to set up Open WebUI with a ClickHouse MCP server using Docker. |