ClickHouse MCP
MCP tools for developers · Free
The official ClickHouse MCP server for exploring schemas and running analytical SQL queries with an AI agent.
Also known as: ClickHouse/mcp-clickhouse

What you can use for free
You can use the code under the stated license; servers, APIs, and compute must be provided separately.
Paid features and costs
ClickHouse Cloud, a self-hosted server, and the agent’s model are billed separately.
Access and limitations
You can use the code under the stated license; servers, APIs, and compute must be provided separately. ClickHouse Cloud, a self-hosted server, and the agent’s model are billed separately.
Use cases
- Connect a user with limited permissions and inspect the tables.
- Run a limited SELECT and compare aggregations with a reference SQL query.
Example workflow
A possible workflow; this is not a report of hands-on testing.
The official ClickHouse MCP server for exploring schemas and running analytical SQL queries with an AI agent.
Before you start
- A test ClickHouse database, a read-only user, and an SQL task.
Steps
- Connect a user with limited permissions and inspect the tables.
- Run a limited SELECT and compare aggregations with a reference SQL query.
- Compare the result with the workflow's goal; after changing the project, run its standard checks.
Check your result
- Aggregation results match; permissions do not allow unnecessary writes.
- Check connection permissions and dependency terms; confirm external service costs if the workflow requires them.
Choosing ClickHouse MCP
Connect a user with limited permissions and inspect the tables.
Choose this when
- Connect a user with limited permissions and inspect the tables.
- Run a limited SELECT and compare aggregations with a reference SQL query.
Consider alternatives when
- When choosing for this topic, compare ClickHouse MCP with ClickHouse. A candidate to compare under the topic: Databases. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
- When choosing for this topic, compare ClickHouse MCP with ClickHouse Agent Skills. A candidate to compare under the topic: Databases. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
Requirements
- In client code, preserve large integers as strings or handle them with a type offering sufficient precision.
Things to consider
- Costs and limits of free use: ClickHouse Cloud, a self-hosted server, and the agent’s model are billed separately.
- Terms of use: Apache-2.0 for this repository; connected services, models, and data have separate terms.
- Writes are disabled by default. Write-enabling flags do not replace the ClickHouse user's actual permissions; SQL checks are described as best-effort.
Frequently asked questions
What can you use for free in ClickHouse MCP?
You can use the code under the stated license; servers, APIs, and compute must be provided separately.
What additional costs might arise with ClickHouse MCP?
ClickHouse Cloud, a self-hosted server, and the agent’s model are billed separately.
What terms of use matter for ClickHouse MCP?
Apache-2.0 for this repository; connected services, models, and data have separate terms.
How do you get started with ClickHouse MCP?
Connect a user with limited permissions and inspect the tables. Run a limited SELECT and compare aggregations with a reference SQL query. Compare the result with the workflow's goal; after changing the project, run its standard checks.
Why is a large numeric identifier returned as a string?
The README describes transmitting 64-bit integers outside JavaScript's safe range as decimal strings. This preserves identifier precision in JSON transmission; it does not mean the ClickHouse column has become a text column.
Related tasks and approaches
- ClickHouse
A candidate to compare under the topic: Databases. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
- ClickHouse Agent Skills
A candidate to compare under the topic: Databases. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
License
Apache-2.0 for this repository; connected services, models, and data have separate terms.
Apache 2.0 — permissive license with patent terms
You can use and modify the code in commercial and closed-source projects. When distributing it, retain the license and relevant notices, identify modified files, and include NOTICE if provided. Authors grant a limited patent license for their contributions; it does not grant permission to use trademarks.
License termsTechnologies and topics
- ClickHouse MCP
- ClickHouse
- MCP