hanzo-mcp 0.3.8__tar.gz → 0.5.1__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.

Files changed (120) hide show
  1. hanzo_mcp-0.5.1/PKG-INFO +276 -0
  2. hanzo_mcp-0.5.1/README.md +231 -0
  3. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/__init__.py +1 -1
  4. hanzo_mcp-0.5.1/hanzo_mcp/cli.py +320 -0
  5. hanzo_mcp-0.5.1/hanzo_mcp/cli_enhanced.py +438 -0
  6. hanzo_mcp-0.5.1/hanzo_mcp/config/__init__.py +19 -0
  7. hanzo_mcp-0.5.1/hanzo_mcp/config/settings.py +449 -0
  8. hanzo_mcp-0.5.1/hanzo_mcp/config/tool_config.py +197 -0
  9. hanzo_mcp-0.5.1/hanzo_mcp/prompts/__init__.py +117 -0
  10. hanzo_mcp-0.5.1/hanzo_mcp/prompts/compact_conversation.py +77 -0
  11. hanzo_mcp-0.5.1/hanzo_mcp/prompts/create_release.py +38 -0
  12. hanzo_mcp-0.5.1/hanzo_mcp/prompts/project_system.py +120 -0
  13. hanzo_mcp-0.5.1/hanzo_mcp/prompts/project_todo_reminder.py +111 -0
  14. hanzo_mcp-0.5.1/hanzo_mcp/prompts/utils.py +286 -0
  15. hanzo_mcp-0.5.1/hanzo_mcp/server.py +204 -0
  16. hanzo_mcp-0.5.1/hanzo_mcp/tools/__init__.py +177 -0
  17. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/agent/__init__.py +8 -11
  18. hanzo_mcp-0.5.1/hanzo_mcp/tools/agent/agent_tool.py +540 -0
  19. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/agent/prompt.py +16 -13
  20. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/agent/tool_adapter.py +9 -9
  21. hanzo_mcp-0.5.1/hanzo_mcp/tools/common/__init__.py +31 -0
  22. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/common/base.py +79 -110
  23. hanzo_mcp-0.5.1/hanzo_mcp/tools/common/batch_tool.py +330 -0
  24. hanzo_mcp-0.5.1/hanzo_mcp/tools/common/config_tool.py +396 -0
  25. hanzo_mcp-0.5.1/hanzo_mcp/tools/common/context.py +182 -0
  26. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/common/permissions.py +12 -12
  27. hanzo_mcp-0.5.1/hanzo_mcp/tools/common/thinking_tool.py +153 -0
  28. hanzo_mcp-0.5.1/hanzo_mcp/tools/common/validation.py +62 -0
  29. hanzo_mcp-0.5.1/hanzo_mcp/tools/filesystem/__init__.py +150 -0
  30. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/filesystem/base.py +32 -24
  31. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/filesystem/content_replace.py +114 -107
  32. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/filesystem/directory_tree.py +129 -105
  33. hanzo_mcp-0.5.1/hanzo_mcp/tools/filesystem/edit.py +279 -0
  34. hanzo_mcp-0.5.1/hanzo_mcp/tools/filesystem/grep.py +458 -0
  35. hanzo_mcp-0.5.1/hanzo_mcp/tools/filesystem/grep_ast_tool.py +250 -0
  36. hanzo_mcp-0.5.1/hanzo_mcp/tools/filesystem/multi_edit.py +362 -0
  37. hanzo_mcp-0.5.1/hanzo_mcp/tools/filesystem/read.py +255 -0
  38. hanzo_mcp-0.5.1/hanzo_mcp/tools/filesystem/unified_search.py +689 -0
  39. hanzo_mcp-0.5.1/hanzo_mcp/tools/filesystem/write.py +156 -0
  40. hanzo_mcp-0.5.1/hanzo_mcp/tools/jupyter/__init__.py +88 -0
  41. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/jupyter/base.py +66 -57
  42. hanzo_mcp-0.3.8/hanzo_mcp/tools/jupyter/edit_notebook.py → hanzo_mcp-0.5.1/hanzo_mcp/tools/jupyter/notebook_edit.py +162 -139
  43. hanzo_mcp-0.5.1/hanzo_mcp/tools/jupyter/notebook_read.py +152 -0
  44. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/shell/__init__.py +29 -20
  45. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/shell/base.py +87 -45
  46. hanzo_mcp-0.5.1/hanzo_mcp/tools/shell/bash_session.py +731 -0
  47. hanzo_mcp-0.5.1/hanzo_mcp/tools/shell/bash_session_executor.py +295 -0
  48. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp/tools/shell/command_executor.py +435 -384
  49. hanzo_mcp-0.5.1/hanzo_mcp/tools/shell/run_command.py +357 -0
  50. hanzo_mcp-0.5.1/hanzo_mcp/tools/shell/run_command_windows.py +328 -0
  51. hanzo_mcp-0.5.1/hanzo_mcp/tools/shell/session_manager.py +196 -0
  52. hanzo_mcp-0.5.1/hanzo_mcp/tools/shell/session_storage.py +325 -0
  53. hanzo_mcp-0.5.1/hanzo_mcp/tools/todo/__init__.py +66 -0
  54. hanzo_mcp-0.5.1/hanzo_mcp/tools/todo/base.py +319 -0
  55. hanzo_mcp-0.5.1/hanzo_mcp/tools/todo/todo_read.py +148 -0
  56. hanzo_mcp-0.5.1/hanzo_mcp/tools/todo/todo_write.py +378 -0
  57. hanzo_mcp-0.5.1/hanzo_mcp/tools/vector/__init__.py +99 -0
  58. hanzo_mcp-0.5.1/hanzo_mcp/tools/vector/ast_analyzer.py +459 -0
  59. hanzo_mcp-0.5.1/hanzo_mcp/tools/vector/git_ingester.py +482 -0
  60. hanzo_mcp-0.5.1/hanzo_mcp/tools/vector/infinity_store.py +731 -0
  61. hanzo_mcp-0.5.1/hanzo_mcp/tools/vector/mock_infinity.py +162 -0
  62. hanzo_mcp-0.5.1/hanzo_mcp/tools/vector/project_manager.py +361 -0
  63. hanzo_mcp-0.5.1/hanzo_mcp/tools/vector/vector_index.py +116 -0
  64. hanzo_mcp-0.5.1/hanzo_mcp/tools/vector/vector_search.py +225 -0
  65. hanzo_mcp-0.5.1/hanzo_mcp.egg-info/PKG-INFO +276 -0
  66. hanzo_mcp-0.5.1/hanzo_mcp.egg-info/SOURCES.txt +78 -0
  67. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp.egg-info/requires.txt +1 -0
  68. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/pyproject.toml +2 -2
  69. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/tests/test_cli.py +22 -5
  70. hanzo_mcp-0.5.1/tests/test_git_ingestion.py +346 -0
  71. hanzo_mcp-0.5.1/tests/test_search_quality.py +607 -0
  72. hanzo_mcp-0.5.1/tests/test_unified_search.py +628 -0
  73. hanzo_mcp-0.5.1/tests/test_vector_store.py +351 -0
  74. hanzo_mcp-0.3.8/PKG-INFO +0 -196
  75. hanzo_mcp-0.3.8/README.md +0 -152
  76. hanzo_mcp-0.3.8/hanzo_mcp/cli.py +0 -372
  77. hanzo_mcp-0.3.8/hanzo_mcp/server.py +0 -186
  78. hanzo_mcp-0.3.8/hanzo_mcp/tools/__init__.py +0 -89
  79. hanzo_mcp-0.3.8/hanzo_mcp/tools/agent/agent_tool.py +0 -474
  80. hanzo_mcp-0.3.8/hanzo_mcp/tools/agent/base_provider.py +0 -73
  81. hanzo_mcp-0.3.8/hanzo_mcp/tools/agent/litellm_provider.py +0 -45
  82. hanzo_mcp-0.3.8/hanzo_mcp/tools/agent/lmstudio_agent.py +0 -385
  83. hanzo_mcp-0.3.8/hanzo_mcp/tools/agent/lmstudio_provider.py +0 -219
  84. hanzo_mcp-0.3.8/hanzo_mcp/tools/agent/provider_registry.py +0 -120
  85. hanzo_mcp-0.3.8/hanzo_mcp/tools/common/__init__.py +0 -30
  86. hanzo_mcp-0.3.8/hanzo_mcp/tools/common/context.py +0 -448
  87. hanzo_mcp-0.3.8/hanzo_mcp/tools/common/error_handling.py +0 -86
  88. hanzo_mcp-0.3.8/hanzo_mcp/tools/common/logging_config.py +0 -115
  89. hanzo_mcp-0.3.8/hanzo_mcp/tools/common/session.py +0 -91
  90. hanzo_mcp-0.3.8/hanzo_mcp/tools/common/think_tool.py +0 -123
  91. hanzo_mcp-0.3.8/hanzo_mcp/tools/common/validation.py +0 -124
  92. hanzo_mcp-0.3.8/hanzo_mcp/tools/common/version_tool.py +0 -120
  93. hanzo_mcp-0.3.8/hanzo_mcp/tools/filesystem/__init__.py +0 -110
  94. hanzo_mcp-0.3.8/hanzo_mcp/tools/filesystem/edit_file.py +0 -287
  95. hanzo_mcp-0.3.8/hanzo_mcp/tools/filesystem/get_file_info.py +0 -170
  96. hanzo_mcp-0.3.8/hanzo_mcp/tools/filesystem/read_files.py +0 -199
  97. hanzo_mcp-0.3.8/hanzo_mcp/tools/filesystem/search_content.py +0 -275
  98. hanzo_mcp-0.3.8/hanzo_mcp/tools/filesystem/write_file.py +0 -162
  99. hanzo_mcp-0.3.8/hanzo_mcp/tools/jupyter/__init__.py +0 -76
  100. hanzo_mcp-0.3.8/hanzo_mcp/tools/jupyter/notebook_operations.py +0 -514
  101. hanzo_mcp-0.3.8/hanzo_mcp/tools/jupyter/read_notebook.py +0 -165
  102. hanzo_mcp-0.3.8/hanzo_mcp/tools/project/__init__.py +0 -64
  103. hanzo_mcp-0.3.8/hanzo_mcp/tools/project/analysis.py +0 -886
  104. hanzo_mcp-0.3.8/hanzo_mcp/tools/project/base.py +0 -66
  105. hanzo_mcp-0.3.8/hanzo_mcp/tools/project/project_analyze.py +0 -173
  106. hanzo_mcp-0.3.8/hanzo_mcp/tools/shell/run_command.py +0 -204
  107. hanzo_mcp-0.3.8/hanzo_mcp/tools/shell/run_script.py +0 -215
  108. hanzo_mcp-0.3.8/hanzo_mcp/tools/shell/script_tool.py +0 -244
  109. hanzo_mcp-0.3.8/hanzo_mcp.egg-info/PKG-INFO +0 -196
  110. hanzo_mcp-0.3.8/hanzo_mcp.egg-info/SOURCES.txt +0 -62
  111. hanzo_mcp-0.3.8/tests/test_server.py +0 -191
  112. hanzo_mcp-0.3.8/tests/test_tools_registration.py +0 -252
  113. hanzo_mcp-0.3.8/tests/test_validation.py +0 -118
  114. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/LICENSE +0 -0
  115. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp.egg-info/dependency_links.txt +0 -0
  116. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp.egg-info/entry_points.txt +0 -0
  117. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/hanzo_mcp.egg-info/top_level.txt +0 -0
  118. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/setup.cfg +0 -0
  119. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/setup.py +0 -0
  120. {hanzo_mcp-0.3.8 → hanzo_mcp-0.5.1}/tests/test_async_support.py +0 -0
