Skip to main content
This guide shows you how to enable the ClickHouse Cloud Remote MCP Server and set it up for use with common developer tools. Prerequisites

Enable remote MCP server for Cloud

Connect to the ClickHouse Cloud service for which you want to enable the remote MCP server. In the left-hand menu, click Connect. A box with connection details will open. Select Connect with MCP: Toggle the button on to enable MCP for the service. Enabling or disabling MCP requires the control-plane:service:manage-mcp permission (see Console roles and permissions): Copy the displayed URL, which is the same as the one below:

Setup remote MCP for development

Choose your IDE or tool below and follow the corresponding setup instructions.

Authenticate from a headless environment

If your MCP client runs on a remote or headless host where a browser-based OAuth flow is not practical, authenticate with a ClickHouse Cloud API key instead.
  1. In the ClickHouse Cloud console, open your organization and select API Keys.
  2. Create a key with the minimum roles and permissions required for the organizations and services the MCP client needs to access, then download the key ID and secret.
  3. On the remote host, provide the credentials through your secret-management system and create an HTTP Basic authorization value:
  1. Select your MCP client and add the remote MCP server:
Claude Code expands CH_AUTH from the environment when it connects. Launch Claude Code and run /mcp to confirm that clickhouse-cloud is connected.See the Claude Code MCP documentation for details about remote HTTP servers and header configuration.
Keep CH_AUTH available in each client session, and do not commit the API key, secret, or CH_AUTH value to source control. Base64 encoding does not encrypt the credentials. This API-key flow does not require a browser or a separate clickhousectl login.

Claude Code

From your working directory, run the following command to add the ClickHouse Cloud MCP Server configuration to Claude Code:
Then launch Claude Code:
Run the following command to list MCP servers:
Select clickhouse-cloud and authenticate via OAuth using your credentials for ClickHouse Cloud.

Claude web UI

  1. Navigate to Customize > Connectors
  2. Click the ”+” icon and Add custom connector
  3. Give the custom connector a name like clickhouse-cloud and add it
  4. Click the newly added clickhouse-cloud connector and click Connect
  5. Authenticate using your ClickHouse Cloud credentials via OAuth

Cursor

  1. Browse and install MCP servers from the Cursor Marketplace.
  2. Search for ClickHouse and click “Add to Cursor” on any server to install it
  3. Authenticate with OAuth.

Visual Studio Code

Add the following configuration to your .vscode/mcp.json:
For more details refer to the Visual Studio Code docs.

Windsurf

Edit your mcp_config.json file with the following config:
For more details refer to the Windsurf docs.

Zed

Add ClickHouse as a custom server. Add the following to your Zed settings under context_servers:
Zed should then prompt you to authenticate via OAuth when it first connects to the server. For more details refer to the Zed docs.

Codex

Run the following command to add the ClickHouse Cloud MCP server via the CLI:

Example usage

Once connected, you can interact with ClickHouse Cloud through natural-language prompts. Below are some common workflows and the tools your MCP client will invoke behind the scenes. For a full list of available tools, see the tool reference.

Exploring your data

Start by discovering what’s available:

Running analytical queries

Ask questions in plain language and the agent will translate them into SQL: The run_select_query tool only permits SELECT statements. All queries are read-only.

Managing services and infrastructure

Get visibility into your ClickHouse Cloud resources:

Monitoring costs

Last modified on September 28, 2026