# ClickHouse Cloud (hosted)

> ClickHouse's hosted remote MCP for ClickHouse Cloud: OAuth sign-in, read-only SQL, plus services, backups, ClickPipes and cost.

[Canonical HTML page](https://top-mcps.com/mcp/clickhouse-cloud) · [server.json](https://top-mcps.com/mcp/clickhouse-cloud.json) · [methodology](https://top-mcps.com/about/methodology)

## Install

### Claude Desktop — `claude_desktop_config.json`

Claude Desktop launches stdio servers, so mcp-remote bridges to the hosted endpoint and opens the sign-in in your browser. On Pro, Max, Team and Enterprise you can skip the file: Settings → Connectors → Add custom connector → https://mcp.clickhouse.cloud/mcp. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```json
{
  "mcpServers": {
    "clickhouse-cloud": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.clickhouse.cloud/mcp"
      ]
    }
  }
}
```

### Claude Code — `CLI or .mcp.json`

Then run /mcp inside Claude Code to finish the sign-in. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```shell
claude mcp add --transport http clickhouse-cloud https://mcp.clickhouse.cloud/mcp
```

### Cursor — `.cursor/mcp.json`

Global path: ~/.cursor/mcp.json. Cursor shows "Needs login" once it connects — click it to authorize. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```json
{
  "mcpServers": {
    "clickhouse-cloud": {
      "url": "https://mcp.clickhouse.cloud/mcp"
    }
  }
}
```

### VS Code — `.vscode/mcp.json`

VS Code uses the "servers" key. Run MCP: List Servers → Start Server and allow the sign-in. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```jsonc
{
  "servers": {
    "clickhouse-cloud": {
      "type": "http",
      "url": "https://mcp.clickhouse.cloud/mcp"
    }
  }
}
```

### Windsurf — `~/.codeium/windsurf/mcp_config.json`

Windsurf uses "serverUrl" for hosted servers. Open via Cascade → hammer icon → Configure. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```json
{
  "mcpServers": {
    "clickhouse-cloud": {
      "serverUrl": "https://mcp.clickhouse.cloud/mcp"
    }
  }
}
```

### Cline — `cline_mcp_settings.json`

Bridged through mcp-remote. Open via the Cline sidebar → MCP Servers → Edit. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```json
{
  "mcpServers": {
    "clickhouse-cloud": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.clickhouse.cloud/mcp"
      ]
    }
  }
}
```

### Continue — `~/.continue/config.json`

Continue takes the hosted URL directly in the transport block. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "streamable-http",
          "url": "https://mcp.clickhouse.cloud/mcp"
        }
      }
    ]
  }
}
```

### Codex CLI — `CLI`

Codex detects OAuth support and opens the browser to authorize. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```shell
codex mcp add clickhouse-cloud --url https://mcp.clickhouse.cloud/mcp
```

### Zed — `~/.config/zed/settings.json`

Bridged through mcp-remote under "context_servers". Settings live-reload on save. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

```jsonc
{
  "context_servers": {
    "clickhouse-cloud": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "mcp-remote",
          "https://mcp.clickhouse.cloud/mcp"
        ]
      }
    }
  }
}
```

### ChatGPT — `ChatGPT → Settings → Connectors (remote URL)`

Paste this into Settings → Connectors → Add custom connector. Requires ChatGPT Pro / Team / Enterprise / Edu with Developer mode enabled.

```json
{
  "name": "ClickHouse Cloud (hosted)",
  "transport": "http",
  "url": "https://mcp.clickhouse.cloud/mcp"
}
```

## At a glance

