CCM
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Skill index
  • MCP index
  • Marketplace index
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by mertbuilds.com

Independent project, not affiliated with Anthropic
alyiox avatar

ClickHouse

alyiox/mcp-clickhousex
13 toolsauthSTDIOregistry active
Summary

Connects Claude to ClickHouse for read-only database exploration and analytics. Exposes tools to run SELECT queries with parameterized inputs, inspect metadata across databases and tables, and analyze query plans. Enforces strict no-write policies and rejects DML or DDL statements. Supports multiple connection profiles via environment variables or config file, plus snapshot mode for large result sets that exceed the interactive 1,000 row ceiling. Query results return as CSV with configurable timeouts and row limits. Useful when you need Claude to explore table structures, validate query logic, or pull analytical data from ClickHouse without risking schema changes.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
inference shell
inference shell
create and run specialised agents in minutes
build now →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
inference shell
inference shell
create and run specialised agents in minutes
build now →

Tools

Public tool metadata for what this MCP can expose to an agent.

13 tools
get_clickpipeReturns the specified ClickPipe.3 params

Returns the specified ClickPipe.

Parameters* required
clickPipeIdstring
ID of the requested ClickPipe
organizationIdstring
ID of the organization that owns the service
serviceIdstring
ID of the service that owns the ClickPipe
get_organizationsRetrieves all accessible ClickHouse Cloud organizations.

Retrieves all accessible ClickHouse Cloud organizations.

No parameter schema in public metadata yet.

run_select_queryExecutes a SELECT query against a ClickHouse service. Runs a read-only SELECT query on the specified ClickHouse service via the Query API endpoint. This function provides direct access to database content through SQL queries while ensuring that only read operations are permitted.3 params

Executes a SELECT query against a ClickHouse service. Runs a read-only SELECT query on the specified ClickHouse service via the Query API endpoint. This function provides direct access to database content through SQL queries while ensuring that only read operations are permitted.

Parameters* required
querystring
A valid ClickHouse SQL SELECT query string
serviceIdstring
The unique identifier of the ClickHouse service
timeoutSecondsinteger
Maximum time in seconds to wait for the query to complete. Defaults to 300 (5 minutes), maximum is 3600 (1 hour). Use lower values for simple queries and higher values for complex analytical queries.
list_databasesRetrieves all databases available in a ClickHouse service.1 params

Retrieves all databases available in a ClickHouse service.

Parameters* required
serviceIdstring
list_tablesRetrieves a comprehensive list of tables in a ClickHouse database, including columns.4 params

Retrieves a comprehensive list of tables in a ClickHouse database, including columns.

Parameters* required
databasestring
Name of the database to list tables from
likestring
Optional SQL LIKE pattern to filter tables by name (e.g., "events_%")
notLikestring
Optional SQL LIKE pattern to exclude tables by name
serviceIdstring
The unique identifier of the ClickHouse service
get_services_listRetrieves all services in a ClickHouse Cloud organization.1 params

Retrieves all services in a ClickHouse Cloud organization.

Parameters* required
organizationIdstring
ID of the organization whose services are to be listed
get_organization_detailsReturns details of a single organization. The auth key must belong to the organization.1 params

Returns details of a single organization. The auth key must belong to the organization.

Parameters* required
organizationIdstring
ID of the organization to retrieve
get_service_detailsReturns a service that belongs to the organization.2 params

Returns a service that belongs to the organization.

Parameters* required
organizationIdstring
ID of the organization
serviceIdstring
ID of the service to retrieve
list_clickpipesRetrieves all ClickPipes configured for a specific service.2 params

Retrieves all ClickPipes configured for a specific service.

Parameters* required
organizationIdstring
ID of the organization
serviceIdstring
ID of the service to list ClickPipes for
list_service_backupsReturns a list of all backups for the service. The most recent backups comes first in the list.2 params

Returns a list of all backups for the service. The most recent backups comes first in the list.

Parameters* required
organizationIdstring
ID of the organization
serviceIdstring
ID of the service to list backups for
get_organization_costRetrieves billing and usage cost data for a ClickHouse Cloud organization. Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days).3 params

Retrieves billing and usage cost data for a ClickHouse Cloud organization. Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days).

Parameters* required
from_datestring
Start date for the report, e.g. 2024-12-19 (YYYY-MM-DD)
organizationIdstring
The unique identifier of the organization
to_datestring
End date (inclusive) for the report, e.g. 2024-12-20 (YYYY-MM-DD). Cannot be more than 30 days after from_date.
get_service_backup_detailsReturns a single backup info.3 params

