hanzo-mcp 0.1.20__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 +3 -0
- hanzo_mcp/cli.py +213 -0
- hanzo_mcp/server.py +149 -0
- hanzo_mcp/tools/__init__.py +81 -0
- hanzo_mcp/tools/agent/__init__.py +59 -0
- hanzo_mcp/tools/agent/agent_tool.py +474 -0
- hanzo_mcp/tools/agent/prompt.py +137 -0
- hanzo_mcp/tools/agent/tool_adapter.py +75 -0
- hanzo_mcp/tools/common/__init__.py +18 -0
- hanzo_mcp/tools/common/base.py +216 -0
- hanzo_mcp/tools/common/context.py +444 -0
- hanzo_mcp/tools/common/permissions.py +253 -0
- hanzo_mcp/tools/common/thinking_tool.py +123 -0
- hanzo_mcp/tools/common/validation.py +124 -0
- hanzo_mcp/tools/filesystem/__init__.py +89 -0
- hanzo_mcp/tools/filesystem/base.py +113 -0
- hanzo_mcp/tools/filesystem/content_replace.py +287 -0
- hanzo_mcp/tools/filesystem/directory_tree.py +286 -0
- hanzo_mcp/tools/filesystem/edit_file.py +287 -0
- hanzo_mcp/tools/filesystem/get_file_info.py +170 -0
- hanzo_mcp/tools/filesystem/read_files.py +198 -0
- hanzo_mcp/tools/filesystem/search_content.py +275 -0
- hanzo_mcp/tools/filesystem/write_file.py +162 -0
- hanzo_mcp/tools/jupyter/__init__.py +71 -0
- hanzo_mcp/tools/jupyter/base.py +284 -0
- hanzo_mcp/tools/jupyter/edit_notebook.py +295 -0
- hanzo_mcp/tools/jupyter/notebook_operations.py +514 -0
- hanzo_mcp/tools/jupyter/read_notebook.py +165 -0
- hanzo_mcp/tools/project/__init__.py +64 -0
- hanzo_mcp/tools/project/analysis.py +882 -0
- hanzo_mcp/tools/project/base.py +66 -0
- hanzo_mcp/tools/project/project_analyze.py +173 -0
- hanzo_mcp/tools/shell/__init__.py +58 -0
- hanzo_mcp/tools/shell/base.py +148 -0
- hanzo_mcp/tools/shell/command_executor.py +740 -0
- hanzo_mcp/tools/shell/run_command.py +204 -0
- hanzo_mcp/tools/shell/run_script.py +215 -0
- hanzo_mcp/tools/shell/script_tool.py +244 -0
- hanzo_mcp-0.1.20.dist-info/METADATA +111 -0
- hanzo_mcp-0.1.20.dist-info/RECORD +44 -0
- hanzo_mcp-0.1.20.dist-info/WHEEL +5 -0
- hanzo_mcp-0.1.20.dist-info/entry_points.txt +2 -0
- hanzo_mcp-0.1.20.dist-info/licenses/LICENSE +21 -0
- hanzo_mcp-0.1.20.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hanzo-mcp
|
|
3
|
+
Version: 0.1.20
|
|
4
|
+
Summary: MCP implementation of Hanzo capabilities
|
|
5
|
+
Author-email: hanzoai <sdglbl.me@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/hanzoai/mcp
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/hanzoai/mcp/issues
|
|
9
|
+
Project-URL: Documentation, https://github.com/hanzoai/mcp/blob/main/README.md
|
|
10
|
+
Keywords: mcp,claude,hanzo,code,agent
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Requires-Python: >=3.13
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: mcp>=1.3.0
|
|
18
|
+
Requires-Dist: httpx>=0.27.0
|
|
19
|
+
Requires-Dist: uvicorn>=0.23.1
|
|
20
|
+
Requires-Dist: openai>=1.50.0
|
|
21
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
22
|
+
Requires-Dist: litellm>=1.40.14
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
25
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
|
|
26
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
27
|
+
Requires-Dist: black>=23.3.0; extra == "dev"
|
|
28
|
+
Provides-Extra: test
|
|
29
|
+
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
30
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "test"
|
|
31
|
+
Requires-Dist: pytest-mock>=3.10.0; extra == "test"
|
|
32
|
+
Requires-Dist: pytest-asyncio>=0.25.3; extra == "test"
|
|
33
|
+
Requires-Dist: twisted; extra == "test"
|
|
34
|
+
Provides-Extra: performance
|
|
35
|
+
Requires-Dist: ujson>=5.7.0; extra == "performance"
|
|
36
|
+
Requires-Dist: orjson>=3.9.0; extra == "performance"
|
|
37
|
+
Provides-Extra: publish
|
|
38
|
+
Requires-Dist: twine>=4.0.2; extra == "publish"
|
|
39
|
+
Requires-Dist: build>=1.0.3; extra == "publish"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# Hanzo MCP
|
|
43
|
+
|
|
44
|
+
An implementation of Hanzo capabilities using the Model Context Protocol (MCP).
|
|
45
|
+
|
|
46
|
+
## Overview
|
|
47
|
+
|
|
48
|
+
This project provides an MCP server that implements Hanzo-like functionality, allowing Claude to directly execute instructions for modifying and improving project files. By leveraging the Model Context Protocol, this implementation enables seamless integration with various MCP clients including Claude Desktop.
|
|
49
|
+
|
|
50
|
+

