hanzo-mcp 0.6.4__py3-none-any.whl → 0.6.6__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.
Potentially problematic release.
This version of hanzo-mcp might be problematic. Click here for more details.
- hanzo_mcp/__init__.py +10 -1
- hanzo_mcp/cli.py +28 -2
- hanzo_mcp/server.py +12 -0
- {hanzo_mcp-0.6.4.dist-info → hanzo_mcp-0.6.6.dist-info}/METADATA +1 -1
- {hanzo_mcp-0.6.4.dist-info → hanzo_mcp-0.6.6.dist-info}/RECORD +9 -9
- {hanzo_mcp-0.6.4.dist-info → hanzo_mcp-0.6.6.dist-info}/WHEEL +0 -0
- {hanzo_mcp-0.6.4.dist-info → hanzo_mcp-0.6.6.dist-info}/entry_points.txt +0 -0
- {hanzo_mcp-0.6.4.dist-info → hanzo_mcp-0.6.6.dist-info}/licenses/LICENSE +0 -0
- {hanzo_mcp-0.6.4.dist-info → hanzo_mcp-0.6.6.dist-info}/top_level.txt +0 -0
hanzo_mcp/__init__.py
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
"""Hanzo MCP - Implementation of Hanzo capabilities using MCP."""
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import warnings
|
|
4
|
+
|
|
5
|
+
# Suppress deprecation warnings from litellm about Pydantic v1 style configs
|
|
6
|
+
warnings.filterwarnings(
|
|
7
|
+
"ignore",
|
|
8
|
+
category=DeprecationWarning,
|
|
9
|
+
message=".*class-based `config`.*"
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
__version__ = "0.6.6"
|
hanzo_mcp/cli.py
CHANGED
|
@@ -3,15 +3,33 @@
|
|
|
3
3
|
import argparse
|
|
4
4
|
import json
|
|
5
5
|
import os
|
|
6
|
+
import signal
|
|
6
7
|
import sys
|
|
8
|
+
import warnings
|
|
7
9
|
from pathlib import Path
|
|
8
10
|
from typing import Any, cast
|
|
9
11
|
|
|
12
|
+
# Suppress deprecation warnings from litellm about Pydantic v1 style configs
|
|
13
|
+
warnings.filterwarnings(
|
|
14
|
+
"ignore",
|
|
15
|
+
category=DeprecationWarning,
|
|
16
|
+
message=".*class-based `config`.*",
|
|
17
|
+
module="pydantic.*"
|
|
18
|
+
)
|
|
19
|
+
|
|
10
20
|
from hanzo_mcp.server import HanzoMCPServer
|
|
11
21
|
|
|
12
22
|
|
|
13
23
|
def main() -> None:
|
|
14
24
|
"""Run the CLI for the Hanzo MCP server."""
|
|
25
|
+
# Set up signal handler to ensure clean exit
|
|
26
|
+
def signal_handler(signum, frame):
|
|
27
|
+
print("\nReceived interrupt signal, shutting down...")
|
|
28
|
+
sys.exit(0)
|
|
29
|
+
|
|
30
|
+
signal.signal(signal.SIGINT, signal_handler)
|
|
31
|
+
signal.signal(signal.SIGTERM, signal_handler)
|
|
32
|
+
|
|
15
33
|
parser = argparse.ArgumentParser(
|
|
16
34
|
description="MCP server implementing Hanzo AI capabilities"
|
|
17
35
|
)
|
|
@@ -249,8 +267,16 @@ def main() -> None:
|
|
|
249
267
|
host=host,
|
|
250
268
|
port=port,
|
|
251
269
|
)
|
|
252
|
-
|
|
253
|
-
|
|
270
|
+
|
|
271
|
+
try:
|
|
272
|
+
# Transport will be automatically cast to Literal['stdio', 'sse'] by the server
|
|
273
|
+
server.run(transport=transport)
|
|
274
|
+
except KeyboardInterrupt:
|
|
275
|
+
print("\nShutting down...")
|
|
276
|
+
sys.exit(0)
|
|
277
|
+
except Exception as e:
|
|
278
|
+
print(f"Server error: {e}", file=sys.stderr)
|
|
279
|
+
sys.exit(1)
|
|
254
280
|
|
|
255
281
|
|
|
256
282
|
def install_claude_desktop_config(
|
hanzo_mcp/server.py
CHANGED
|
@@ -4,8 +4,17 @@ import atexit
|
|
|
4
4
|
import signal
|
|
5
5
|
import threading
|
|
6
6
|
import time
|
|
7
|
+
import warnings
|
|
7
8
|
from typing import Literal, cast, final
|
|
8
9
|
|
|
10
|
+
# Suppress deprecation warnings from litellm about Pydantic v1 style configs
|
|
11
|
+
warnings.filterwarnings(
|
|
12
|
+
"ignore",
|
|
13
|
+
category=DeprecationWarning,
|
|
14
|
+
message=".*class-based `config`.*",
|
|
15
|
+
module="pydantic.*"
|
|
16
|
+
)
|
|
17
|
+
|
|
9
18
|
try:
|
|
10
19
|
from fastmcp import FastMCP
|
|
11
20
|
except ImportError:
|
|
@@ -150,8 +159,11 @@ class HanzoMCPServer:
|
|
|
150
159
|
|
|
151
160
|
# Register signal handlers for graceful shutdown
|
|
152
161
|
def signal_handler(signum, frame):
|
|
162
|
+
import sys
|
|
163
|
+
print("\nShutting down gracefully...")
|
|
153
164
|
self._cleanup_sessions()
|
|
154
165
|
self._shutdown_event.set()
|
|
166
|
+
sys.exit(0)
|
|
155
167
|
|
|
156
168
|
signal.signal(signal.SIGTERM, signal_handler)
|
|
157
169
|
signal.signal(signal.SIGINT, signal_handler)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
hanzo_mcp/__init__.py,sha256=
|
|
2
|
-
hanzo_mcp/cli.py,sha256=
|
|
1
|
+
hanzo_mcp/__init__.py,sha256=hkDnlbGdsXrIdNqcITwEfaS1vT6ExhxxjLusnQ7Ulek,298
|
|
2
|
+
hanzo_mcp/cli.py,sha256=HakA0soJB2yqQwMpdYvgzpCso1ZdC5qkrXwHEGZYLlE,11573
|
|
3
3
|
hanzo_mcp/cli_enhanced.py,sha256=rqh9gqyjMuUznIlPTC5pcIGYZTKAScacMsDb1e68ReE,15819
|
|
4
4
|
hanzo_mcp/dev_server.py,sha256=_Ti0P7y8VNK5z4NiZ1BN5L_KdWhWYJ4IG2U6GZObzyM,7869
|
|
5
|
-
hanzo_mcp/server.py,sha256=
|
|
5
|
+
hanzo_mcp/server.py,sha256=W5mUxylqzBXGKOLxQq49bS4iL89cxbrXGs_m_Sw_aqw,8540
|
|
6
6
|
hanzo_mcp/config/__init__.py,sha256=iZYGSJMsC1c97gRFqgyowfP4XW480BBVRAQq1r-Dp7g,506
|
|
7
7
|
hanzo_mcp/config/settings.py,sha256=F4ya4pHoxGACawPo4hd0bwfk6MwXvrTjH0WMBQpUN8I,16259
|
|
8
8
|
hanzo_mcp/config/tool_config.py,sha256=AT5eJRZAL8VTLu5DCdoC_MkDxtufVE_QOj7Yp_Fyi8k,6317
|
|
@@ -126,9 +126,9 @@ hanzo_mcp/tools/vector/project_manager.py,sha256=xrkRl7niWjJrtSNaEOppkPzDFDw9FaE
|
|
|
126
126
|
hanzo_mcp/tools/vector/vector.py,sha256=EpKEDkRfSHsDfPewqRwNAulX0BndlK48p-sFSMtt3js,10179
|
|
127
127
|
hanzo_mcp/tools/vector/vector_index.py,sha256=IqXoEfEk6TOOEThXw4obePZqfvBRiYL_LCrx8z35-h8,4403
|
|
128
128
|
hanzo_mcp/tools/vector/vector_search.py,sha256=jwX1azf4V4seqJ2CIDloX3lJ5_hkUl7X5e2OOgGXQNk,9647
|
|
129
|
-
hanzo_mcp-0.6.
|
|
130
|
-
hanzo_mcp-0.6.
|
|
131
|
-
hanzo_mcp-0.6.
|
|
132
|
-
hanzo_mcp-0.6.
|
|
133
|
-
hanzo_mcp-0.6.
|
|
134
|
-
hanzo_mcp-0.6.
|
|
129
|
+
hanzo_mcp-0.6.6.dist-info/licenses/LICENSE,sha256=mf1qZGFsPGskoPgytp9B-RsahfKvXsBpmaAbTLGTt8Y,1063
|
|
130
|
+
hanzo_mcp-0.6.6.dist-info/METADATA,sha256=7CR5dLim5hU1bgk0O2znlFKHSqRWSw00YETvFOYiWYk,11067
|
|
131
|
+
hanzo_mcp-0.6.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
132
|
+
hanzo_mcp-0.6.6.dist-info/entry_points.txt,sha256=Q_g5SzWk47z2b_rE_RgonVqk4-d8VQ6pqwMveYiXJuU,101
|
|
133
|
+
hanzo_mcp-0.6.6.dist-info/top_level.txt,sha256=eGFANatA0MHWiVlpS56fTYRIShtibrSom1uXI6XU0GU,10
|
|
134
|
+
hanzo_mcp-0.6.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|