Returns a single backup info.

Parameters* required
backupIdstring
ID of the backup
organizationIdstring
ID of the organization that owns the service
serviceIdstring
ID of the service
get_service_backup_configurationReturns the service backup configuration.2 params

Returns the service backup configuration.

Parameters* required
organizationIdstring
ID of the organization that owns the service
serviceIdstring
ID of the service

MCP ClickHouse Tool

CI PyPI Python 3.13+ License: MIT

A read-only Model Context Protocol (MCP) server for ClickHouse that supports metadata discovery, resources, parameterized SELECT queries, SHOW introspection, query analysis, and snapshot mode for large result sets, with profile-based configuration and strict no-DML/DDL enforcement.

Requirements: Python 3.13+, a running ClickHouse instance, and connection details via environment variables or a config file.

Quick start

Set a DSN and run the server with MCP Inspector:

# Option 1: Run directly with uvx (no clone needed)
export MCP_CLICKHOUSE_DSN="http://default:@localhost:8123/default"
npx -y @modelcontextprotocol/inspector uvx mcp-clickhousex
# Option 2: Run from source (clone repo, then)
export MCP_CLICKHOUSE_DSN="http://default:@localhost:8123/default"
npx -y @modelcontextprotocol/inspector uv run main.py

Configuration

All settings use the MCP_CLICKHOUSE prefix. Flat environment variables (e.g. MCP_CLICKHOUSE_DSN) are the straightforward way to configure the default profile when you have a single connection. For multiple profiles, the user-scoped config.json file is recommended.

Single connection: Configure via environment variables.

# Connection DSN (required).
export MCP_CLICKHOUSE_DSN="http://user:password@host:8123/database"

# Optional description for the default profile (tooling/AI discovery).
export MCP_CLICKHOUSE_DESCRIPTION="Primary cluster"

# Optional max rows per interactive query (default 500; hard ceiling 1000).
export MCP_CLICKHOUSE_QUERY_MAX_ROWS="500"

# Optional interactive query timeout in seconds (default 30; hard ceiling 300).
export MCP_CLICKHOUSE_QUERY_COMMAND_TIMEOUT_SECONDS="30"

# Optional max rows for snapshot queries (default 10000; hard ceiling 50000).
export MCP_CLICKHOUSE_SNAPSHOT_MAX_ROWS="10000"

# Optional snapshot query timeout in seconds (default 120; hard ceiling 300).
export MCP_CLICKHOUSE_SNAPSHOT_COMMAND_TIMEOUT_SECONDS="120"

Multiple connections: Use the user-scoped config.json file (recommended). Env vars also work via the MCP_CLICKHOUSE_PROFILES_<NAME>_ prefix (e.g. MCP_CLICKHOUSE_PROFILES_WAREHOUSE_DSN).

  • Unix-like: ~/.config/mcp-clickhousex/config.json
  • Windows: %USERPROFILE%\.config\mcp-clickhousex\config.json

Example (config.json):

{
  "profiles": {
    "default": {
      "dsn": "http://default:@localhost:8123/default",
      "description": "Primary",
      "query_max_rows": 500,
      "query_command_timeout_seconds": 60,
      "snapshot_max_rows": 10000,
      "snapshot_command_timeout_seconds": 120
    },
    "warehouse": {
      "dsn": "http://user:pass@warehouse:8123/analytics",
      "description": "Warehouse"
    }
  }
}

Special characters in credentials: If the username or password contains URL-reserved characters, percent-encode them in the DSN:

CharacterEncoding
#%23
?%3F
/%2F
@%40
%%25

For example, username admin@org and password p#ss? become admin%40org:p%23ss%3F in the DSN: http://admin%40org:p%23ss%3F@host:8123/database.

Tools

Tool descriptions match server.py tool docstrings except the [ClickHouse] prefix is omitted here (it remains in MCP-exposed metadata). Parameter text matches each Field(description=…) on the same tool.