|
|
51
|
+
|
|
52
|
+
## Features
|
|
53
|
+
|
|
54
|
+
- **Code Understanding**: Analyze and understand codebases through file access and pattern searching
|
|
55
|
+
- **Code Modification**: Make targeted edits to files with proper permission handling
|
|
56
|
+
- **Enhanced Command Execution**: Run commands and scripts in various languages with improved error handling and shell support
|
|
57
|
+
- **File Operations**: Manage files with proper security controls through shell commands
|
|
58
|
+
- **Code Discovery**: Find relevant files and code patterns across your project
|
|
59
|
+
- **Project Analysis**: Understand project structure, dependencies, and frameworks
|
|
60
|
+
- **Agent Delegation**: Delegate complex tasks to specialized sub-agents that can work concurrently
|
|
61
|
+
- **Multiple LLM Provider Support**: Configure any LiteLLM-compatible model for agent operations
|
|
62
|
+
- **Jupyter Notebook Support**: Read and edit Jupyter notebooks with full cell and output handling
|
|
63
|
+
|
|
64
|
+
## Tools Implemented
|
|
65
|
+
|
|
66
|
+
| Tool | Description |
|
|
67
|
+
| ---------------------- | --------------------------------------------------------------------------------------------- |
|
|
68
|
+
| `read_files` | Read one or multiple files with encoding detection |
|
|
69
|
+
| `write_file` | Create or overwrite files |
|
|
70
|
+
| `edit_file` | Make line-based edits to text files |
|
|
71
|
+
| `directory_tree` | Get a recursive tree view of directories |
|
|
72
|
+
| `get_file_info` | Get metadata about a file or directory |
|
|
73
|
+
| `search_content` | Search for patterns in file contents |
|
|
74
|
+
| `content_replace` | Replace patterns in file contents |
|
|
75
|
+
| `run_command` | Execute shell commands (also used for directory creation, file moving, and directory listing) |
|
|
76
|
+
| `run_script` | Execute scripts with specified interpreters |
|
|
77
|
+
| `script_tool` | Execute scripts in specific programming languages |
|
|
78
|
+
| `project_analyze_tool` | Analyze project structure and dependencies |
|
|
79
|
+
| `read_notebook` | Extract and read source code from all cells in a Jupyter notebook with outputs |
|
|
80
|
+
| `edit_notebook` | Edit, insert, or delete cells in a Jupyter notebook |
|
|
81
|
+
| `think` | Structured space for complex reasoning and analysis without making changes |
|
|
82
|
+
| `dispatch_agent` | Launch one or more agents that can perform tasks using read-only tools concurrently |
|
|
83
|
+
|
|
84
|
+
## Getting Started
|
|
85
|
+
|
|
86
|
+
For detailed installation and configuration instructions, please refer to [INSTALL.md](./doc/INSTALL.md).
|
|
87
|
+
|
|
88
|
+
Of course, you can also read [USEFUL_PROMPTS](./doc/USEFUL_PROMPTS.md) for some inspiration on how to use hanzo-mcp.
|
|
89
|
+
|
|
90
|
+
## Security
|
|
91
|
+
|
|
92
|
+
This implementation follows best practices for securing access to your filesystem:
|
|
93
|
+
|
|
94
|
+
- Permission prompts for file modifications and command execution
|
|
95
|
+
- Restricted access to specified directories only
|
|
96
|
+
- Input validation and sanitization
|
|
97
|
+
- Proper error handling and reporting
|
|
98
|
+
|
|
99
|
+
## Development
|
|
100
|
+
|
|
101
|
+
To contribute to this project:
|
|
102
|
+
|
|
103
|
+
1. Fork the repository
|
|
104
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
105
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
106
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
107
|
+
5. Open a Pull Request
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
hanzo_mcp/__init__.py,sha256=Y5rIvHCEKCc1GKgt4XqjpEjZa91JOu3fSPnJZSBZJ70,89
|
|
2
|
+
hanzo_mcp/cli.py,sha256=BKuodtGTddxPHXiRn0NuZlMgCCg6iJtxkCH--7pPuTs,6649
|
|
3
|
+
hanzo_mcp/server.py,sha256=IonmXSkcW1zNLBFX0rRy4Uz28wapwFKuw4Hz1QG2Upo,5256
|
|
4
|
+
hanzo_mcp/tools/__init__.py,sha256=4KGhjZ5M93_L5T942JJ5lm1f7qw5UfiE-RixkrvnHVo,3245
|
|
5
|
+
hanzo_mcp/tools/agent/__init__.py,sha256=0eyQqqdAy7WCZEqUfV6xh66bDpQI9neB6iDjWf0_pJI,2189
|
|
6
|
+
hanzo_mcp/tools/agent/agent_tool.py,sha256=qXu62ZRGM0o9mxOiRVFy-ABIZtEJ8z03DqAXshKAieI,19180
|
|
7
|
+
hanzo_mcp/tools/agent/prompt.py,sha256=jmYRI4Sm2D3LwEdC2qWakpqupgfGg8CT6grmx4NEDaA,4431
|
|
8
|
+
hanzo_mcp/tools/agent/tool_adapter.py,sha256=g9NKfIET0WOsm0r28xEXsibsprpI1C6ripcM6QwU-rI,2172
|
|
9
|
+
hanzo_mcp/tools/common/__init__.py,sha256=XkhBW1F9pKaJlD5xIlXQnYnhof-ALFnnnou_32Zauow,487
|
|
10
|
+
hanzo_mcp/tools/common/base.py,sha256=O7Lgft0XiC9Iyi3fYsmoWWrvKDK2Aa-FJLxPgnNJRJY,7341
|
|
11
|
+
hanzo_mcp/tools/common/context.py,sha256=ZaKD9llJQOJQLpYiXL4E5ovCAWWCB8W0WjmgMkArWXQ,12935
|
|
12
|
+
hanzo_mcp/tools/common/permissions.py,sha256=hxb9pZKpq3wjfaZ8qSjqmkZmc8RHtSKHfHXlrxhdu54,7384
|
|
13
|
+
hanzo_mcp/tools/common/thinking_tool.py,sha256=I-O6ipM-PUofkNoMMzv37Y_2Yfx9mh7F1upTTsfRN4M,4046
|
|
14
|
+
hanzo_mcp/tools/common/validation.py,sha256=gB3uM_cbPZsH4Ez0hnTgIcdP-AUlHZU02aRmZEpk_6I,3648
|
|
15
|
+
hanzo_mcp/tools/filesystem/__init__.py,sha256=-wNhb0IjJgz05n_fRP0wDXfKgJ6fgBp4wrGo62Hpyvc,3265
|
|
16
|
+
hanzo_mcp/tools/filesystem/base.py,sha256=HAzuMCrS0dKOBZNoLr7y74tdbYyKpi0FGhStuRgkFTU,3917
|
|
17
|
+
hanzo_mcp/tools/filesystem/content_replace.py,sha256=ZwzxyOTASUmzP-jtEnsSR-MKtNFC4R3kQunpV3KOCyg,11049
|
|
18
|
+
hanzo_mcp/tools/filesystem/directory_tree.py,sha256=cx-zpOeKP8DDuMt1ls3QhRk9h3RVmMhpPwpqn4wTfP4,11271
|
|
19
|
+
hanzo_mcp/tools/filesystem/edit_file.py,sha256=03ku1_8X_uAUPfqGlR6fv55VEz-0Pifp9DJtkcOTFHY,10980
|
|
20
|
+
hanzo_mcp/tools/filesystem/get_file_info.py,sha256=WR7uMqFcpKboS3FX3jF-MD-0-ROJJcppX7M_GtR0yLs,5392
|
|
21
|
+
hanzo_mcp/tools/filesystem/read_files.py,sha256=0JYJ2kM8FIoksbnnO8V0uY3D2R1uWvR7zb7_oXV0sMM,6968
|
|
22
|
+
hanzo_mcp/tools/filesystem/search_content.py,sha256=2zXke1YHYxg6GKQ_XHb0sXeaSkHI7Jx3P-YAqrpOTNM,10766
|
|
23
|
+
hanzo_mcp/tools/filesystem/write_file.py,sha256=7ZNR1ygECBjT7m62QNkeIEt0OGxNZL2zijX-bASWj0Y,5303
|
|
24
|
+
hanzo_mcp/tools/jupyter/__init__.py,sha256=xFYW8Idb4x1jLWbexN5sqFKSCd1aL820uENzJ7mb6rs,2282
|
|
25
|
+
hanzo_mcp/tools/jupyter/base.py,sha256=xtssHrkHx_u_nE12dqtZGcvuJe8kfsbSkMmq-6KQobQ,10412
|
|
26
|
+
hanzo_mcp/tools/jupyter/edit_notebook.py,sha256=_ZNlsCYaO9_SbZouvrLYElvssL6nlElCc2JxNCeMdQo,11986
|
|
27
|
+
hanzo_mcp/tools/jupyter/notebook_operations.py,sha256=PkZXk_PYPkBGxg2RWzqh-rN6VDHjFybImhdUm3xLLoY,23120
|
|
28
|
+
hanzo_mcp/tools/jupyter/read_notebook.py,sha256=54-i9MIaUiZGJndUPp2_-edTo3_j9WSgxXXoTmRCnlI,5656
|
|
29
|
+
hanzo_mcp/tools/project/__init__.py,sha256=kMaSPyYT03qXqFL83nKdSz19-IzlrsVZTJk6YMgJOhw,2208
|
|
30
|
+
hanzo_mcp/tools/project/analysis.py,sha256=9LFX_diDv6yYcqnY7tJQog4Sp3ZPrtm7EopnYJ3SPZo,30554
|
|
31
|
+
hanzo_mcp/tools/project/base.py,sha256=CniLAsjum5vC3cgvF9AqU-_ZY_0Nf9uaF2L_xV2obxE,1948
|
|
32
|
+
hanzo_mcp/tools/project/project_analyze.py,sha256=6GLE_JcSiCy6kKdee0sMI5T2229A-Vpp98s2j_JD6yI,5711
|
|
33
|
+
hanzo_mcp/tools/shell/__init__.py,sha256=lKgh0WXds4tZJ1tIL9MJbyMSzP6A9uZQALjGGBvyYc4,1679
|
|
34
|
+
hanzo_mcp/tools/shell/base.py,sha256=OxKNWMp-fB-vozzWOE_hHvr5M_pFKSMIYfOX0dEOWzA,4836
|
|
35
|
+
hanzo_mcp/tools/shell/command_executor.py,sha256=xdV6j1b_UqeKwzSxdHSlkqkn8tJfWN5-rR8Zq7WRxx0,26898
|
|
36
|
+
hanzo_mcp/tools/shell/run_command.py,sha256=r7HBw0lqabgkGnVsDXmLnrTo0SU9g8gLvzpa-9n-cmM,6891
|
|
37
|
+
hanzo_mcp/tools/shell/run_script.py,sha256=CLYnDc0Ze8plkXU6d98RgE4UrBg-fwaMVdcn9Fc6Ixw,7432
|
|
38
|
+
hanzo_mcp/tools/shell/script_tool.py,sha256=s63tawIZBvwgm_kU9P7A3D4v2ulVw7j4l_rpsa_zGuc,8680
|
|
39
|
+
hanzo_mcp-0.1.20.dist-info/licenses/LICENSE,sha256=mf1qZGFsPGskoPgytp9B-RsahfKvXsBpmaAbTLGTt8Y,1063
|
|
40
|
+
hanzo_mcp-0.1.20.dist-info/METADATA,sha256=lF8f_y3G7rIOmYO6lab-pJgMSgYMFELWOv9NAINhuqI,5923
|
|
41
|
+
hanzo_mcp-0.1.20.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
42
|
+
hanzo_mcp-0.1.20.dist-info/entry_points.txt,sha256=nyQRmNWne1Shm9XHLeteeCgkw6O57XjPl71oOqKbdTA,50
|
|
43
|
+
hanzo_mcp-0.1.20.dist-info/top_level.txt,sha256=eGFANatA0MHWiVlpS56fTYRIShtibrSom1uXI6XU0GU,10
|
|
44
|
+
hanzo_mcp-0.1.20.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 hanzoai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
hanzo_mcp
|