mcp-hydrolix 0.1.6__py3-none-any.whl → 0.1.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mcp_hydrolix/log/log.yaml +4 -0
- mcp_hydrolix/main.py +1 -0
- mcp_hydrolix/mcp_server.py +23 -3
- mcp_hydrolix/utils.py +4 -4
- {mcp_hydrolix-0.1.6.dist-info → mcp_hydrolix-0.1.7.dist-info}/METADATA +2 -1
- {mcp_hydrolix-0.1.6.dist-info → mcp_hydrolix-0.1.7.dist-info}/RECORD +9 -9
- {mcp_hydrolix-0.1.6.dist-info → mcp_hydrolix-0.1.7.dist-info}/WHEEL +0 -0
- {mcp_hydrolix-0.1.6.dist-info → mcp_hydrolix-0.1.7.dist-info}/entry_points.txt +0 -0
- {mcp_hydrolix-0.1.6.dist-info → mcp_hydrolix-0.1.7.dist-info}/licenses/LICENSE +0 -0
mcp_hydrolix/log/log.yaml
CHANGED
mcp_hydrolix/main.py
CHANGED
mcp_hydrolix/mcp_server.py
CHANGED
|
@@ -13,6 +13,7 @@ from dotenv import load_dotenv
|
|
|
13
13
|
from fastmcp import FastMCP
|
|
14
14
|
from fastmcp.exceptions import ToolError
|
|
15
15
|
from fastmcp.server.dependencies import get_access_token
|
|
16
|
+
from jwt import DecodeError
|
|
16
17
|
from pydantic import Field
|
|
17
18
|
from pydantic.dataclasses import dataclass
|
|
18
19
|
from starlette.requests import Request
|
|
@@ -76,14 +77,17 @@ HYDROLIX_CONFIG: Final[HydrolixConfig] = get_config()
|
|
|
76
77
|
|
|
77
78
|
mcp = FastMCP(
|
|
78
79
|
name=MCP_SERVER_NAME,
|
|
79
|
-
auth=HydrolixCredentialChain(
|
|
80
|
+
auth=HydrolixCredentialChain(None),
|
|
80
81
|
)
|
|
81
82
|
|
|
82
83
|
|
|
83
84
|
def get_request_credential() -> Optional[HydrolixCredential]:
|
|
84
85
|
if (token := get_access_token()) is not None:
|
|
85
86
|
if isinstance(token, AccessToken):
|
|
86
|
-
|
|
87
|
+
try:
|
|
88
|
+
return token.as_credential()
|
|
89
|
+
except DecodeError:
|
|
90
|
+
raise ValueError("The provided access token is invalid.")
|
|
87
91
|
else:
|
|
88
92
|
raise ValueError(
|
|
89
93
|
"Found non-hydrolix access token on request -- this should be impossible!"
|
|
@@ -127,7 +131,23 @@ async def create_hydrolix_client(pool_mgr, request_credential: Optional[Hydrolix
|
|
|
127
131
|
# allow custom hydrolix settings in CH client
|
|
128
132
|
common.set_setting("invalid_setting_action", "send")
|
|
129
133
|
common.set_setting("autogenerate_session_id", False)
|
|
130
|
-
|
|
134
|
+
|
|
135
|
+
pool_kwargs = {
|
|
136
|
+
"maxsize": HYDROLIX_CONFIG.query_pool_size,
|
|
137
|
+
"num_pools": 1,
|
|
138
|
+
"verify": HYDROLIX_CONFIG.verify,
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
# When verify=True, use certifi CA bundle for SSL verification
|
|
142
|
+
# This ensures we trust modern CAs like Let's Encrypt
|
|
143
|
+
if HYDROLIX_CONFIG.verify:
|
|
144
|
+
pool_kwargs["ca_cert"] = "certifi"
|
|
145
|
+
else:
|
|
146
|
+
import urllib3
|
|
147
|
+
|
|
148
|
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
149
|
+
|
|
150
|
+
client_shared_pool = httputil.get_pool_manager(**pool_kwargs)
|
|
131
151
|
|
|
132
152
|
|
|
133
153
|
def term(*args, **kwargs):
|
mcp_hydrolix/utils.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import inspect
|
|
2
2
|
import ipaddress
|
|
3
3
|
import json
|
|
4
|
-
from datetime import datetime, time
|
|
4
|
+
from datetime import datetime, time, date
|
|
5
5
|
from decimal import Decimal
|
|
6
6
|
from functools import wraps
|
|
7
7
|
|
|
@@ -16,9 +16,9 @@ class ExtendedEncoder(json.JSONEncoder):
|
|
|
16
16
|
if isinstance(obj, ipaddress.IPv4Address):
|
|
17
17
|
return str(obj)
|
|
18
18
|
if isinstance(obj, datetime):
|
|
19
|
-
return obj.
|
|
20
|
-
if isinstance(obj, time):
|
|
21
|
-
return obj.
|
|
19
|
+
return obj.timestamp()
|
|
20
|
+
if isinstance(obj, (date, time)):
|
|
21
|
+
return obj.isoformat()
|
|
22
22
|
if isinstance(obj, bytes):
|
|
23
23
|
return obj.decode()
|
|
24
24
|
if isinstance(obj, Decimal):
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcp-hydrolix
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.7
|
|
4
4
|
Summary: An MCP server for Hydrolix.
|
|
5
5
|
Project-URL: Home, https://github.com/hydrolix/mcp-hydrolix
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
7
|
License-File: LICENSE
|
|
8
8
|
Requires-Python: >=3.13
|
|
9
|
+
Requires-Dist: certifi>=2026.1.4
|
|
9
10
|
Requires-Dist: clickhouse-connect<0.11,>=0.10
|
|
10
11
|
Requires-Dist: fastmcp<2.15,>=2.14
|
|
11
12
|
Requires-Dist: gunicorn<24.0,>=23.0
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
mcp_hydrolix/__init__.py,sha256=DnAQkvoFf_QhrDNFLOmn-nHlldPUgtdN33k3xJWthgc,225
|
|
2
|
-
mcp_hydrolix/main.py,sha256=
|
|
2
|
+
mcp_hydrolix/main.py,sha256=mGO6dvc_yHQfw5SfIUFVbjZZBNMPdtzkA4HICs8JJ9g,2797
|
|
3
3
|
mcp_hydrolix/mcp_env.py,sha256=For5l-G67ihJJbW4d4qpZNZvhxsIfT0AXGQsg8-3BMk,11533
|
|
4
|
-
mcp_hydrolix/mcp_server.py,sha256=
|
|
5
|
-
mcp_hydrolix/utils.py,sha256=
|
|
4
|
+
mcp_hydrolix/mcp_server.py,sha256=PbM3IoqXrQugBZU4jzoF1nRTht99_kCSgVEFYI0xE9w,12890
|
|
5
|
+
mcp_hydrolix/utils.py,sha256=G7t4lajZIsQOl_oOHUQyEqytsPJpN71WcLkv1cbxsJk,2391
|
|
6
6
|
mcp_hydrolix/auth/__init__.py,sha256=Ui9pLq3Z5tH8X56T_SqACRLEU9zl1gmcONWif-GV1Ko,656
|
|
7
7
|
mcp_hydrolix/auth/credentials.py,sha256=IK8w6TjNxS1K0LCKBt3xXOOI-0ogWCVAkiJuOzEJuJY,1915
|
|
8
8
|
mcp_hydrolix/auth/mcp_providers.py,sha256=4lexSj6tqCgPb5GGbuG5_wIocvSvQbqx8CHNl9D6OCA,5194
|
|
9
9
|
mcp_hydrolix/log/__init__.py,sha256=1K-ycdGrawELMLSBeiqE8bV3-SFJYOE0dD_U3PAP2QM,119
|
|
10
10
|
mcp_hydrolix/log/log.py,sha256=6KX0oSz-BbCWUoPxbJED4sZBmbgCHa3KDrc5nYtdks4,1838
|
|
11
|
-
mcp_hydrolix/log/log.yaml,sha256=
|
|
11
|
+
mcp_hydrolix/log/log.yaml,sha256=uQEW_LYSur_C4h0wR_vaYOVKE0an9tXozFMpjeZS5V8,1052
|
|
12
12
|
mcp_hydrolix/log/utils.py,sha256=gOnlo25-sGZydGJmr6T94Pb805RZ9LcZlLCRaVEuUv4,2099
|
|
13
|
-
mcp_hydrolix-0.1.
|
|
14
|
-
mcp_hydrolix-0.1.
|
|
15
|
-
mcp_hydrolix-0.1.
|
|
16
|
-
mcp_hydrolix-0.1.
|
|
17
|
-
mcp_hydrolix-0.1.
|
|
13
|
+
mcp_hydrolix-0.1.7.dist-info/METADATA,sha256=bew84FwBgpu1yWUakhBgz6IUPTfvY3cOu4w0ed7iNOA,11129
|
|
14
|
+
mcp_hydrolix-0.1.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
15
|
+
mcp_hydrolix-0.1.7.dist-info/entry_points.txt,sha256=vHa7F2rOCVu8lpsqR8BYbE1w8ugJSOYwX95w802Y5qE,56
|
|
16
|
+
mcp_hydrolix-0.1.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
17
|
+
mcp_hydrolix-0.1.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|