Skip to main content
Glama
dockndevai

mcp-clickhouse

mcp-clickhouse

CI License: MIT npm

A Model Context Protocol server for ClickHouse. It lets an MCP-capable client (Claude Desktop, Claude Code, etc.) explore schemas, run analytical queries, and manage the database — with behaviour controlled entirely by flags.

The security model is statement-aware: every SQL statement is classified as read, write, or destructive, and gated against the current access mode. Read-only mode additionally runs queries under ClickHouse's own readonly=1 setting.

Features

  • Exploration & monitoring — databases, tables, columns, SHOW CREATE, table stats (parts/rows/bytes), running queries, server metrics, cluster topology.

  • Read queries — a query tool that only accepts read statements, capped at CLICKHOUSE_MAX_ROWS.

  • Management — an execute tool for INSERT/CREATE/ALTER (read-write) and DROP/TRUNCATE/DELETE (admin), each gated by classification.

  • Access modesread-onlyread-writeadmin, layered so a mode never exposes statements above its level.

  • Security flags — database allowlist, protected databases, destructive gating, row cap, dry-run, and JSON audit logging (see below).

Related MCP server: clickhouse-mcp-server

Security model

Concern

Flag

Default

Effect

What can the server do?

CLICKHOUSE_MODE

read-only

read-only exposes read tools only (and refuses non-SELECT in query); read-write adds execute for writes; admin allows destructive statements.

Which databases are in scope?

CLICKHOUSE_DATABASE_ALLOWLIST

(all)

When set, operations on other databases are refused.

Which databases are read-only forever?

CLICKHOUSE_PROTECTED_DATABASES

system,information_schema

Readable, never mutable.

Can it run destructive SQL?

CLICKHOUSE_ALLOW_DELETE

false

DROP/TRUNCATE/DELETE/… need this and admin mode.

Result size cap

CLICKHOUSE_MAX_ROWS

1000

Hard cap on rows returned to the model.

Preview without executing

CLICKHOUSE_DRY_RUN

false

Write/destructive statements validate + log intent, then return.

Audit trail

CLICKHOUSE_AUDIT_LOG

true

Emits a JSON line to stderr per guarded operation.

Interactive confirmation

(automatic)

Destructive & high-impact actions prompt the human to approve via MCP elicitation before running; clients without elicitation fall back to the *_ALLOW_* gate.

Statement classification lives in src/sql.ts and is fail-safe: ALTER … DELETE/UPDATE counts as destructive, and anything unparseable is treated as destructive.

Tools

Read (read-only+): list_databases, list_tables, describe_table, show_create_table, table_stats, running_queries, server_metrics, cluster_info, query

Write/Admin (read-write+): execute — runs a single statement after classifying it; writes need read-write mode, destructive statements need admin mode + CLICKHOUSE_ALLOW_DELETE.

Quickstart — add to your agent

Published on npm as @dockndevai/mcp-clickhouse. No clone or build needed — your MCP client runs it on demand with npx. Start in read-only mode; see .env.example for every variable and docs/CLIENTS.md for the full per-client guide.

Claude Code (CLI)

claude mcp add clickhouse -e CLICKHOUSE_URL="http://localhost:8123" -e CLICKHOUSE_USER="default" -e CLICKHOUSE_MODE="read-only" -- npx -y @dockndevai/mcp-clickhouse

Claude Desktop · Cursor · Windsurf — same block in claude_desktop_config.json, .cursor/mcp.json, or ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "clickhouse": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_URL": "http://localhost:8123",
        "CLICKHOUSE_USER": "default",
        "CLICKHOUSE_MODE": "read-only"
      }
    }
  }
}

OpenAI Codex CLI — in ~/.codex/config.toml:

[mcp_servers.clickhouse]
command = "npx"
args = ["-y", "@dockndevai/mcp-clickhouse"]
env = { CLICKHOUSE_URL = "http://localhost:8123", CLICKHOUSE_USER = "default", CLICKHOUSE_MODE = "read-only" }

VS Code (GitHub Copilot, Agent mode) — in .vscode/mcp.json:

{
  "servers": {
    "clickhouse": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-clickhouse"
      ],
      "env": {
        "CLICKHOUSE_URL": "http://localhost:8123",
        "CLICKHOUSE_USER": "default",
        "CLICKHOUSE_MODE": "read-only"
      }
    }
  }
}

Example prompts

  • "What are the biggest tables in the analytics database?"

  • "Show me the schema for events and run a query for daily counts this week."

  • "Which queries are currently running and using the most memory?"

