ClickHouse's open-source MCP server runs locally, so it doesn't work in Grok. Two hosted routes do: the remote MCP endpoint that comes with ClickHouse Cloud, and Contextflo, which connects to any ClickHouse you can reach over HTTP(S).
ClickHouse usually holds product events and logs, which are exactly the numbers people want to ask about in plain language. If those people live in Grok, hosted is the way to go. The wider set of ClickHouse options is in the ClickHouse MCP guide.
Option 1: ClickHouse Cloud's remote MCP in Grok
If you use ClickHouse Cloud, enable MCP on your service (Connect, then MCP). The endpoint is:
https://mcp.clickhouse.cloud/mcp
It signs in with OAuth. ClickHouse documents the tools as read-only.
In Grok:
- Open grok.com/connectors.
- Choose New Connector, then Custom.
- Enter
https://mcp.clickhouse.cloud/mcp. - Complete the sign-in.
The open-source mcp-clickhouse (uv run --with mcp-clickhouse --python 3.12 mcp-clickhouse) is a stdio server. Grok can't run local servers or reach localhost, so it doesn't work here.
Option 2: Contextflo
On the ClickHouse side, create a read-only user:
CREATE USER contextflo_ro IDENTIFIED BY '<password>' SETTINGS readonly = 1;
GRANT SELECT ON analytics.* TO contextflo_ro;
In Contextflo: go to Data Sources, then Add data source, and pick ClickHouse. Enter the host, the HTTP(S) port (8443 on ClickHouse Cloud, using https), the database, the username and the password. Pick tables and invite your team.
In Grok: add a custom connector at grok.com/connectors with:
https://mcp.contextflo.com/mcp
Each person signs in with their own account. Contextflo runs SELECT only.
Two things specific to ClickHouse
- Wide event tables. Event tables have many columns and coded values. Generated descriptions and team definitions help Grok pick the right ones, instead of guessing what an event code means.
- ClickHouse dialect. Functions differ from other databases, for example
toStartOfMonthinstead ofDATE_TRUNC. Saved corrections keep the dialect right.
Which one to use
| ClickHouse Cloud MCP | Contextflo | |
|---|---|---|
| Works with | ClickHouse Cloud | ClickHouse reachable over HTTP(S) |
| Sign-in | OAuth with ClickHouse | Contextflo account per person |
| Shared definitions | None | Team saves corrections and definitions |
| Audit trail | system.query_log shows SQL, not who asked | Prompts and the SQL that ran, per person |
Just you, on ClickHouse Cloud: option 1. Your team asks too: Contextflo. Using Claude as well? See connecting Claude to ClickHouse.
You do the modeling, we do the rest. Connect ClickHouse free.
FAQ
Can Grok use the open-source mcp-clickhouse server? Not as a custom connector. mcp-clickhouse is a local stdio server, and Grok connectors only reach servers on the public internet. Use the ClickHouse Cloud remote MCP endpoint or Contextflo instead.
How do I turn on ClickHouse Cloud's MCP endpoint? Enable MCP on your service from Connect, then MCP, and add https://mcp.clickhouse.cloud/mcp to Grok as a custom connector. You sign in with OAuth.
Can Grok write to ClickHouse through the Cloud MCP? ClickHouse documents the Cloud remote MCP tools as read-only. Contextflo runs SELECT only too, and you should connect with a read-only ClickHouse user anyway.
Which port does Contextflo use for ClickHouse? The HTTP(S) port. On ClickHouse Cloud that is 8443, with https.
See it on your own data.
Connect your warehouse and your team can ask Claude about it the same day, without waiting on a data team. Want a walkthrough first? Grab 20 minutes.
Book a 20-minute callSee how teams use Contextflo
Related posts
Keep reading

Conversational analytics: 5 ways to set it up, compared
7 min read

How to connect Claude to BigQuery? What works and what doesn't in 2026
8 min read

How to connect Claude to Postgres without giving it write access
9 min read

How to build a BI dashboard with Claude that your team can actually trust
8 min read

How to give Claude read-only access to your database (it isn't always the default)
7 min read

You connected your warehouse to Claude, now what?
5 min read

Run ClickHouse queries from Codex with MCP
6 min read

Databricks in Codex: Genie One MCP or Contextflo
5 min read

Give Codex read-only access to MySQL
4 min read

