setup

作者: clickhouse

引导用户完成此插件附带的ClickHouse MCP服务器连接的设置。在用户首次安装插件或遇到问题时使用…

npx skills add https://github.com/clickhouse/clickhouse-claude-code-plugin --skill setup

ClickHouse Plugin Setup

This plugin includes the ClickHouse Cloud Remote MCP server at https://mcp.clickhouse.cloud/mcp. It provides secure, read-only access to your ClickHouse Cloud clusters.

Setup Steps

  1. Verify the MCP server is connected: Check that the ClickHouse MCP server appears in your available tools. If it does, you're ready to go.

  2. Authenticate via OAuth: The MCP server uses OAuth with your ClickHouse Cloud credentials. Follow the prompts when first connecting to authorize access.

  3. Test the connection: Try listing databases or running a simple SELECT query to confirm everything works.

Troubleshooting

  • Server not appearing: Run /reload-plugins to reload plugin MCP servers.
  • Authentication errors: Re-authenticate by following the OAuth flow when prompted.
  • Connection timeouts: Verify your network can reach https://mcp.clickhouse.cloud. The MCP server is a remote HTTP endpoint and requires internet access.

Claude Code Timeout Limitation

Claude Code enforces a 30-second timeout on all MCP tool calls. This cannot be changed by the user or the MCP server. While the run_select_query tool accepts a timeoutSeconds parameter (default 300s, max 3600s), Claude Code will kill the connection after 30 seconds regardless of this setting.

Implications:

  • Keep queries simple and fast — complex analytical queries that take longer than 30 seconds will fail
  • Use LIMIT clauses to bound result sets
  • Prefer querying materialized views or pre-aggregated tables over raw scans of large tables
  • If a query times out, break it into smaller, faster queries rather than increasing timeoutSeconds

What the MCP Server Provides

Once connected, the ClickHouse MCP server provides these tools:

Organization & Service Management

  • get_organizations — list all accessible ClickHouse Cloud organizations
  • get_organization_details — details of a single organization
  • get_services_list — list all services in an organization
  • get_service_details — details of a single service

Database Exploration

  • list_databases — list all databases in a service
  • list_tables — list tables in a database (supports like/notLike filtering)
  • run_select_query — execute read-only SELECT queries (⚠️ subject to 30s Claude Code timeout)

ClickPipes

  • list_clickpipes — list all ClickPipes for a service
  • get_clickpipe — details of a specific ClickPipe

Backups

  • list_service_backups — list all backups for a service
  • get_service_backup_details — details of a specific backup
  • get_service_backup_configuration — backup schedule and retention settings

Billing

  • get_organization_cost — billing and usage cost data (max 31-day window)

All tools are read-only. See the ClickHouse MCP docs for details.

Best Practices Skill

This plugin also includes the clickhouse-best-practices skill with 28 rules covering schema design, query optimization, and insert strategy. That skill activates automatically when you work with ClickHouse -- no setup needed.

来自 clickhouse 的更多技能

chdb-sql
clickhouse
直接在Python中运行ClickHouse SQL——无需服务器。使用完整的ClickHouse SQL功能查询本地文件、远程数据库和云存储。
official
chdb-datastore
clickhouse
DataStore 是一个基于 ClickHouse 的惰性 pandas 替代方案。你现有的 pandas 代码无需修改即可运行——但操作会被编译为优化的 SQL,并且仅在需要结果时(例如 print()、len()、迭代)才执行。
official
clickhouse-architecture-advisor
clickhouse
在设计ClickHouse架构、选择数据摄入或建模模式,或将最佳实践转化为特定工作负载的系统时,必须使用……
official
clickhouse-best-practices
clickhouse
28条ClickHouse最佳实践规则,按模式设计、查询优化和数据摄入策略组织。涵盖三个关键领域:主键与数据类型选择(不可变设计决策)、JOIN与查询优化、批量插入与避免突变。包含28条按影响程度排序的规则,其中模式设计和查询优化规则因ClickHouse的列式存储和稀疏索引机制被标记为关键。提供结构化审查流程用于...
official
clickhousectl-cloud-deploy
clickhouse
当用户希望将ClickHouse部署到云端、投入生产环境、使用ClickHouse Cloud、托管托管式ClickHouse服务,或从本地迁移时使用…
official
clickhousectl-local-dev
clickhouse
当用户想要使用ClickHouse构建应用程序、搭建本地ClickHouse开发环境、安装ClickHouse、创建本地服务器时使用…
official
clickhouse-js-node-coding
clickhouse
参考:https://clickhouse.com/docs/integrations/javascript
official
clickhouse-js-node-troubleshooting
clickhouse
参考:https://clickhouse.com/docs/integrations/javascript
official