Run from source (development)

Prefer the published package above. To run from a clone:

npm install
npm run build
node dist/index.js   # with the environment variables set

Develop

npm run dev
npm test          # SQL classification + security policy (30 tests)
npm run typecheck

Publishing

This server ships a server.json for the official MCP registry and an mcpName for npm ownership validation. See PUBLISHING.md for publishing to npm and listing on the MCP registry, Smithery, Glama, Cursor, and PulseMCP.

License

MIT

Available Tools

9 tools
cluster_infoCluster infoA
Read-onlyIdempotent

Cluster topology from system.clusters (shards, replicas, hosts).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds the specific system table source and the conceptual content returned, but it does not add broader behavioral context such as authentication requirements, output shape, or edge cases. This is acceptable with strong annotations but not exceptional.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, compact sentence that front-loads the core concept and avoids filler. Every clause contributes meaning, naming the source and the key aspects of the returned topology.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, read-only metadata inspection tool with no output schema, the description is complete. It tells the agent what information is available and from where, and the annotations cover the operational safety profile.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and 100% schema coverage, so the baseline is 4. There is nothing for the description to add about parameter meaning, and it does not attempt to invent any.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the resource: cluster topology sourced from system.clusters, with shards, replicas, and hosts as the relevant components. It is distinct from sibling tools like list_tables or server_metrics, but lacks an explicit verb such as 'get' or 'returns', so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool should be used when cluster topology from system.clusters is needed, and the lack of parameters makes prerequisites moot. However, it provides no explicit guidance about when to prefer it over alternatives or any exclusions, leaving usage partly to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

describe_tableDescribe tableB
Read-onlyIdempotent

Column names, types, defaults, and comments for a table.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesTable name
databaseYesDatabase name

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this as read-only, idempotent, and non-destructive, so the description's job is light. It adds some context about the returned metadata fields but does not describe behavior like errors, sorting, or format. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, compact sentence with no filler or redundant information. It front-loads the core purpose and is easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter read-only tool with strong annotations, the description adequately conveys the output in lieu of an output schema. It falls slightly short because it does not clarify how this differs from show_create_table, leaving potential ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% — both database and table have clear descriptions. The tool description does not add meaning beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the specific output content — column names, types, defaults, and comments — for a table, which clearly distinguishes it from siblings like list_tables and table_stats. It lacks an explicit verb but the intent is obvious and not a tautology.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives like show_create_table or table_stats. The agent must infer usage solely from the resource name and description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_databasesList databasesA
Read-onlyIdempotent

List databases and their engines.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this as read-only, idempotent, non-destructive, and open-world, which covers the safety profile. The description adds the behavioral detail that the result includes database engines, which is useful context beyond the annotations for a zero-parameter read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, six-word sentence that front-loads the action and resource while adding the one meaningful extra detail ('engines'). There is no wasted text or redundant phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple, parameterless read-only operation, the description plus annotations provide everything an agent needs: what is listed, what fields are returned, and the safety characteristics. No output schema exists, but the description sufficiently indicates the return content.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are zero parameters and the input schema fully documents this fact, so the description does not need to add any parameter-related information. Per the baseline for zero-parameter tools, this is appropriately handled.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('List'), a clear resource ('databases'), and an additional detail ('their engines'), which precisely identifies what the tool does. It is immediately distinguishable from sibling tools like list_tables or describe_table because it targets databases as the resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use is implied by the verb-resource pairing, so an agent can infer this is the tool to call when it needs to enumerate databases. However, the description provides no explicit when-to-use guidance and does not mention alternatives or exclusions, so it falls short of clearer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tablesList tablesA
Read-onlyIdempotent

List tables in a database with engine, row count, and size.

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover readOnly, idempotent, and non-destructive behavior. The description adds value by specifying the returned attributes (engine, row count, size), which goes beyond the schema and helps set expectations. No contradictions or hidden side effects are implied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that leads with the verb and includes the essential output details. There is no extraneous wording, and all information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple listing tool, the description covers what is returned and the required input. It doesn't detail potential ordering, pagination, or error conditions, but these are minor omissions given the simplicity and the strong annotations. The description is sufficient for an agent to understand the tool's core purpose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%—the sole parameter 'database' is clearly described as 'Database name'. The tool description adds no additional meaning about the parameter itself, so a baseline of 3 is appropriate; the schema already handles parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('List'), resource ('tables'), and the specific output fields (engine, row count, size). It naturally differentiates from siblings like list_databases (which lists databases) and describe_table (which focuses on a single table), so an agent can immediately determine what this tool offers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use it (to get an overview of tables in a database) but does not explicitly mention alternatives, conditions for choosing this tool over others, or any exclusions. With multiple sibling tools like describe_table and show_create_table, some guidance on when to prefer this one would help, but it's not misleading.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

