Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ The following environment variables are used to configure the ClickHouse and chD
* `CLICKHOUSE_VERIFY`: Enable/disable SSL certificate verification
* Default: `"true"`
* Set to `"false"` to disable certificate verification (not recommended for production)
* TLS certificates: The package attempts to use your operating system trust store if `truststore` is installed. We try `truststore.inject_into_ssl()` at startup; if unavailable, Python’s default SSL behavior is used.
* `CLICKHOUSE_CONNECT_TIMEOUT`: Connection timeout in seconds
* Default: `"30"`
* Increase this value if you experience connection timeouts
Expand Down
3 changes: 1 addition & 2 deletions fastmcp.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"dependencies": [
"clickhouse-connect",
"python-dotenv",
"pip-system-certs",
"truststore",
"chdb"
]
}
}

10 changes: 10 additions & 0 deletions mcp_clickhouse/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

from .mcp_server import (
create_clickhouse_client,
list_databases,
Expand All @@ -8,6 +10,14 @@
chdb_initial_prompt,
)


if os.getenv("MCP_CLICKHOUSE_TRUSTSTORE_DISABLE", None) != "1":
try:
import truststore
truststore.inject_into_ssl()
except Exception:
pass

__all__ = [
"list_databases",
"list_tables",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
"fastmcp>=2.0.0",
"python-dotenv>=1.0.1",
"clickhouse-connect>=0.8.16",
"pip-system-certs>=4.0",
"truststore>=0.10",
"chdb>=3.3.0",
]

Expand Down
Loading