hanzo-mcp 0.1.32__tar.gz → 0.1.34__tar.gz
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-0.1.32 → hanzo_mcp-0.1.34}/PKG-INFO +3 -3
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/__init__.py +1 -1
- hanzo_mcp-0.1.34/hanzo_mcp/tools/common/version_tool.py +134 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp.egg-info/PKG-INFO +3 -3
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp.egg-info/requires.txt +1 -1
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/pyproject.toml +3 -3
- hanzo_mcp-0.1.32/hanzo_mcp/tools/common/version_tool.py +0 -62
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/LICENSE +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/README.md +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/cli.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/server.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/__init__.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/agent/__init__.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/agent/agent_tool.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/agent/prompt.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/agent/tool_adapter.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/common/__init__.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/common/base.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/common/context.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/common/permissions.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/common/session.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/common/thinking_tool.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/common/validation.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/filesystem/__init__.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/filesystem/base.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/filesystem/content_replace.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/filesystem/directory_tree.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/filesystem/edit_file.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/filesystem/get_file_info.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/filesystem/read_files.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/filesystem/search_content.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/filesystem/write_file.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/jupyter/__init__.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/jupyter/base.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/jupyter/edit_notebook.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/jupyter/notebook_operations.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/jupyter/read_notebook.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/project/__init__.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/project/analysis.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/project/base.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/project/project_analyze.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/shell/__init__.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/shell/base.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/shell/command_executor.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/shell/run_command.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/shell/run_script.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp/tools/shell/script_tool.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp.egg-info/SOURCES.txt +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp.egg-info/dependency_links.txt +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp.egg-info/entry_points.txt +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/hanzo_mcp.egg-info/top_level.txt +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/setup.cfg +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/tests/test_cli.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/tests/test_server.py +0 -0
- {hanzo_mcp-0.1.32 → hanzo_mcp-0.1.34}/tests/test_validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hanzo-mcp
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.34
|
|
4
4
|
Summary: MCP implementation of Hanzo capabilities
|
|
5
5
|
Author-email: Hanzo Industries Inc <dev@hanzo.ai>
|
|
6
6
|
License: MIT
|
|
@@ -11,10 +11,10 @@ Keywords: mcp,claude,hanzo,code,agent
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
|
-
Requires-Python: >=3.
|
|
14
|
+
Requires-Python: >=3.12
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: mcp>=1.
|
|
17
|
+
Requires-Dist: mcp>=1.6.0
|
|
18
18
|
Requires-Dist: httpx>=0.27.0
|
|
19
19
|
Requires-Dist: uvicorn>=0.23.1
|
|
20
20
|
Requires-Dist: openai>=1.50.0
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"""Version tool for displaying project version information."""
|
|
2
|
+
|
|
3
|
+
import importlib.metadata
|
|
4
|
+
import os
|
|
5
|
+
import tomllib
|
|
6
|
+
from typing import Any, Dict, TypedDict, cast, final, override
|
|
7
|
+
|
|
8
|
+
from mcp.server.fastmcp import Context as MCPContext
|
|
9
|
+
from mcp.server.fastmcp import FastMCP
|
|
10
|
+
|
|
11
|
+
from hanzo_mcp.tools.common.base import BaseTool
|
|
12
|
+
from hanzo_mcp.tools.common.context import create_tool_context
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class VersionToolResponse(TypedDict):
|
|
16
|
+
"""Response from the version tool."""
|
|
17
|
+
|
|
18
|
+
version: str
|
|
19
|
+
package_name: str
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@final
|
|
23
|
+
class VersionTool(BaseTool):
|
|
24
|
+
"""Tool for displaying version information about the Hanzo MCP package."""
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
@override
|
|
28
|
+
def name(self) -> str:
|
|
29
|
+
"""Get the tool name.
|
|
30
|
+
|
|
31
|
+
Returns:
|
|
32
|
+
Tool name
|
|
33
|
+
"""
|
|
34
|
+
return "version"
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
@override
|
|
38
|
+
def description(self) -> str:
|
|
39
|
+
"""Get the tool description.
|
|
40
|
+
|
|
41
|
+
Returns:
|
|
42
|
+
Tool description
|
|
43
|
+
"""
|
|
44
|
+
return "Display the current version of hanzo-mcp"
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
@override
|
|
48
|
+
def parameters(self) -> dict[str, Any]:
|
|
49
|
+
"""Get the parameter specifications for the tool.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
Parameter specifications
|
|
53
|
+
"""
|
|
54
|
+
return {
|
|
55
|
+
"properties": {},
|
|
56
|
+
"required": [],
|
|
57
|
+
"title": "versionArguments",
|
|
58
|
+
"type": "object"
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
@override
|
|
63
|
+
def required(self) -> list[str]:
|
|
64
|
+
"""Get the list of required parameter names.
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
List of required parameter names
|
|
68
|
+
"""
|
|
69
|
+
return []
|
|
70
|
+
|
|
71
|
+
def __init__(self, mcp_server: FastMCP) -> None:
|
|
72
|
+
"""Initialize the version tool and register it with the server.
|
|
73
|
+
|
|
74
|
+
Args:
|
|
75
|
+
mcp_server: The MCP server to register with
|
|
76
|
+
"""
|
|
77
|
+
self.register(mcp_server)
|
|
78
|
+
|
|
79
|
+
@override
|
|
80
|
+
async def call(self, ctx: MCPContext, **params: Any) -> str:
|
|
81
|
+
"""Execute the tool with the given parameters.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
ctx: MCP context
|
|
85
|
+
**params: Tool parameters
|
|
86
|
+
|
|
87
|
+
Returns:
|
|
88
|
+
Tool result with version information
|
|
89
|
+
"""
|
|
90
|
+
tool_ctx = create_tool_context(ctx)
|
|
91
|
+
tool_ctx.set_tool_info(self.name)
|
|
92
|
+
|
|
93
|
+
version_info = self.get_version()
|
|
94
|
+
await tool_ctx.info(f"Hanzo MCP version: {version_info['version']}")
|
|
95
|
+
|
|
96
|
+
return f"Hanzo MCP version: {version_info['version']}"
|
|
97
|
+
|
|
98
|
+
def get_version(self) -> VersionToolResponse:
|
|
99
|
+
"""Get the current version of the hanzo-mcp package.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
A dictionary containing the package name and version
|
|
103
|
+
"""
|
|
104
|
+
try:
|
|
105
|
+
version = importlib.metadata.version("hanzo-mcp")
|
|
106
|
+
except importlib.metadata.PackageNotFoundError:
|
|
107
|
+
# If package not installed, try to read from pyproject.toml
|
|
108
|
+
try:
|
|
109
|
+
root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
|
|
110
|
+
toml_path = os.path.join(root_dir, "pyproject.toml")
|
|
111
|
+
|
|
112
|
+
with open(toml_path, "rb") as f:
|
|
113
|
+
pyproject = tomllib.load(f)
|
|
114
|
+
version = cast(str, pyproject.get("project", {}).get("version", "unknown"))
|
|
115
|
+
except Exception:
|
|
116
|
+
version = "unknown"
|
|
117
|
+
|
|
118
|
+
return {"version": version, "package_name": "hanzo-mcp"}
|
|
119
|
+
|
|
120
|
+
@override
|
|
121
|
+
def register(self, mcp_server: FastMCP) -> None:
|
|
122
|
+
"""Register this version tool with the MCP server.
|
|
123
|
+
|
|
124
|
+
Creates a wrapper function that calls this tool's call method and
|
|
125
|
+
registers it with the MCP server.
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
mcp_server: The FastMCP server instance
|
|
129
|
+
"""
|
|
130
|
+
tool_self = self # Create a reference to self for use in the closure
|
|
131
|
+
|
|
132
|
+
@mcp_server.tool(name=self.name, description=self.mcp_description)
|
|
133
|
+
async def version(ctx: MCPContext) -> str:
|
|
134
|
+
return await tool_self.call(ctx)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hanzo-mcp
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.34
|
|
4
4
|
Summary: MCP implementation of Hanzo capabilities
|
|
5
5
|
Author-email: Hanzo Industries Inc <dev@hanzo.ai>
|
|
6
6
|
License: MIT
|
|
@@ -11,10 +11,10 @@ Keywords: mcp,claude,hanzo,code,agent
|
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
12
|
Classifier: License :: OSI Approved :: MIT License
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
|
-
Requires-Python: >=3.
|
|
14
|
+
Requires-Python: >=3.12
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: mcp>=1.
|
|
17
|
+
Requires-Dist: mcp>=1.6.0
|
|
18
18
|
Requires-Dist: httpx>=0.27.0
|
|
19
19
|
Requires-Dist: uvicorn>=0.23.1
|
|
20
20
|
Requires-Dist: openai>=1.50.0
|
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hanzo-mcp"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.34"
|
|
8
8
|
description = "MCP implementation of Hanzo capabilities"
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
11
|
license = { text = "MIT" }
|
|
12
12
|
authors = [{ name = "Hanzo Industries Inc", email = "dev@hanzo.ai" }]
|
|
13
13
|
classifiers = [
|
|
@@ -16,7 +16,7 @@ classifiers = [
|
|
|
16
16
|
"Operating System :: OS Independent",
|
|
17
17
|
]
|
|
18
18
|
keywords = ["mcp", "claude", "hanzo", "code", "agent"]
|
|
19
|
-
dependencies = ["mcp>=1.
|
|
19
|
+
dependencies = ["mcp>=1.6.0", "httpx>=0.27.0", "uvicorn>=0.23.1", "openai>=1.50.0", "python-dotenv>=1.0.0", "litellm>=1.40.14"]
|
|
20
20
|
|
|
21
21
|
[project.urls]
|
|
22
22
|
"Homepage" = "https://github.com/hanzoai/mcp"
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"""Version tool for displaying project version information."""
|
|
2
|
-
|
|
3
|
-
import importlib.metadata
|
|
4
|
-
from typing import final, TypedDict, Any, Dict, cast
|
|
5
|
-
|
|
6
|
-
from mcp.server.fastmcp import FastMCP
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class VersionToolResponse(TypedDict):
|
|
10
|
-
"""Response from the version tool."""
|
|
11
|
-
|
|
12
|
-
version: str
|
|
13
|
-
package_name: str
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@final
|
|
17
|
-
class VersionTool:
|
|
18
|
-
"""Tool for displaying version information about the Hanzo MCP package."""
|
|
19
|
-
|
|
20
|
-
def __init__(self, mcp_server: FastMCP) -> None:
|
|
21
|
-
"""Initialize the version tool.
|
|
22
|
-
|
|
23
|
-
Args:
|
|
24
|
-
mcp_server: The MCP server to register with
|
|
25
|
-
"""
|
|
26
|
-
self.mcp_server = mcp_server
|
|
27
|
-
self._register()
|
|
28
|
-
|
|
29
|
-
def _register(self) -> None:
|
|
30
|
-
"""Register the version tool with the MCP server."""
|
|
31
|
-
self.mcp_server.register_function(
|
|
32
|
-
"version",
|
|
33
|
-
self.get_version,
|
|
34
|
-
"Display the current version of hanzo-mcp",
|
|
35
|
-
Dict[str, Any],
|
|
36
|
-
VersionToolResponse,
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
def get_version(self) -> VersionToolResponse:
|
|
40
|
-
"""Get the current version of the hanzo-mcp package.
|
|
41
|
-
|
|
42
|
-
Returns:
|
|
43
|
-
A dictionary containing the package name and version
|
|
44
|
-
"""
|
|
45
|
-
try:
|
|
46
|
-
version = importlib.metadata.version("hanzo-mcp")
|
|
47
|
-
except importlib.metadata.PackageNotFoundError:
|
|
48
|
-
# If package not installed, try to read from pyproject.toml
|
|
49
|
-
import os
|
|
50
|
-
import tomllib
|
|
51
|
-
|
|
52
|
-
try:
|
|
53
|
-
root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", ".."))
|
|
54
|
-
toml_path = os.path.join(root_dir, "pyproject.toml")
|
|
55
|
-
|
|
56
|
-
with open(toml_path, "rb") as f:
|
|
57
|
-
pyproject = tomllib.load(f)
|
|
58
|
-
version = cast(str, pyproject.get("project", {}).get("version", "unknown"))
|
|
59
|
-
except Exception:
|
|
60
|
-
version = "unknown"
|
|
61
|
-
|
|
62
|
-
return {"version": version, "package_name": "hanzo-mcp"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|