ClickHouse MCP: query your analytics data from your AI app

ClickHouse MCP lets your AI app list databases and tables, read schemas and sample rows, and run SQL against your ClickHouse data for real-time analytics. ContextGate connects ClickHouse Cloud's own MCP server, or an API-key app connector, to Claude, ChatGPT and Cursor, and every query an AI app runs against your tables is kept in Activity.

  • Ready to connect
  • Free
  • 5 example tools

Set up ClickHouse in Claude, ChatGPT or Cursor

  1. 1Click Connect ClickHouse free and sign in with your ClickHouse Cloud account.
  2. 2Your AI app gets every ClickHouse tool by default. If your AI app should only explore structure, switch off the SQL query tool and keep the schema and table listing tools.
  3. 3Add ContextGate to your AI app as a connector or MCP server. The steps for each app are on the Works with page.
  4. 4Ask your AI app which ClickHouse tables have the most rows, then open Activity to see the call.

Analytics questions for Claude or Cursor

  • List the databases in your ClickHouse instance and the tables in each, with engine, size and row count.
  • Get a schema overview of a whole database, or one table's columns, types and keys with sample data.
  • Run a SQL query and get the results back in the chat.

Guard your ClickHouse data

  • Switch off the query tool to keep your AI app on schemas only; a call to it is then refused.
  • Policies check every call, so personal data in query results can be hidden and secrets blocked.
  • Activity keeps a record of every query an AI app runs against ClickHouse.

What you get with ClickHouse and ContextGate

  • Your AI apps can use ClickHouseClaude, Cursor, ChatGPT and other AI apps reach ClickHouse through the one ContextGate connection you add to them.
  • You choose which tools they can useSwitch off any ClickHouse tool you don't want used. It's hidden from your AI apps and refused if called.
  • Every call is checked and recordedYour policies check each call (for example, personal data is hidden and secrets are blocked), and Activity keeps a record of it.

ContextGate sees only the tool calls that go through it, not your AI app's built-in tools or your chats.

ClickHouse tools

Examples of what your AI apps can do in ClickHouse. You'll see the exact list of tools after you connect it.