Blog
guide

How to Connect ClickHouse to Claude Desktop Using Sequel

Musthaq Ahamad
Musthaq Ahamad
How to Connect ClickHouse to Claude Desktop Using Sequel

ClickHouse is purpose-built for high-speed analytics over large volumes of data. Claude Desktop is a native AI application for conversational work. Connect them through Sequel's MCP server and you can explore petabytes of analytics data through a simple chat interface.

What You'll Accomplish

Once connected, you'll be able to open Claude Desktop and ask:

  • "How many events did we track last week, compared to the week before?"
  • "What's the average session duration for users in Europe this month?"
  • "Which marketing channels are driving the most conversions?"

Prerequisites

Step 1: Connect Your ClickHouse Database to Sequel

Sign in to sequel.sh and click Data Sources in the left sidebar.

Sequel Data Sources page

Click New Connection. On the "Choose a connector" page, select ClickHouse.

Choose a connector

Fill in the connection fields:

  • Connection Name -- a memorable label, e.g. ClickHouse Analytics
  • Host -- your ClickHouse hostname, without https:// or http://
  • Port -- 8443 for ClickHouse Cloud, 8123 for self-hosted HTTP
  • Username -- e.g. default
  • Password -- your ClickHouse password
  • Database -- the database name to connect to

ClickHouse connection form

Click Connect to verify and save.

Step 2: Get Your Sequel API Key

Click Settings in the left sidebar, then select API Keys from the settings navigation.

Sequel API Keys page

Click New key, name it claude-desktop, and copy the key (starts with sql_).

Step 3: Configure Claude Desktop

Open or create the config file:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the Sequel entry:

{
  "mcpServers": {
    "sequel": {
      "url": "https://api.sequel.sh/mcp",
      "headers": {
        "Authorization": "Bearer sql_your_api_key"
      }
    }
  }
}

Replace sql_your_api_key with the key from Step 2. Restart Claude Desktop after saving.

Step 4: Query Your ClickHouse Database

Open a conversation in Claude Desktop:

How many unique users visited the site this week?
What's the trend of API errors over the past 30 days?
Which product pages have the highest bounce rate?

What You Can Do Now

  • Data-driven Q&A for your whole team -- product managers, marketers, and execs can ask data questions without SQL knowledge
  • Incident analysis -- ask "Did anything unusual happen with error rates in the last 2 hours?"
  • Growth reporting -- ask "What's our week-over-week growth for signups across the past 3 months?"
  • Behavioral analysis -- ask "What's the most common user journey before converting to paid?"

Try Sequel

Meet your always-on data analyst.

Connect your database and get instant answers in plain English. Free for up to 3 seats - no credit card required.

Get started free

Frequently asked questions

Does Claude Desktop support ClickHouse through Sequel?

Yes. Sequel's MCP server supports ClickHouse, and Claude Desktop connects to Sequel via a standard MCP HTTP endpoint. Once configured, Claude Desktop can query any ClickHouse database you've added as a data source in Sequel.

What ClickHouse connection details do I need?

You need the hostname (without https://), port (8443 for ClickHouse Cloud, 8123 for self-hosted HTTP), username, password, and database name.

How do I find my ClickHouse Cloud connection details?

In your ClickHouse Cloud console, go to your service and click Connect. The HTTPS interface shows the host, port, username, and password you need.

How do I update my Sequel API key in Claude Desktop after rotating it?

Open claude_desktop_config.json, update the Bearer token value to your new key, save the file, and restart Claude Desktop.

Can I query multiple ClickHouse databases through a single MCP config?

Yes. Add multiple ClickHouse data sources in Sequel under different names. The single Sequel MCP entry in Claude Desktop's config exposes all of them.

Does this work with ClickHouse's materialized views?

Yes. Sequel queries ClickHouse using standard SQL, so it can query any table or materialized view accessible to your database user.

Written by

Musthaq Ahamad
Musthaq Ahamad

Co-founder and CEO of Sequel. Previously built developer tools and data infrastructure. Passionate about making data accessible for everyone.