queryRun a read-only queryA
Read-onlyIdempotent

Run a SELECT/SHOW/DESCRIBE query and return rows. Non-read statements are refused here — use execute (read-write mode) for those. Results are capped at CLICKHOUSE_MAX_ROWS.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYesA single read-only SQL statement

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds two behavioral traits beyond the annotations: non-read statements are refused (confirming readOnlyHint=true, no contradiction), and results are capped at CLICKHOUSE_MAX_ROWS — a genuinely useful disclosure the annotations don't carry. With annotations already covering the safety profile (readOnly, non-destructive, idempotent), the added row-cap context earns a solid score, though it doesn't clarify what happens on refusal (e.g., error type).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with zero waste: the action and accepted statement types are front-loaded, followed by the read/write exclusion and the result cap. Every sentence earns its place and the ordering prioritizes the most decision-relevant information first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-required-param tool with 100% schema coverage, no enums, no nested objects, and annotations carrying the safety profile, the description is nearly sufficient: it covers accepted statements, refusal behavior, and the row cap. The minor gap is the exact return shape beyond 'return rows', but given no output schema exists and the use case is generic querying, this is a small omission rather than a blocking one.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3 — the schema already documents `sql` as 'A single read-only SQL statement'. The description adds marginal value by enumerating the accepted statement types (SELECT/SHOW/DESCRIBE), which slightly narrows the schema's generic wording, but this is a minor refinement rather than substantive new semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb (run) and resource (SELECT/SHOW/DESCRIBE queries) and says it returns rows. It reads clearly as the general-purpose ad-hoc SQL tool among the specialized siblings (list_databases, table_stats, show_create_table, etc.). However, it does not explicitly differentiate why an agent would choose `query` over those specialized siblings — the general-vs-specialized boundary is only implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives an explicit when-not instruction: non-read statements are refused and the agent should use `execute` (read-write mode) instead, which is a clear exclusion with a named alternative. The gap is that it gives no guidance for choosing between this general tool and the specialized sibling tools (e.g., when to prefer `describe_table` or `table_stats` over writing a query), so routing among siblings is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

running_queriesRunning queriesA
Read-onlyIdempotent

Currently executing queries from system.processes (id, user, elapsed, memory).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, covering the safety profile. The description adds useful context by naming system.processes as the source and indicating the result is a live view of currently executing queries. However, it does not disclose ordering, limits, or potential permission issues.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense sentence that front-loads the core concept and packs the source and returned fields into a compact parenthetical. There is no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter, read-only introspection tool with strong annotations, the description is mostly complete: it names the source table and the fields returned. It falls just short of explicitly saying 'returns a list of...' and does not mention ordering, limits, or privileges, which would be more helpful given there is no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. There is nothing for the description to explain about parameter usage, and the schema coverage is trivially complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the resource and scope: currently executing queries from system.processes, including the fields returned (id, user, elapsed, memory). It is unambiguous about what the tool exposes, though it lacks an explicit verb like 'list' and does not explicitly distinguish itself from sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus related siblings such as query, server_metrics, or table_stats. The description implies it is for viewing active queries, but it does not state exclusions, prerequisites, or alternative tool routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

server_metricsServer metricsA
Read-onlyIdempotent

Non-zero metrics from system.metrics (connections, merges, memory, etc.).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive, and open-world behavior. The description adds useful behavioral context beyond that by stating that zero-valued metrics are filtered out and naming the source table, which helps an agent understand what results to expect.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that states the source, the filtering behavior, and representative categories. It is front-loaded and contains no filler or repetition of the title/annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless, read-only, idempotent tool, the description is sufficient to enable a correct call. No output schema exists, but the tool's simplicity and safe annotation profile mean the agent lacks no essential invocation guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and the schema is empty, so the baseline of 4 applies. There is no parameter ambiguity, and the description's mention of metric categories provides enough context for what can be explored.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies a specific resource (system.metrics) and a clear scope (non-zero entries covering connections, merges, memory, etc.). It implies retrieval of server-level metrics, which is enough to distinguish it from siblings like list_databases or cluster_info, though it lacks an explicit verb such as 'list' or 'get'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implicit: an agent would select this tool when it needs server metric values rather than schema, table, or query information. However, the description does not explicitly state when to prefer this over running_queries, cluster_info, or other siblings, nor does it mention exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