ToolDescriptionKey params
list_profilesList configured profiles. Each entry includes name and optional description.—
get_cluster_propertiesGet cluster properties and execution limits. Returns ClickHouse server version plus enforced limits (max rows, timeouts) for the profile.profile — Profile name; uses default profile when omitted. Src: profiles.
run_queryExecute read-only SELECT or WITH … SELECT. One statement; DML, DDL, SET, SYSTEM, and similar are rejected. Returns {data, row_count} where data is an RFC 4180 CSV string. Pass snapshot=true to persist the result to disk and receive {snapshot_uri, row_count} instead; fetch the CSV via the snapshot resource URI. Max-rows cap; overflow sets truncated and row_limit. Same SQL validation as analyze_query.sql (required) — Read-only SELECT or WITH … SELECT. One statement; use qualified db.table or database. Driver placeholder syntax for parameters. parameters — Named parameters for driver placeholders (e.g. %(name)s or {name:Type}). database — Session default database for unqualified names. Src: databases. profile — Profile name; uses default profile when omitted. Src: profiles. snapshot — When true, persist the full result as a CSV file and return a resource URI (chx://snapshots/{id}) instead of inline data. Use for queries that may exceed the interactive row limit (1 000). Snapshot limits apply (default 10 000 rows, hard ceiling 50 000). Entries expire after 7 days.
run_showExecute SHOW introspection statement. One statement per call; INTO OUTFILE rejected. Interactive row limits apply (default 500, hard ceiling 1 000). Same timeout as run_query.sql (required) — Single SHOW statement (e.g. SHOW DATABASES, SHOW CREATE TABLE). No INTO OUTFILE. parameters — Named parameters for driver placeholders (e.g. %(name)s or {name:Type}). database — Session default database for unqualified names. Src: databases. profile — Profile name; uses default profile when omitted. Src: profiles.
analyze_queryExplain read-only SELECT or WITH … SELECT. Returns plan, pipeline, and/or syntax text. Default types plan and pipeline. Uses query timeout and optional database; no max-rows cap unlike run_query.sql (required) — Read-only SELECT or WITH … SELECT for EXPLAIN. One statement; same validation as run_query. parameters — Named parameters for driver placeholders (e.g. %(name)s or {name:Type}). database — Session default database for unqualified names. Src: databases. profile — Profile name; uses default profile when omitted. Src: profiles. types — EXPLAIN variants: plan (indexes), pipeline, syntax. Default plan and pipeline if omitted.
list_databasesList databases. Rows from system.databases visible to the connection.profile — Profile name; uses default profile when omitted. Src: profiles.
list_tablesList tables and views in a database. Rows from system.tables: name, engine, primary_key, sorting_key, partition_key, total_rows, total_bytes for query planning.database — Database to list; client default when omitted. Src: databases. profile — Profile name; uses default profile when omitted. Src: profiles.
list_columnsList columns for a table or view. Rows from system.columns for the resolved database and table.table (required) — Table or view name, or database.table. Src: tables. database — Database when table is unqualified; ignored if table contains a dot. Client default when omitted. Src: databases. profile — Profile name; uses default profile when omitted. Src: profiles.

Resources

The server exposes the same discovery and metadata as the tools above via URI-addressable resources (profile-first hierarchy). Each resource’s description matches the corresponding tool (list_profiles, get_cluster_properties, list_databases, list_tables, list_columns), plus Src: tags for URI path parameters. All resource content is JSON (application/json) except snapshots which return CSV (text/csv). Use path segment default for the default profile or database.

Resource descriptions match description=… on @mcp.resource in server.py (same prefix omission as above).

URIDescription
chx://profilesList configured profiles. Each entry includes name and optional description.
chx://profiles/{profile}/cluster-propertiesGet cluster properties and execution limits. Returns ClickHouse server version plus enforced limits (max rows, timeouts) for the profile. Src: profiles.
chx://profiles/{profile}/databasesList databases. Rows from system.databases visible to the connection. Src: profiles.
chx://profiles/{profile}/databases/{database}/tablesList tables and views in a database. Rows from system.tables: name, engine, primary_key, sorting_key, partition_key, total_rows, total_bytes for query planning. Src: profiles, dbs.
chx://profiles/{profile}/databases/{database}/tables/{table}/columnsList columns for a table or view. Rows from system.columns for the resolved database and table. Src: profiles, dbs, tables.
chx://snapshots/{id}Fetch a query result snapshot by ID. Returns the full result as a CSV string (header row + data rows). Entries expire after 7 days. Src: run_query with snapshot=true.

Security

Read-only SQL only: run_query allows SELECT / WITH … SELECT; run_show allows a single SHOW statement per call. INTO OUTFILE is not allowed on run_show. Interactive queries enforce a tight row cap (default 500, hard ceiling 1 000); for larger extracts use snapshot=true (default 10 000, hard ceiling 50 000). Parameterized queries are supported where the driver allows (%(name)s or {name:Type} syntax). Use environment variables for connection credentials — never commit secrets.

MCP host examples

Snippets for common MCP clients using uvx mcp-clickhousex (no clone required; ensure uv is on your PATH). Replace connection details as needed.

Cursor

{
  "mcpServers": {
    "clickhouse": {
      "command": "uvx",
      "args": ["mcp-clickhousex"],
      "env": {
        "MCP_CLICKHOUSE_DSN": "http://default:@localhost:8123/default"
      }
    }
  }
}

Codex

[mcp_servers.clickhouse]
command = "uvx"
args = ["mcp-clickhousex"]

[mcp_servers.clickhouse.env]
MCP_CLICKHOUSE_DSN = "http://default:@localhost:8123/default"

OpenCode

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "clickhouse": {
      "type": "local",
      "enabled": true,
      "command": ["uvx", "mcp-clickhousex"],
      "environment": {
        "MCP_CLICKHOUSE_DSN": "http://default:@localhost:8123/default"
      }
    }
  }
}