- **Maintainer:** ClickHouse
- **Transport:** Streamable HTTP
- **Auth model:** OAuth 2.1
- **Required secrets:** None
- **Supported clients:** Claude, Claude Code, Cursor, VS Code, Windsurf, Zed, Codex, ClickHouse Cloud
- **Latest version:** remote
- **Ships in official plugins:** [clickhouse](https://github.com/ClickHouse/clickhouse-claude-code-plugin) (Claude plugin directory, install: `/plugin install clickhouse@claude-plugins-official`)
- **Evidence:** live probe 2026-11-10: https://mcp.clickhouse.cloud/mcp answers 401 with WWW-Authenticate resource_metadata /.well-known/oauth-protected-resource/mcp (scopes mcp:access, openid, profile, email); protocol revision and statelessness not observable without a ClickHouse Cloud sign-in; tools from the ClickHouse docs remote_mcp page and the plugin setup skill (ClickHouse/clickhouse-claude-code-plugin a313980, .mcp.json type http); plugin listed in anthropics/claude-plugins-official marketplace.json at dceb15d
- **Last verified:** 2026-11-10
- **Score:** 58/100 (rubric 2027-01 — see https://top-mcps.com/about/methodology)
- **Homepage:** https://clickhouse.com/docs/use-cases/AI/MCP/remote_mcp

## Tools & permissions

| Tool | Description | Args | Side effects |
|------|-------------|------|--------------|
| `get_organizations` | List the ClickHouse Cloud organizations the user can access. | `—` | read |
| `get_organization_details` | Details of one organization. | `—` | read |
| `get_services_list` | List the services in an organization. | `—` | read |
| `get_service_details` | Details of one service. | `—` | read |
| `list_databases` | List the databases in a service. | `—` | read |
| `list_tables` | List tables in a database, with like / notLike filters. | `—` | read |
| `run_select_query` | Run a read-only SELECT query (timeoutSeconds default 300, max 3600). | `—` | read |
| `list_clickpipes` | List the ClickPipes of a service. | `—` | read |
| `get_clickpipe` | Details of one ClickPipe. | `—` | read |
| `list_service_backups` | List the backups of a service. | `—` | read |
| `get_service_backup_details` | Details of one backup. | `—` | read |
| `get_service_backup_configuration` | Backup schedule and retention settings. | `—` | read |
| `get_organization_cost` | Billing and usage cost data, at most a 31-day window. | `—` | read |

## Security & scope

- **Access scope:** read-only
- **Sandbox:** Hosted by ClickHouse. Acts as the signed-in ClickHouse Cloud user through an OAuth grant, or as a ClickHouse Cloud API key sent as HTTP Basic for headless hosts; query tools are SELECT-only on the server.
- **Gotchas:**
  - get_organization_cost returns billing data for the organization, so anyone the agent reports to sees spend.
  - An API key used for headless access needs an IP allowlist: an empty list denies all access, and a key with query permission reaches every service it is attached to.
  - The server is closed-source and hosted; its behaviour can change without a release you can pin.

## Quick answer

**What it does.** Exposes ClickHouse Cloud over Streamable HTTP: get_organizations, get_organization_details, get_services_list, get_service_details, list_databases, list_tables, run_select_query (SELECT only), list_clickpipes, get_clickpipe, list_service_backups, get_service_backup_details, get_service_backup_configuration and get_organization_cost (31-day window).

**Best for:**
- Read-only analytics on ClickHouse Cloud under OAuth
- Schema discovery across Cloud services
- Checking backup schedules and recent backups
- Reviewing ClickPipes configuration
- Monthly cost questions for an organization

**Not for:**
- Self-managed ClickHouse clusters
- Inserts, DDL or other writes
- Queries that run longer than the client's tool timeout
- Services where MCP has not been enabled in the console

## Recipes

### Check last week's backups and spend for one service

```
In my ClickHouse Cloud organization, find the service named analytics-prod. List its backups from the last 7 days with their status, show its backup schedule and retention, and report the organization cost for the last 7 days. Read only - change nothing.
```

_Tested with: Claude Code, Cursor_

## Description

ClickHouse runs a hosted MCP server for ClickHouse Cloud at `https://mcp.clickhouse.cloud/mcp`. An agent signs in with the user's ClickHouse Cloud account over OAuth, lists organizations, services, databases and tables, runs read-only SELECT queries, and reads the control-plane state the self-hosted server cannot see: service details, backups and their schedule, ClickPipes, and organization cost. It is the server the official ClickHouse plugin in the Claude plugin directory bundles. MCP is switched on per service in the ClickHouse Cloud console.

## Why it matters

It removes the database password from the agent's config: access is an OAuth grant tied to the signed-in user, and every query tool is read-only on the server side. It also answers operational questions about the Cloud account itself - is the backup schedule what we think, what did this service cost last month - which a SQL-only server cannot reach.

## Key features

- Hosted by ClickHouse at mcp.clickhouse.cloud/mcp - nothing to install
- OAuth with the ClickHouse Cloud account; API-key Basic auth for headless hosts
- run_select_query permits SELECT only
- Control-plane tools: services, backups, ClickPipes, cost
- Bundled by the official clickhouse plugin in the Claude plugin directory

## FAQ

### How is this different from the ClickHouse MCP server listed here?

Both are ClickHouse's. This one is hosted, signs in with your ClickHouse Cloud account over OAuth, is read-only, and also reads services, backups, ClickPipes and cost. The other (mcp-clickhouse) runs locally with a database user and password, works against any ClickHouse including self-managed clusters, and can enable writes. Pick by where the data lives and whether the agent may ever write.

### How do I turn it on?

In the ClickHouse Cloud console open the service, choose Connect, then Connect with MCP, and switch MCP on. That needs the control-plane:service:manage-mcp permission and is set per service. Then add https://mcp.clickhouse.cloud/mcp to your client and complete the OAuth sign-in.

### Can it write to my tables?

No. run_select_query permits SELECT statements only and every other tool reads control-plane state. For writes, use the self-hosted server with CLICKHOUSE_ALLOW_WRITE_ACCESS, against a role you have scoped deliberately.

### Why does a long query fail in Claude Code?

Claude Code stops any MCP tool call after 30 seconds, whatever timeoutSeconds the query asks for (the server allows up to 3600). Query materialized views or pre-aggregated tables, add LIMIT, and split a slow question into smaller queries. A service that was idle can also take 10 to 20 seconds to wake on the first query.

### Is there source code to read?

No. The server is hosted by ClickHouse and its code is not published; the linked documentation and the ClickHouse plugin repository describe how to connect, not the server itself. The open-source mcp-clickhouse is a separate server.

## Changelog

- **2026-11-10** — Added alongside the ClickHouse server (mcp-clickhouse): ClickHouse's hosted remote server for ClickHouse Cloud, the one the official clickhouse Claude plugin bundles.
