[{'Text': 'Found 9 matches:\n\n## Matches in point-topic-mcp/src/point_topic_mcp/connectors/clickhouse.py\n\n### L22-26\n```\n# Credential resolution\n# Env vars take priority (local dev / MCP client config).\n# If CLICKHOUSE_HOST is absent, fall back to AWS Secrets Manager\n# (ptserver-secret) — works transparently when running on the server.\n# ---------------------------------------------------------------------------\n```\n\n### def _resolve_credentials › L28-38\n```\ndef _resolve_credentials() -> dict:\n    host = os.environ.get("CLICKHOUSE_HOST")\n    if host:\n        port = int(os.environ.get("CLICKHOUSE_PORT", "443"))\n        return {\n            "host": host,\n            "port": port,\n            "username": os.environ.get("CLICKHOUSE_USER", "default"),\n            "password": os.environ.get("CLICKHOUSE_PASSWORD", ""),\n            "database": os.environ.get("CLICKHOUSE_DATABASE", "ontology"),\n            "secure": _tls_enabled(os.environ.get("CLICKHOUSE_SECURE"), port),\n```\n\n22 lines remaining in ancestor node. Read the file to see all.\n\n### def _resolve_credentials › L48-55\n```\n        return {\n            "host": secret["CLICKHOUSE_HOST"],\n            "port": port,\n            "username": secret.get("CLICKHOUSE_USER", "default"),\n            "password": secret["CLICKHOUSE_PASSWORD"],\n            "database": secret.get("CLICKHOUSE_DATABASE", "ontology"),\n            "secure": _tls_enabled(secret.get("CLICKHOUSE_SECURE"), port),\n        }\n```\n\n### def _resolve_credentials › L57-60\n```\n        raise RuntimeError(\n            "ClickHouse credentials not found. Set CLICKHOUSE_HOST/CLICKHOUSE_PASSWORD "\n            f"env vars, or ensure ptserver-secret is accessible. Detail: {e}"\n        )\n```\n\n### class ClickHouseDB › def connect › L129-138\n```\n                f"CONNECTION FAILED to ClickHouse at {protocol}://{host_port}\\n"\n                f"Database: {self._creds[\'database\']}\\n"\n                f"Username: {self._creds[\'username\']}\\n"\n                f"Secure: {self._creds[\'secure\']}\\n"\n                f"Error: {error_msg}\\n\\n"\n                f"DIAGNOSTIC CHECKS:\\n"\n                f"• If timeout: check network connectivity and firewall rules for port {self._creds[\'port\']}\\n"\n                f"• If auth error: verify CLICKHOUSE_PASSWORD and CLICKHOUSE_USER\\n"\n                f"• If TLS error: check CLICKHOUSE_SECURE setting (should match server config)\\n"\n                f"• If host not found: verify CLICKHOUSE_HOST is correct ({self._creds[\'host\']})"\n```\n\n## Matches in point-topic-mcp/src/point_topic_mcp/tools/database_tools.py\n\n### L242-246\n```\n\n# ── ClickHouse ontology tools ────────────────────────────────────────────────\n# Requires CLICKHOUSE_HOST + CLICKHOUSE_PASSWORD env vars,\n# OR will auto-fetch from AWS Secrets Manager (ptserver-secret) if running on\n# the server (109.169.53.90).\n```\n\n### L248-252\n```\n# def _clickhouse_available() -> bool:\n#     """True if ClickHouse creds are resolvable (env vars or Secrets Manager)."""\n#     if os.environ.get("CLICKHOUSE_HOST") and os.environ.get("CLICKHOUSE_PASSWORD"):\n#         return True\n#     # Try Secrets Manager silently\n```\n\n### L257-261\n```\n#                 .get_secret_value(SecretId="ptserver-secret")["SecretString"]\n#         )\n#         return bool(secret.get("CLICKHOUSE_HOST") and secret.get("CLICKHOUSE_PASSWORD"))\n#     except Exception:\n#         return False\n```\n\n### L263-273\n```\nif False:\n# if check_env_vars(\'clickhouse_tools\', [\'CLICKHOUSE_HOST\', \'CLICKHOUSE_PASSWORD\']) or _clickhouse_available():\n    @dynamic_docstring([("SUMMARY", get_ontology_summary)])\n    def assemble_ontology_context(\n        ctx: Optional[Context] = None,\n    ) -> str:\n        """\n        Assemble the full context (instructions, schema, SQL examples) for the\n        Point Topic Ontology dataset stored in ClickHouse.\n\n        Call this before executing any ontology query so the agent understands\n```\n\n74 lines remaining in ancestor node. Read the file to see all.\n'}]