• AUTOMATION
  • MODIFICATION
  • DATA FLOW
  • HUMAN

How to manage database schema with your AI

Connect your AI to ClickHouse once. After that, you can change your database structure just by asking.

Ask AI about this page

Short answer

Can my AI change my ClickHouse schema?

Yes. Your AI uses the execute_query tool to run DDL and DML commands against your ClickHouse instance. You can add columns, create tables, or update existing structures through natural language. Here is how it works.

The results of your requests.

What your schema changes achieve.

The AI handles the syntax while you control the logic.

AUTOMATION

Instant table creation

The AI writes the CREATE TABLE statement and runs it immediately. You get a new table without typing any SQL.

MODIFICATION

Live schema updates

Add columns or change data types on the fly. The AI handles the ALTER TABLE logic for your existing tables.

DATA FLOW

Direct data updates

The AI can insert or update rows to keep your data in sync with your new schema.

HUMAN

Manual oversight

You decide which queries are safe to run. The AI proposes the change, but you remain the final authority.

The workflow

What your AI does when a schema request arrives.

The AI translates your intent into valid ClickHouse syntax.

  1. Analyze intent

    Your agent looks at your request to determine if you need a new table, a column change, or a data update.

    execute_query
  2. Draft SQL

    The AI writes the specific ClickHouse dialect SQL required for the task, including engine types and partitioning keys.

    execute_query
  3. Run command

    The agent sends the command to your ClickHouse instance to apply the structural changes.

    execute_query
  4. Confirm results

    The AI checks the output of the command to ensure the schema updated correctly and reports back to you.

    execute_query

Try it

Copy these to start.

Use these prompts to begin managing your database.

Starting points

These are opening lines. Swap out the table names and column types to match your actual ClickHouse setup.

ClickHouse Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_vh45Xvmk8E2B7cahxxnRmSHdcoQUTkiyCXVcszPX/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — ClickHouse capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "clickhouse-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_vh45Xvmk8E2B7cahxxnRmSHdcoQUTkiyCXVcszPX/mcp"
    }
  }
}
Copy into chat04
  • Create a new ClickHouse table named user_logs with columns for user_id, event_type, and timestamp.

  • Add a column called device_info to my existing web_traffic table.

  • Update the user_profiles table to change the age column from Int32 to UInt32.

  • Drop the temporary_cache table from my database.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect ClickHouse once, then ask.

Enter your credentials once. Vinkius keeps your connection secure and encrypted, and the full walkthrough lives on the Connector page.

Connect ClickHouse to your AI

FAQ

How this task behaves.

  • 01

    Can the AI delete my entire database?

    No. The AI only executes the specific commands you ask it to run. It cannot perform mass deletions unless you explicitly command it to do so.

  • 02

    Does the AI handle ClickHouse-specific engines?

    Yes. Since it uses execute_query, it can handle MergeTree, ReplacingMergeTree, and other engines as long as you specify them in your request.

  • 03

    Will the AI automatically fix my broken SQL?

    The AI will attempt to write correct syntax, but it does not have permission to bypass your database's internal constraints or security rules.

  • 04

    Can the AI manage users and permissions?

    No. This MCP is designed for schema and data manipulation via queries. It does not have tools for user management or access control.

  • 05

    Does it work with any ClickHouse version?

    Yes, as long as the SQL commands you request are compatible with your specific ClickHouse version.

  • More questions about ClickHouse? See everything the ClickHouse Connector can do

Connect ClickHouse to Claude, Cursor, ChatGPT & more