@@ -0,0 +1,276 @@
1
+ Metadata-Version: 2.4
2
+ Name: hanzo-mcp
3
+ Version: 0.5.1
4
+ Summary: MCP implementation of Hanzo capabilities
5
+ Author-email: Hanzo Industries Inc <dev@hanzo.ai>
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/tree/main/docs
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.12
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: mcp>=1.6.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
+ Requires-Dist: grep-ast>=0.8.1
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
26
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
27
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
28
+ Requires-Dist: black>=23.3.0; extra == "dev"
29
+ Requires-Dist: sphinx>=8.0.0; extra == "dev"
30
+ Requires-Dist: sphinx-rtd-theme>=1.3.0; extra == "dev"
31
+ Requires-Dist: myst-parser>=2.0.0; extra == "dev"
32
+ Provides-Extra: test
33
+ Requires-Dist: pytest>=7.0.0; extra == "test"
34
+ Requires-Dist: pytest-cov>=4.1.0; extra == "test"
35
+ Requires-Dist: pytest-mock>=3.10.0; extra == "test"
36
+ Requires-Dist: pytest-asyncio>=0.25.3; extra == "test"
37
+ Requires-Dist: twisted; extra == "test"
38
+ Provides-Extra: performance
39
+ Requires-Dist: ujson>=5.7.0; extra == "performance"
40
+ Requires-Dist: orjson>=3.9.0; extra == "performance"
41
+ Provides-Extra: publish
42
+ Requires-Dist: twine>=4.0.2; extra == "publish"
43
+ Requires-Dist: build>=1.0.3; extra == "publish"
44
+ Dynamic: license-file
45
+
46
+ # Hanzo MCP
47
+
48
+ [![Open in Hanzo.App](https://img.shields.io/badge/Open%20in-Hanzo.App-8A2BE2?style=for-the-badge&logo=rocket)](https://hanzo.app/launch?repo=https://github.com/hanzoai/mcp)
49
+ [![Add Feature with Hanzo Dev](https://img.shields.io/badge/Add%20Feature-Hanzo%20Dev-00D4AA?style=for-the-badge&logo=plus)](https://hanzo.app/dev?repo=https://github.com/hanzoai/mcp&action=feature)
50
+ [![Fix Bugs with Hanzo Dev](https://img.shields.io/badge/Fix%20Bugs-Hanzo%20Dev-FF6B6B?style=for-the-badge&logo=wrench)](https://hanzo.app/dev?repo=https://github.com/hanzoai/mcp&action=bugfix)
51
+
52
+ An implementation of Hanzo capabilities using the Model Context Protocol (MCP).
53
+
54
+ ## Overview
55
+
56
+ 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.
57
+
58
+ ![example](./docs/example.gif)
59
+
60
+ ## Features
61
+
62
+ - **Code Understanding**: Analyze and understand codebases through file access and pattern searching
63
+ - **Code Modification**: Make targeted edits to files with proper permission handling
64
+ - **Enhanced Command Execution**: Run commands and scripts in various languages with improved error handling and shell support
65
+ - **File Operations**: Manage files with proper security controls through shell commands
66
+ - **Code Discovery**: Find relevant files and code patterns across your project
67
+ - **Project Analysis**: Understand project structure, dependencies, and frameworks
68
+ - **Agent Delegation**: Delegate complex tasks to specialized sub-agents that can work concurrently
69
+ - **Multiple LLM Provider Support**: Configure any LiteLLM-compatible model for agent operations
70
+ - **Jupyter Notebook Support**: Read and edit Jupyter notebooks with full cell and output handling
71
+
72
+ ## Tools Implemented
73
+
74
+ ### Core File Operations
75
+ | Tool | Description |
76
+ | ----------------- | ----------------------------------------------------------------------------------- |
77
+ | `read` | Read one or multiple files with encoding detection and line range support |
78
+ | `write` | Create or overwrite files with content |
79
+ | `edit` | Make precise line-based edits to existing files |
80
+ | `multi_edit` | Make multiple edits to a single file in one atomic operation |
81
+ | `directory_tree` | Get a recursive tree view of directories with customizable depth and filters |
82
+ | `content_replace` | Replace patterns in file contents using regex |
83
+
84
+ ### Search & Analysis
85
+ | Tool | Description |
86
+ | ----------------- | ----------------------------------------------------------------------------------- |
87
+ | `grep` | Fast pattern search across files using ripgrep |
88
+ | `grep_ast` | AST-aware code search that understands code structure |
89
+ | `unified_search` | Intelligent multi-modal search combining text, vector, AST, and symbol search |
90
+ | `vector_search` | Semantic search across indexed documents and code |
91
+ | `vector_index` | Index documents and code in project-aware vector databases |
92
+
93
+ ### Shell & Commands
94
+ | Tool | Description |
95
+ | ----------------- | ----------------------------------------------------------------------------------- |
96
+ | `run_command` | Execute shell commands with timeout, environment control, and session support |
97
+
98
+ ### Jupyter Support
99
+ | Tool | Description |
100
+ | ----------------- | ----------------------------------------------------------------------------------- |
101
+ | `notebook_read` | Read Jupyter notebook cells with outputs and metadata |
102
+ | `notebook_edit` | Edit, insert, or delete cells in Jupyter notebooks |
103
+
104
+ ### Task Management
105
+ | Tool | Description |
106
+ | ----------------- | ----------------------------------------------------------------------------------- |
107
+ | `todo_read` | Read the current task list for tracking progress |
108
+ | `todo_write` | Create and manage structured task lists with status and priority |
109
+
110
+ ### Advanced Tools
111
+ | Tool | Description |
112
+ | ----------------- | ----------------------------------------------------------------------------------- |
113
+ | `think` | Structured space for complex reasoning and analysis without making changes |
114
+ | `dispatch_agent` | Launch specialized sub-agents for concurrent task execution |
115
+ | `batch` | Execute multiple tool calls in a single operation for performance |
116
+
117
+ For detailed documentation on all tools, see [TOOLS_DOCUMENTATION.md](./TOOLS_DOCUMENTATION.md).
118
+
119
+ ## Getting Started
120
+
121
+ ### 🚀 Try it Instantly in Hanzo.App
122
+
123
+ **No setup required!** Launch this project instantly in your browser:
124
+
125
+ [![Open in Hanzo.App](https://img.shields.io/badge/Launch%20Now-Hanzo.App-8A2BE2?style=for-the-badge&logo=rocket&logoColor=white)](https://hanzo.app/launch?repo=https://github.com/hanzoai/mcp)
126
+
127
+ ### Quick Install
128
+
129
+ ```bash
130
+ # Install using uv
131
+ uv pip install hanzo-mcp
132
+
133
+ # Or using pip
134
+ pip install hanzo-mcp
135
+ ```
136
+
137
+ ### Claude Desktop Integration
138
+
139
+ To install and configure hanzo-mcp for use with Claude Desktop:
140
+
141
+ ```bash
142
+ # Install the package globally
143
+ uv pip install hanzo-mcp
144
+
145
+ # Install configuration to Claude Desktop with default settings
146
+ hanzo-mcp --install
147
+ ```
148
+
149
+ For development, if you want to install your local version to Claude Desktop:
150
+
151
+ ```bash
152
+ # Clone and navigate to the repository
153
+ git clone https://github.com/hanzoai/mcp.git
154
+ cd mcp
155
+
156
+ # Install and configure for Claude Desktop
157
+ make install-desktop
158
+
159
+ # With custom paths and server name
160
+ make install-desktop ALLOWED_PATHS="/path/to/projects,/another/path" SERVER_NAME="hanzo"
161
+
162
+ # Disable write tools (useful if you prefer using your IDE for edits)
163
+ make install-desktop DISABLE_WRITE=1
164
+ ```
165
+
166
+ After installation, restart Claude Desktop. You'll see "hanzo" (or your custom server name) available in the MCP server dropdown.
167
+
168
+ For detailed installation and configuration instructions, please refer to the [documentation](./docs/).
169
+
170
+ Of course, you can also read [USEFUL_PROMPTS](./docs/USEFUL_PROMPTS.md) for some inspiration on how to use hanzo-mcp.
171
+
172
+ ## Security
173
+
174
+ This implementation follows best practices for securing access to your filesystem:
175
+
176
+ - Permission prompts for file modifications and command execution
177
+ - Restricted access to specified directories only
178
+ - Input validation and sanitization
179
+ - Proper error handling and reporting
180
+
181
+ ## Documentation
182
+
183
+ Comprehensive documentation is available in the [docs](./docs/) directory. You can build and view the documentation locally:
184
+
185
+ ```bash
186
+ # Build the documentation
187
+ make docs
188
+
189
+ # Start a local server to view the documentation
190
+ make docs-serve
191
+ ```
192
+
193
+ Then open http://localhost:8000/ in your browser to view the documentation.
194
+
195
+ ## Development
196
+
197
+ ### Setup Development Environment
198
+
199
+ ```bash
200
+ # Clone the repository
201
+ git clone https://github.com/hanzoai/mcp.git
202
+ cd mcp
203
+
204
+ # Install Python 3.13 using uv
205
+ make install-python
206
+
207
+ # Setup virtual environment and install dependencies
208
+ make setup
209
+
210
+ # Or install with development dependencies
211
+ make install-dev
212
+ ```
213
+
214
+ ### Testing
215
+
216
+ ```bash
217
+ # Run tests
218
+ make test
219
+
220
+ # Run tests with coverage
221
+ make test-cov
222
+ ```
223
+
224
+ ### Building and Publishing
225
+
226
+ ```bash
227
+ # Build package
228
+ make build
229
+
230
+ # Version bumping
231
+ make bump-patch # Increment patch version (0.1.x → 0.1.x+1)
232
+ make bump-minor # Increment minor version (0.x.0 → 0.x+1.0)
233
+ make bump-major # Increment major version (x.0.0 → x+1.0.0)
234
+
235
+ # Manual version bumping (alternative to make commands)
236
+ python -m scripts.bump_version patch # Increment patch version
237
+ python -m scripts.bump_version minor # Increment minor version
238
+ python -m scripts.bump_version major # Increment major version
239
+
240
+ # Publishing (creates git tag and pushes it to GitHub)
241
+ make publish # Publish using configured credentials in .pypirc
242
+ PYPI_TOKEN=your_token make publish # Publish with token from environment variable
243
+
244
+ # Publishing (creates git tag, pushes to GitHub, and publishes to PyPI)
245
+ make patch # Bump patch version, build, publish, create git tag, and push
246
+ make minor # Bump minor version, build, publish, create git tag, and push
247
+ make major # Bump major version, build, publish, create git tag, and push
248
+
249
+ # Publish to Test PyPI
250
+ make publish-test
251
+ ```
252
+
253
+ ### Contributing
254
+
255
+ **New contributors welcome!** 🎉 We've made it easy to contribute:
256
+
257
+ [![Contribute with Hanzo Dev](https://img.shields.io/badge/Contribute%20with-Hanzo%20Dev-00D4AA?style=for-the-badge&logo=code)](https://hanzo.app/dev?repo=https://github.com/hanzoai/mcp&action=contribute)
258
+
259
+ **Traditional approach:**
260
+
261
+ 1. Fork the repository
262
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
263
+ 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
264
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
265
+ 5. Open a Pull Request
266
+
267
+ **Or use Hanzo Dev for AI-assisted contributions:**
268
+ - [Launch in Hanzo.App](https://hanzo.app/launch?repo=https://github.com/hanzoai/mcp) for instant setup
269
+ - [Add new features](https://hanzo.app/dev?repo=https://github.com/hanzoai/mcp&action=feature) with AI assistance
270
+ - [Fix bugs automatically](https://hanzo.app/dev?repo=https://github.com/hanzoai/mcp&action=bugfix)
271
+
272
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
273
+
274
+ ## License
275
+
276
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -0,0 +1,231 @@
1
+ # Hanzo MCP
2
+
3
+ [![Open in Hanzo.App](https://img.shields.io/badge/Open%20in-Hanzo.App-8A2BE2?style=for-the-badge&logo=rocket)](https://hanzo.app/launch?repo=https://github.com/hanzoai/mcp)
4
+ [![Add Feature with Hanzo Dev](https://img.shields.io/badge/Add%20Feature-Hanzo%20Dev-00D4AA?style=for-the-badge&logo=plus)](https://hanzo.app/dev?repo=https://github.com/hanzoai/mcp&action=feature)
5
+ [![Fix Bugs with Hanzo Dev](https://img.shields.io/badge/Fix%20Bugs-Hanzo%20Dev-FF6B6B?style=for-the-badge&logo=wrench)](https://hanzo.app/dev?repo=https://github.com/hanzoai/mcp&action=bugfix)
6
+
7
+ An implementation of Hanzo capabilities using the Model Context Protocol (MCP).
8
+
9
+ ## Overview
10
+
11
+ 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.
12
+
13
+ ![example](./docs/example.gif)
14
+
15
+ ## Features
16
+
17
+ - **Code Understanding**: Analyze and understand codebases through file access and pattern searching
18
+ - **Code Modification**: Make targeted edits to files with proper permission handling
19
+ - **Enhanced Command Execution**: Run commands and scripts in various languages with improved error handling and shell support
20
+ - **File Operations**: Manage files with proper security controls through shell commands
21
+ - **Code Discovery**: Find relevant files and code patterns across your project
22
+ - **Project Analysis**: Understand project structure, dependencies, and frameworks
23
+ - **Agent Delegation**: Delegate complex tasks to specialized sub-agents that can work concurrently
24
+ - **Multiple LLM Provider Support**: Configure any LiteLLM-compatible model for agent operations
25
+ - **Jupyter Notebook Support**: Read and edit Jupyter notebooks with full cell and output handling
26
+
27
+ ## Tools Implemented
28
+
29
+ ### Core File Operations
30
+ | Tool | Description |
31
+ | ----------------- | ----------------------------------------------------------------------------------- |
32
+ | `read` | Read one or multiple files with encoding detection and line range support |
33
+ | `write` | Create or overwrite files with content |
34
+ | `edit` | Make precise line-based edits to existing files |
35
+ | `multi_edit` | Make multiple edits to a single file in one atomic operation |
36
+ | `directory_tree` | Get a recursive tree view of directories with customizable depth and filters |
37
+ | `content_replace` | Replace patterns in file contents using regex |
38
+
39
+ ### Search & Analysis
40
+ | Tool | Description |
41
+ | ----------------- | ----------------------------------------------------------------------------------- |
42
+ | `grep` | Fast pattern search across files using ripgrep |
43
+ | `grep_ast` | AST-aware code search that understands code structure |
44
+ | `unified_search` | Intelligent multi-modal search combining text, vector, AST, and symbol search |
45
+ | `vector_search` | Semantic search across indexed documents and code |
46
+ | `vector_index` | Index documents and code in project-aware vector databases |
47
+
48
+ ### Shell & Commands
49
+ | Tool | Description |
50
+ | ----------------- | ----------------------------------------------------------------------------------- |
51
+ | `run_command` | Execute shell commands with timeout, environment control, and session support |
52
+
53
+ ### Jupyter Support
54
+ | Tool | Description |
55
+ | ----------------- | ----------------------------------------------------------------------------------- |
56
+ | `notebook_read` | Read Jupyter notebook cells with outputs and metadata |
57
+ | `notebook_edit` | Edit, insert, or delete cells in Jupyter notebooks |
58
+
59
+ ### Task Management
60
+ | Tool | Description |
61
+ | ----------------- | ----------------------------------------------------------------------------------- |
62
+ | `todo_read` | Read the current task list for tracking progress |
63
+ | `todo_write` | Create and manage structured task lists with status and priority |
64
+
65
+ ### Advanced Tools
66
+ | Tool | Description |
67
+ | ----------------- | ----------------------------------------------------------------------------------- |
68
+ | `think` | Structured space for complex reasoning and analysis without making changes |
69
+ | `dispatch_agent` | Launch specialized sub-agents for concurrent task execution |
70
+ | `batch` | Execute multiple tool calls in a single operation for performance |
71
+
72
+ For detailed documentation on all tools, see [TOOLS_DOCUMENTATION.md](./TOOLS_DOCUMENTATION.md).
73
+
74
+ ## Getting Started
75
+
76
+ ### 🚀 Try it Instantly in Hanzo.App
77
+
78
+ **No setup required!** Launch this project instantly in your browser:
79
+
80
+ [![Open in Hanzo.App](https://img.shields.io/badge/Launch%20Now-Hanzo.App-8A2BE2?style=for-the-badge&logo=rocket&logoColor=white)](https://hanzo.app/launch?repo=https://github.com/hanzoai/mcp)
81
+
82
+ ### Quick Install
83
+
84
+ ```bash
85
+ # Install using uv
86
+ uv pip install hanzo-mcp
87
+
88
+ # Or using pip
89
+ pip install hanzo-mcp
90
+ ```
91
+
92
+ ### Claude Desktop Integration
93
+
94
+ To install and configure hanzo-mcp for use with Claude Desktop:
95
+
96
+ ```bash
97
+ # Install the package globally
98
+ uv pip install hanzo-mcp
99
+
100
+ # Install configuration to Claude Desktop with default settings
101
+ hanzo-mcp --install
102
+ ```
103
+
104
+ For development, if you want to install your local version to Claude Desktop:
105
+
106
+ ```bash
107
+ # Clone and navigate to the repository
108
+ git clone https://github.com/hanzoai/mcp.git
109
+ cd mcp
110
+
111
+ # Install and configure for Claude Desktop
112
+ make install-desktop
113
+
114
+ # With custom paths and server name
115
+ make install-desktop ALLOWED_PATHS="/path/to/projects,/another/path" SERVER_NAME="hanzo"
116
+
117
+ # Disable write tools (useful if you prefer using your IDE for edits)
118
+ make install-desktop DISABLE_WRITE=1
119
+ ```
120
+
121
+ After installation, restart Claude Desktop. You'll see "hanzo" (or your custom server name) available in the MCP server dropdown.
122
+
123
+ For detailed installation and configuration instructions, please refer to the [documentation](./docs/).
124
+
125
+ Of course, you can also read [USEFUL_PROMPTS](./docs/USEFUL_PROMPTS.md) for some inspiration on how to use hanzo-mcp.
126
+
127
+ ## Security
128
+
129
+ This implementation follows best practices for securing access to your filesystem:
130
+
131
+ - Permission prompts for file modifications and command execution
132
+ - Restricted access to specified directories only
133
+ - Input validation and sanitization
134
+ - Proper error handling and reporting
135
+
136
+ ## Documentation
137
+
138
+ Comprehensive documentation is available in the [docs](./docs/) directory. You can build and view the documentation locally:
139
+
140
+ ```bash
141
+ # Build the documentation
142
+ make docs
143
+
144
+ # Start a local server to view the documentation
145
+ make docs-serve
146
+ ```
147
+
148
+ Then open http://localhost:8000/ in your browser to view the documentation.
149
+
150
+ ## Development
151
+
152
+ ### Setup Development Environment
153
+
154
+ ```bash
155
+ # Clone the repository
156
+ git clone https://github.com/hanzoai/mcp.git
157
+ cd mcp
158
+
159
+ # Install Python 3.13 using uv
160
+ make install-python
161
+
162
+ # Setup virtual environment and install dependencies
163
+ make setup
164
+
165
+ # Or install with development dependencies
166
+ make install-dev
167
+ ```
168
+
169
+ ### Testing
170
+
171
+ ```bash
172
+ # Run tests
173
+ make test
174
+
175
+ # Run tests with coverage
176
+ make test-cov
177
+ ```
178
+
179
+ ### Building and Publishing
180
+
181
+ ```bash
182
+ # Build package
183
+ make build
184
+
185
+ # Version bumping
186
+ make bump-patch # Increment patch version (0.1.x → 0.1.x+1)
187
+ make bump-minor # Increment minor version (0.x.0 → 0.x+1.0)
188
+ make bump-major # Increment major version (x.0.0 → x+1.0.0)
189
+
190
+ # Manual version bumping (alternative to make commands)
191
+ python -m scripts.bump_version patch # Increment patch version
192
+ python -m scripts.bump_version minor # Increment minor version
193
+ python -m scripts.bump_version major # Increment major version
194
+
195
+ # Publishing (creates git tag and pushes it to GitHub)
196
+ make publish # Publish using configured credentials in .pypirc
197
+ PYPI_TOKEN=your_token make publish # Publish with token from environment variable
198
+
199
+ # Publishing (creates git tag, pushes to GitHub, and publishes to PyPI)
200
+ make patch # Bump patch version, build, publish, create git tag, and push
201
+ make minor # Bump minor version, build, publish, create git tag, and push
202
+ make major # Bump major version, build, publish, create git tag, and push
203
+
204
+ # Publish to Test PyPI
205
+ make publish-test
206
+ ```
207
+
208
+ ### Contributing
209
+
210
+ **New contributors welcome!** 🎉 We've made it easy to contribute:
211
+
212
+ [![Contribute with Hanzo Dev](https://img.shields.io/badge/Contribute%20with-Hanzo%20Dev-00D4AA?style=for-the-badge&logo=code)](https://hanzo.app/dev?repo=https://github.com/hanzoai/mcp&action=contribute)
213
+
214
+ **Traditional approach:**
215
+
216
+ 1. Fork the repository
217
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
218
+ 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
219
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
220
+ 5. Open a Pull Request
221
+
222
+ **Or use Hanzo Dev for AI-assisted contributions:**
223
+ - [Launch in Hanzo.App](https://hanzo.app/launch?repo=https://github.com/hanzoai/mcp) for instant setup
224
+ - [Add new features](https://hanzo.app/dev?repo=https://github.com/hanzoai/mcp&action=feature) with AI assistance
225
+ - [Fix bugs automatically](https://hanzo.app/dev?repo=https://github.com/hanzoai/mcp&action=bugfix)
226
+
227
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
228
+
229
+ ## License
230
+
231
+ This project is licensed under the MIT License - see the LICENSE file for details.
@@ -1,3 +1,3 @@
1
1
  """Hanzo MCP - Implementation of Hanzo capabilities using MCP."""
2
2
 
3
- __version__ = "0.3.8"
3
+ __version__ = "0.5.1"