show_create_tableShow CREATE TABLEA
Read-onlyIdempotent

Return the full CREATE TABLE statement (schema, engine, settings) for a table.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesTable name
databaseYesDatabase name

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so no safety contradiction exists. The description adds useful behavioral context by specifying that the return value is the complete statement including schema, engine, and settings, but otherwise does not address error behavior or formatting.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence with no filler; the core action and result are front-loaded. The parenthetical '(schema, engine, settings)' adds meaningful specificity without bloat.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read-only tool with strong annotations, the description tells the agent what it will receive (the full CREATE TABLE statement). No output schema exists, but the return value is sufficiently described for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters (database, table) are fully described in the schema with 'Database name' and 'Table name', so schema coverage is 100%. The description adds no additional parameter-level meaning, keeping this at baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Return') and names a concrete resource ('full CREATE TABLE statement') with details schema, engine, settings. This clearly distinguishes the tool from siblings like describe_table or list_tables by focusing on the DDL statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to choose this tool over describe_table or list_tables. It does not state use cases, exclusions, or alternative tools, so an agent must infer when the full DDL is needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

table_statsTable statsA
Read-onlyIdempotent

Part count, row count, on-disk size, and time range from system.parts.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesTable name
databaseYesDatabase name

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is clear. The description adds minimal behavioral detail beyond naming the source table (system.parts), which hints at read-only access but isn't explicitly stated. It does not disclose potential caveats like staleness of data or limitations of system.parts, but the annotation coverage lowers the bar. A score of 3 reflects adequate but not rich added context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, tightly written sentence that immediately states the output metrics and source. Every word earns its place; there is no fill or repetition. It is ideally sized for an agent to quickly grasp the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no output schema, the description usefully enumerates what will be returned (part count, row count, on-disk size, time range). It does not mention how results are formatted or any limitations, but for a simple stats query the description covers the essential information an agent needs to invoke it correctly. The only gap is lack of usage guidance, but that is captured in another dimension.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with straightforward descriptions of 'database' and 'table'. The tool description adds nothing about parameter semantics, but since the schema already fully documents the parameters, the baseline of 3 applies. No additional meaning is needed for these simple parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states precisely what the tool provides—part count, row count, on-disk size, and time range—and identifies the source ('system.parts'). This is a specific verb-resource pairing that clearly differentiates it from siblings like list_tables or describe_table, which manage or describe schema rather than report physical stats.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus alternatives such as describe_table or show_create_table. The description does not mention any conditions, prerequisites, or scenarios that favor this tool over others. An agent must infer its applicability from the name and the listed metrics.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 9 tool updatesv0.1.0
    • First observedcluster_info
    • First observeddescribe_table
    • First observedlist_databases
    • First observedlist_tables
    • First observedquery
    • First observedrunning_queries
    • First observedserver_metrics
    • First observedshow_create_table
    • First observedtable_stats

TDQS

A3.6/5.0

Scored across 9 tools

Disambiguation4/5

Most tools target clearly distinct resources, but describe_table/show_create_table and list_tables/table_stats have some overlapping schema and size information. Descriptions are detailed enough that an agent can usually pick correctly.

Naming Consistency3/5

Names are mostly lowercase with underscores, but conventions vary: list_* and show_* use verb_noun, while running_queries, table_stats, server_metrics, and cluster_info are noun phrases, and query is a bare verb. The set is readable but not pattern-consistent.

Tool Count5/5

Nine tools is a well-scoped size for a ClickHouse observability/read server. Each tool covers a meaningful slice of database introspection and querying without feeling bloated.

Completeness2/5

The query tool explicitly says non-read statements should use execute in read-write mode, but no execute tool exists in the set. This is a significant dead end: agents are directed to a missing tool, and write/DDL operations are entirely unsupported despite being referenced.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    F
    maintenance
    An MCP server implementation that enables Claude AI to interact with Clickhouse databases. Features include secure database connections, query execution, read-only mode support, and multi-query capabilities.
    2
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables interaction with ClickHouse databases via MCP, providing tools to list databases and tables and execute safe SELECT, SHOW, and DESCRIBE queries.
    30
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server for executing SQL queries on PostgreSQL and ClickHouse with per-connection allow/deny policies by statement group.
    -