Skip to content

docs: clarify ClickHouse vs MCP environment variables - #211

Merged
joe-clickhouse merged 4 commits into
ClickHouse:mainfrom
sankalpsthakur:docs/clarify-env-var-descriptions
Jul 23, 2026
Merged

docs: clarify ClickHouse vs MCP environment variables#211
joe-clickhouse merged 4 commits into
ClickHouse:mainfrom
sankalpsthakur:docs/clarify-env-var-descriptions

Conversation

@sankalpsthakur

@sankalpsthakur sankalpsthakur commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #172

What

Restructures and clarifies the Environment Variables section of the README so users can distinguish:

  1. ClickHouse database connection settings (CLICKHOUSE_HOST, CLICKHOUSE_SECURE, CLICKHOUSE_PORT, …)
  2. MCP server / transport settings (CLICKHOUSE_MCP_*, auth)

Why

As reported in #172, variables like CLICKHOUSE_SECURE are easy to misread as MCP/ingress TLS controls. Users running the server behind Kubernetes ingress have disabled them thinking they applied to the MCP connection, then hit opaque HTTP client errors when the process dialed ClickHouse over the wrong scheme.

This PR:

  • Adds an overview table separating config groups
  • Calls out the ingress/Kubernetes pitfall with an IMPORTANT note
  • Documents HTTP interface ports (8123/8443) vs native TCP ports (9000/9440)
  • Splits optional vars into database connection vs MCP server and transport
  • Adds a short Common configuration pitfalls section

Companion code change: #212 adds actionable connection-failure hints for the same misconfiguration patterns (native port / TLS / scheme).

Validation

  • Docs-only change; no runtime behavior changed
  • Reviewed rendered markdown structure for consistency with existing README style

Make it explicit that CLICKHOUSE_SECURE/PORT/VERIFY configure the
database HTTP(S) connection, not the MCP transport. Group env vars
into database connection vs MCP server/transport sections, document
HTTP vs native ports, and add common configuration pitfalls.

Fixes ClickHouse#172
@CLAassistant

CLAassistant commented Jul 22, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@sankalpsthakur

Copy link
Copy Markdown
Contributor Author

related: #97

@joe-clickhouse joe-clickhouse left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sankalpsthakur thanks! Appreciate the work. Hope you don't mind but I pushed a small followup that subtly changes the environment-variable grouping language so it accurately covers both client configuration and tool behavior. I also added the existing CLICKHOUSE_PROXY_PATH setting to make the config reference complete since I found that that one was missing entirely.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restructures the README’s Environment Variables section to clearly separate ClickHouse database connection settings from MCP server/transport settings, addressing the confusion reported in #172 (notably around CLICKHOUSE_SECURE and port selection).

Changes:

  • Adds a top-level grouping table and an IMPORTANT note clarifying which variables apply to ClickHouse vs MCP transport.
  • Expands ClickHouse connection docs to distinguish HTTP interface ports (8123/8443) from native TCP ports (9000/9440) and highlights common misconfigurations.
  • Splits configuration into clearer subsections and adds a “Common configuration pitfalls” list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
@sankalpsthakur

Copy link
Copy Markdown
Contributor Author

Ready on our side whenever you want to merge.

@joe-clickhouse
joe-clickhouse merged commit 1235413 into ClickHouse:main Jul 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better descriptions for Environment Variables

4 participants