Claude Code

{
  "mcpServers": {
    "clickhouse": {
      "command": "uvx",
      "args": ["mcp-clickhousex"],
      "env": {
        "MCP_CLICKHOUSE_DSN": "http://default:@localhost:8123/default"
      }
    }
  }
}

Copilot

{
  "inputs": [],
  "servers": {
    "clickhouse": {
      "type": "stdio",
      "command": "uvx",
      "args": ["mcp-clickhousex"],
      "env": {
        "MCP_CLICKHOUSE_DSN": "http://default:@localhost:8123/default"
      }
    }
  }
}

Config file locations: Cursor .cursor/mcp.json, Codex/Copilot/OpenCode vary by client; see your client's MCP docs.

Tests

Tests require a running ClickHouse instance. The test suite creates a sample table in the default database, seeds it, and drops it after.

# Run all tests (unit + functional + e2e)
uv run pytest tests/ -v

The test harness uses MCP_TEST_CLICKHOUSE_DSN to locate the ClickHouse instance. If unset, it falls back to http://admin:password123@localhost:8123/default. Set the variable to point tests at a different server without affecting your production MCP_CLICKHOUSE_DSN:

export MCP_TEST_CLICKHOUSE_DSN="http://user:pass@testhost:8123/default"
uv run pytest tests/ -v

Roadmap

No planned features at this time. Open an issue to suggest improvements.

Contributing

Open issues or PRs; follow existing style and add tests where appropriate.

License

MIT. See LICENSE.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
MCP-ready Email SendingMCP-ready Email Sending
MCP-ready Email Sending
Plug Mailtrap into your AI workflow and let it handle the email.
Connect Mailtrap MCP →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Capacitor - Shared memory for your team’s coding agents.
Capacitor - Shared memory for your team’s coding agents.
Make coding agent sessions - Searchable, Shareable, Vendor-neutral & Scored.
Try For Free →
CodeScene MCP ServerCodeScene MCP Server
CodeScene MCP Server
Your agent targets a perfect 10 Code Health score. Deterministic. Every commit.
Try For Free →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
inference shell
inference shell
create and run specialised agents in minutes
build now →

Configuration

MCP_CLICKHOUSE_DSNsecret

Optional shortcut DSN for the default profile, for example http://user:password@host:8123/database. For multiple profiles, use ~/.config/mcp-clickhousex/config.json or MCP_CLICKHOUSE_PROFILES_<NAME>_DSN.

Categories
Databases
Registryactive
Packagemcp-clickhousex
TransportSTDIO
AuthRequired
UpdatedApr 30, 2026
View on GitHub

More from alyiox

  • Microsoft SQL Server5
  • Walmart Connect Advertising APIs1
  • Atlassian Attachments

Related Databases MCP Servers

View all →
annasmazhar avatar
Pyspark Mcp

annasmazhar/pyspark_mcp

SQL to PySpark conversion, AWS Glue job generation, and Spark code optimization.
ansvar-systems avatar
Canadian Law Mcp

ansvar-systems/canadian-law-mcp

Canadian federal law database — PIPEDA, CASL, cybercrime, corporate law with full-text search
ansvar-systems avatar
Chinese Law Mcp

ansvar-systems/chinese-law-mcp

Chinese law database — cybersecurity, data protection, commercial law with full-text search
ansvar-systems avatar
Singapore Law Mcp

ansvar-systems/singapore-law-mcp

Singapore law database — PDPA, Cybersecurity Act, Computer Misuse Act with full-text search
ansvar-systems avatar
South Korea Law Mcp

ansvar-systems/south-korea-law-mcp

South Korean law database — PIPA, ICT network security, credit information with full-text search
ansvar-systems avatar
Thailand Law Mcp

ansvar-systems/thailand-law-mcp

Thai law database — PDPA, Computer Crime Act, Cybersecurity Act, ETA with full-text search