{"type":"mcp_server","name":"mcp-clickhouse","description":"This repository provides an MCP server for ClickHouse, enabling users to execute SQL queries, list databases, and list tables within a ClickHouse cluster. It offers tools for interacting with ClickHouse","category":"Database","language":"Python","stars":811,"forks":21,"owner":"ClickHouse","github_url":"https://github.com/ClickHouse/mcp-clickhouse","homepage":null,"setup":"## Setup\n\n1.  Open the Claude Desktop configuration file located at:\n   - On macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\n   - On Windows: `%APPDATA%/Claude/claude_desktop_config.json`\n\n2.  Add the provided JSON configuration to the `mcpServers` section, updating the environment variables to point to your ClickHouse service or the ClickHouse SQL Playground.\n\n3.  Locate the command entry for `uv` and replace it with the absolute path to the `uv` executable using `which uv` on macOS.\n\n4.  Restart Claude Desktop to apply the changes.\n\nFor development:\n\n1.  In `test-services` directory run `docker compose up -d` to start the ClickHouse cluster.\n\n2.  Add the provided variables to a `.env` file in the root of the repository.\n\n3.  Run `uv sync` to install the dependencies, following the instructions [here](https://docs.astral.sh/uv/) to install `uv`, then do `source .venv/bin/activate`.\n\n4.  For easy testing, you can run `mcp dev mcp_clickhouse/mcp_server.py` to start the MCP server.","tools":"## Available Tools\n\n\t\t1. `run_select_query` (Execute SQL queries on your ClickHouse cluster with `readonly = 1`.)\n\t\t2. `list_databases` (List all databases on your ClickHouse cluster.)\n\t\t3. `list_tables` (List all tables in a database.)","faq":null,"created_at":"2024-12-25T14:15:46+00:00","updated_at":"2025-03-28T12:55:19+00:00","source_url":"https://model-context-protocol.com/servers/mcp-server-clickhouse-sql-query-tool","related_articles":[]}