feat(hanzo-mcp): add version MCP tool

- Add version() tool to get hanzo-mcp version via MCP
- Sync __version__ with pyproject.toml (0.9.23)
- Returns hanzo_mcp version, python version, platform, arch
This commit is contained in:
2025-12-25 11:44:36 -08:00
parent 6bb39a94c1
commit 7df83db91d
7 changed files with 37 additions and 3 deletions
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -26,4 +26,4 @@ if os.environ.get("HANZO_MCP_TRANSPORT") == "stdio":
except ImportError:
pass
__version__ = "0.8.16"
__version__ = "0.9.23"
@@ -374,6 +374,10 @@ def register_all_tools(
all_tools[tool.name] = tool
# Register system tools (always enabled)
# Version tool
from hanzo_mcp.tools.common.version_tool import register_version_tool
register_version_tool(mcp_server)
# Tool enable/disable tools
tool_enable = ToolEnableTool()
tool_enable.register(mcp_server)
@@ -0,0 +1,30 @@
"""Version tool for hanzo-mcp."""
import sys
from typing import Any
from mcp.server.fastmcp import FastMCP
import hanzo_mcp
def register_version_tool(mcp: FastMCP) -> None:
"""Register the version tool with the MCP server."""
@mcp.tool()
async def version() -> dict[str, Any]:
"""Get hanzo-mcp version and environment information.
Returns version info including:
- hanzo-mcp version
- Python version
- Platform info
"""
import platform
return {
"hanzo_mcp": hanzo_mcp.__version__,
"python": sys.version.split()[0],
"platform": platform.system(),
"arch": platform.machine(),
}
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "hanzo-mcp"
version = "0.9.22"
version = "0.9.23"
description = "The Zen of Hanzo MCP: One server to rule them all. The ultimate MCP that orchestrates all others."
readme = "README.md"
requires-python = ">=3.12"
+1 -1
View File
@@ -1232,7 +1232,7 @@ wheels = [
[[package]]
name = "hanzo-mcp"
version = "0.9.21"
version = "0.9.23"
source = { editable = "." }
dependencies = [
{ name = "aiofiles" },