hanzo-mcp 0.1.30__py3-none-any.whl → 0.1.33__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.

@@ -12,7 +12,7 @@ to delegate tasks to sub-agents for concurrent execution and specialized process
12
12
  from mcp.server.fastmcp import FastMCP
13
13
 
14
14
  from hanzo_mcp.tools.agent import register_agent_tools
15
- from hanzo_mcp.tools.common import register_thinking_tool
15
+ from hanzo_mcp.tools.common import register_thinking_tool, register_version_tool
16
16
  from hanzo_mcp.tools.common.context import DocumentContext
17
17
  from hanzo_mcp.tools.common.permissions import PermissionManager
18
18
  from hanzo_mcp.tools.filesystem import register_filesystem_tools
@@ -79,3 +79,6 @@ def register_all_tools(
79
79
 
80
80
  # Initialize and register thinking tool
81
81
  register_thinking_tool(mcp_server)
82
+
83
+ # Register version tool
84
+ register_version_tool(mcp_server)
@@ -4,6 +4,7 @@ from mcp.server.fastmcp import FastMCP
4
4
 
5
5
  from hanzo_mcp.tools.common.base import ToolRegistry
6
6
  from hanzo_mcp.tools.common.thinking_tool import ThinkingTool
7
+ from hanzo_mcp.tools.common.version_tool import VersionTool
7
8
 
8
9
 
9
10
  def register_thinking_tool(
@@ -16,3 +17,14 @@ def register_thinking_tool(
16
17
  """
17
18
  thinking_tool = ThinkingTool()
18
19
  ToolRegistry.register_tool(mcp_server, thinking_tool)
20
+
21
+
22
+ def register_version_tool(
23
+ mcp_server: FastMCP,
24
+ ) -> None:
25
+ """Register the version tool with the MCP server.
26
+
27
+ Args:
28
+ mcp_server: The FastMCP server instance
29
+ """
30
+ _ = VersionTool(mcp_server) # Tool registers itself in constructor
@@ -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.30
3
+ Version: 0.1.33
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.13
14
+ Requires-Python: >=3.12
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
- Requires-Dist: mcp>=1.3.0
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
@@ -141,8 +141,19 @@ make test-cov
141
141
  # Build package
142
142
  make build
143
143
 
144
- # Publish to PyPI
145
- make publish
144
+ # Version bumping
145
+ make bump-patch # Increment patch version (0.1.x → 0.1.x+1)
146
+ make bump-minor # Increment minor version (0.x.0 → 0.x+1.0)
147
+ make bump-major # Increment major version (x.0.0 → x+1.0.0)
148
+
149
+ # Publishing (creates git tag and pushes it to GitHub)
150
+ make publish # Publish using configured credentials in .pypirc
151
+ PYPI_TOKEN=your_token make publish # Publish with token from environment variable
152
+
153
+ # Version bump and publish in one step (with automatic git tagging)
154
+ make publish-patch # Bump patch version, publish, and create git tag
155
+ make publish-minor # Bump minor version, publish, and create git tag
156
+ make publish-major # Bump major version, publish, and create git tag
146
157
 
147
158
  # Publish to Test PyPI
148
159
  make publish-test
@@ -1,18 +1,19 @@
1
1
  hanzo_mcp/__init__.py,sha256=Y5rIvHCEKCc1GKgt4XqjpEjZa91JOu3fSPnJZSBZJ70,89
2
2
  hanzo_mcp/cli.py,sha256=G0Klg7RMK9XLehLT9ysWbpii0XRrECglUaxwvCekl7g,7201
3
3
  hanzo_mcp/server.py,sha256=j2UagHTxwCbZrnhODbMUI0wdZ-7yLFxB9-ZbignZFzg,5671
4
- hanzo_mcp/tools/__init__.py,sha256=4KGhjZ5M93_L5T942JJ5lm1f7qw5UfiE-RixkrvnHVo,3245
4
+ hanzo_mcp/tools/__init__.py,sha256=3IHzhmSiAbxg2yvqVJn4SH6YP_DSnxYaNk9ccBtk7H0,3339
5
5
  hanzo_mcp/tools/agent/__init__.py,sha256=0eyQqqdAy7WCZEqUfV6xh66bDpQI9neB6iDjWf0_pJI,2189
6
6
  hanzo_mcp/tools/agent/agent_tool.py,sha256=qXu62ZRGM0o9mxOiRVFy-ABIZtEJ8z03DqAXshKAieI,19180
7
7
  hanzo_mcp/tools/agent/prompt.py,sha256=jmYRI4Sm2D3LwEdC2qWakpqupgfGg8CT6grmx4NEDaA,4431
8
8
  hanzo_mcp/tools/agent/tool_adapter.py,sha256=g9NKfIET0WOsm0r28xEXsibsprpI1C6ripcM6QwU-rI,2172
9
- hanzo_mcp/tools/common/__init__.py,sha256=XkhBW1F9pKaJlD5xIlXQnYnhof-ALFnnnou_32Zauow,487
9
+ hanzo_mcp/tools/common/__init__.py,sha256=VS_eJP0oJGEgO78stwQWyer1heVfhhHihtt5sctjei8,809
10
10
  hanzo_mcp/tools/common/base.py,sha256=O7Lgft0XiC9Iyi3fYsmoWWrvKDK2Aa-FJLxPgnNJRJY,7341
11
11
  hanzo_mcp/tools/common/context.py,sha256=ReIfcm37j5qnLQ8G_-d88ad5uC1OKkjQZKG9HdJPybI,13145
12
12
  hanzo_mcp/tools/common/permissions.py,sha256=4YCfA2PJUOl-z_47n5uaRXO8gAZ_shMaPhpi1dilgRE,7594
13
13
  hanzo_mcp/tools/common/session.py,sha256=csX5ZhgBjO2bdXXXPpsUPzOCc7Tib-apYe01AP8sh8k,2774
14
14
  hanzo_mcp/tools/common/thinking_tool.py,sha256=I-O6ipM-PUofkNoMMzv37Y_2Yfx9mh7F1upTTsfRN4M,4046
15
15
  hanzo_mcp/tools/common/validation.py,sha256=gB3uM_cbPZsH4Ez0hnTgIcdP-AUlHZU02aRmZEpk_6I,3648
16
+ hanzo_mcp/tools/common/version_tool.py,sha256=3QiSCRTc0fgf2vZw0XVCL1V3Gl7T5OMFrAUUJSJqMVE,4018
16
17
  hanzo_mcp/tools/filesystem/__init__.py,sha256=-wNhb0IjJgz05n_fRP0wDXfKgJ6fgBp4wrGo62Hpyvc,3265
17
18
  hanzo_mcp/tools/filesystem/base.py,sha256=HAzuMCrS0dKOBZNoLr7y74tdbYyKpi0FGhStuRgkFTU,3917
18
19
  hanzo_mcp/tools/filesystem/content_replace.py,sha256=ZwzxyOTASUmzP-jtEnsSR-MKtNFC4R3kQunpV3KOCyg,11049
@@ -37,9 +38,9 @@ hanzo_mcp/tools/shell/command_executor.py,sha256=5GcJvg54uty9fl_tkGdWTBcHyjxuynQ
37
38
  hanzo_mcp/tools/shell/run_command.py,sha256=r7HBw0lqabgkGnVsDXmLnrTo0SU9g8gLvzpa-9n-cmM,6891
38
39
  hanzo_mcp/tools/shell/run_script.py,sha256=CLYnDc0Ze8plkXU6d98RgE4UrBg-fwaMVdcn9Fc6Ixw,7432
39
40
  hanzo_mcp/tools/shell/script_tool.py,sha256=s63tawIZBvwgm_kU9P7A3D4v2ulVw7j4l_rpsa_zGuc,8680
40
- hanzo_mcp-0.1.30.dist-info/licenses/LICENSE,sha256=mf1qZGFsPGskoPgytp9B-RsahfKvXsBpmaAbTLGTt8Y,1063
41
- hanzo_mcp-0.1.30.dist-info/METADATA,sha256=qbJgX7NycdL0iGJvhbzDvEn_xtc01nGQLhup-oCV1Qo,6594
42
- hanzo_mcp-0.1.30.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
43
- hanzo_mcp-0.1.30.dist-info/entry_points.txt,sha256=aRKOKXtuQr-idSr-yH4efnRl2v8te94AcgN3ysqqSYs,49
44
- hanzo_mcp-0.1.30.dist-info/top_level.txt,sha256=eGFANatA0MHWiVlpS56fTYRIShtibrSom1uXI6XU0GU,10
45
- hanzo_mcp-0.1.30.dist-info/RECORD,,
41
+ hanzo_mcp-0.1.33.dist-info/licenses/LICENSE,sha256=mf1qZGFsPGskoPgytp9B-RsahfKvXsBpmaAbTLGTt8Y,1063
42
+ hanzo_mcp-0.1.33.dist-info/METADATA,sha256=FPFTd1ry4CzrABIY_vy8W87Y4tAgHEKnSPhpmQzNlIE,7277
43
+ hanzo_mcp-0.1.33.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
44
+ hanzo_mcp-0.1.33.dist-info/entry_points.txt,sha256=aRKOKXtuQr-idSr-yH4efnRl2v8te94AcgN3ysqqSYs,49
45
+ hanzo_mcp-0.1.33.dist-info/top_level.txt,sha256=eGFANatA0MHWiVlpS56fTYRIShtibrSom1uXI6XU0GU,10
46
+ hanzo_mcp-0.1.33.dist-info/RECORD,,