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

Files changed (78) hide show
  1. hanzo_mcp/__init__.py +11 -2
  2. hanzo_mcp/cli.py +69 -19
  3. hanzo_mcp/cli_enhanced.py +15 -12
  4. hanzo_mcp/cli_plugin.py +91 -0
  5. hanzo_mcp/config/__init__.py +1 -1
  6. hanzo_mcp/config/settings.py +75 -8
  7. hanzo_mcp/config/tool_config.py +2 -2
  8. hanzo_mcp/dev_server.py +20 -15
  9. hanzo_mcp/prompts/project_system.py +1 -1
  10. hanzo_mcp/server.py +18 -4
  11. hanzo_mcp/server_enhanced.py +69 -0
  12. hanzo_mcp/tools/__init__.py +78 -30
  13. hanzo_mcp/tools/agent/__init__.py +1 -1
  14. hanzo_mcp/tools/agent/agent_tool.py +2 -2
  15. hanzo_mcp/tools/common/__init__.py +15 -1
  16. hanzo_mcp/tools/common/base.py +4 -4
  17. hanzo_mcp/tools/common/batch_tool.py +1 -1
  18. hanzo_mcp/tools/common/config_tool.py +2 -2
  19. hanzo_mcp/tools/common/context.py +2 -2
  20. hanzo_mcp/tools/common/context_fix.py +26 -0
  21. hanzo_mcp/tools/common/critic_tool.py +196 -0
  22. hanzo_mcp/tools/common/decorators.py +208 -0
  23. hanzo_mcp/tools/common/enhanced_base.py +106 -0
  24. hanzo_mcp/tools/common/mode.py +116 -0
  25. hanzo_mcp/tools/common/mode_loader.py +105 -0
  26. hanzo_mcp/tools/common/permissions.py +1 -1
  27. hanzo_mcp/tools/common/personality.py +936 -0
  28. hanzo_mcp/tools/common/plugin_loader.py +287 -0
  29. hanzo_mcp/tools/common/stats.py +4 -4
  30. hanzo_mcp/tools/common/tool_list.py +1 -1
  31. hanzo_mcp/tools/common/validation.py +1 -1
  32. hanzo_mcp/tools/config/__init__.py +3 -1
  33. hanzo_mcp/tools/config/config_tool.py +1 -1
  34. hanzo_mcp/tools/config/mode_tool.py +209 -0
  35. hanzo_mcp/tools/database/__init__.py +1 -1
  36. hanzo_mcp/tools/editor/__init__.py +1 -1
  37. hanzo_mcp/tools/filesystem/__init__.py +19 -14
  38. hanzo_mcp/tools/filesystem/batch_search.py +3 -3
  39. hanzo_mcp/tools/filesystem/diff.py +2 -2
  40. hanzo_mcp/tools/filesystem/rules_tool.py +235 -0
  41. hanzo_mcp/tools/filesystem/{unified_search.py → search_tool.py} +12 -12
  42. hanzo_mcp/tools/filesystem/{symbols_unified.py → symbols_tool.py} +104 -5
  43. hanzo_mcp/tools/filesystem/watch.py +3 -2
  44. hanzo_mcp/tools/jupyter/__init__.py +2 -2
  45. hanzo_mcp/tools/jupyter/jupyter.py +1 -1
  46. hanzo_mcp/tools/llm/__init__.py +3 -3
  47. hanzo_mcp/tools/llm/llm_tool.py +648 -143
  48. hanzo_mcp/tools/mcp/__init__.py +2 -2
  49. hanzo_mcp/tools/mcp/{mcp_unified.py → mcp_tool.py} +3 -3
  50. hanzo_mcp/tools/shell/__init__.py +6 -6
  51. hanzo_mcp/tools/shell/base_process.py +4 -2
  52. hanzo_mcp/tools/shell/bash_session_executor.py +8 -5
  53. hanzo_mcp/tools/shell/{bash_unified.py → bash_tool.py} +1 -1
  54. hanzo_mcp/tools/shell/command_executor.py +8 -6
  55. hanzo_mcp/tools/shell/{npx_unified.py → npx_tool.py} +1 -1
  56. hanzo_mcp/tools/shell/open.py +2 -2
  57. hanzo_mcp/tools/shell/{process_unified.py → process_tool.py} +1 -1
  58. hanzo_mcp/tools/shell/run_command_windows.py +1 -1
  59. hanzo_mcp/tools/shell/uvx.py +47 -2
  60. hanzo_mcp/tools/shell/uvx_background.py +47 -2
  61. hanzo_mcp/tools/shell/{uvx_unified.py → uvx_tool.py} +1 -1
  62. hanzo_mcp/tools/todo/__init__.py +14 -19
  63. hanzo_mcp/tools/todo/todo.py +22 -1
  64. hanzo_mcp/tools/vector/__init__.py +7 -3
  65. hanzo_mcp/tools/vector/ast_analyzer.py +12 -4
  66. hanzo_mcp/tools/vector/infinity_store.py +11 -5
  67. hanzo_mcp/tools/vector/project_manager.py +4 -2
  68. hanzo_mcp-0.6.13.dist-info/METADATA +359 -0
  69. {hanzo_mcp-0.6.10.dist-info → hanzo_mcp-0.6.13.dist-info}/RECORD +73 -65
  70. {hanzo_mcp-0.6.10.dist-info → hanzo_mcp-0.6.13.dist-info}/entry_points.txt +1 -0
  71. hanzo_mcp/tools/common/palette.py +0 -344
  72. hanzo_mcp/tools/common/palette_loader.py +0 -108
  73. hanzo_mcp/tools/config/palette_tool.py +0 -179
  74. hanzo_mcp/tools/llm/llm_unified.py +0 -851
  75. hanzo_mcp-0.6.10.dist-info/METADATA +0 -339
  76. {hanzo_mcp-0.6.10.dist-info → hanzo_mcp-0.6.13.dist-info}/WHEEL +0 -0
  77. {hanzo_mcp-0.6.10.dist-info → hanzo_mcp-0.6.13.dist-info}/licenses/LICENSE +0 -0
  78. {hanzo_mcp-0.6.10.dist-info → hanzo_mcp-0.6.13.dist-info}/top_level.txt +0 -0
@@ -1,339 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: hanzo-mcp
3
- Version: 0.6.10
4
- Summary: The Zen of Hanzo MCP: One server to rule them all. The ultimate MCP that orchestrates all others.
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://mcp.hanzo.ai
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.9.4
18
- Requires-Dist: fastmcp>=2.9.2
19
- Requires-Dist: httpx>=0.28.1
20
- Requires-Dist: uvicorn>=0.34.0
21
- Requires-Dist: openai>=1.62.0
22
- Requires-Dist: python-dotenv>=1.0.1
23
- Requires-Dist: litellm>=1.73.2
24
- Requires-Dist: grep-ast>=0.8.1
25
- Requires-Dist: bashlex>=0.18
26
- Requires-Dist: libtmux>=0.39.0
27
- Requires-Dist: nbformat>=5.10.4
28
- Requires-Dist: psutil>=6.1.1
29
- Requires-Dist: pydantic>=2.11.1
30
- Requires-Dist: pydantic-settings>=2.7.0
31
- Requires-Dist: typing-extensions>=4.13.0
32
- Requires-Dist: watchdog>=6.0.0
33
- Provides-Extra: dev
34
- Requires-Dist: pytest>=7.0.0; extra == "dev"
35
- Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
36
- Requires-Dist: ruff>=0.1.0; extra == "dev"
37
- Requires-Dist: black>=23.3.0; extra == "dev"
38
- Requires-Dist: sphinx>=8.0.0; extra == "dev"
39
- Requires-Dist: sphinx-rtd-theme>=3.0.0; extra == "dev"
40
- Requires-Dist: myst-parser>=4.0.0; extra == "dev"
41
- Requires-Dist: sphinx-copybutton>=0.5.0; extra == "dev"
42
- Provides-Extra: docs
43
- Requires-Dist: sphinx>=8.0.0; extra == "docs"
44
- Requires-Dist: sphinx-rtd-theme>=3.0.0; extra == "docs"
45
- Requires-Dist: myst-parser>=4.0.0; extra == "docs"
46
- Requires-Dist: sphinx-copybutton>=0.5.0; extra == "docs"
47
- Provides-Extra: test
48
- Requires-Dist: pytest>=7.0.0; extra == "test"
49
- Requires-Dist: pytest-cov>=4.1.0; extra == "test"
50
- Requires-Dist: pytest-mock>=3.10.0; extra == "test"
51
- Requires-Dist: pytest-asyncio>=0.25.3; extra == "test"
52
- Requires-Dist: twisted; extra == "test"
53
- Provides-Extra: performance
54
- Requires-Dist: ujson>=5.7.0; extra == "performance"
55
- Requires-Dist: orjson>=3.9.0; extra == "performance"
56
- Provides-Extra: publish
57
- Requires-Dist: twine>=4.0.2; extra == "publish"
58
- Requires-Dist: build>=1.0.3; extra == "publish"
59
- Dynamic: license-file
60
-
61
- # Hanzo MCP - The Zen of Model Context Protocol
62
-
63
- [![Documentation](https://img.shields.io/badge/docs-mcp.hanzo.ai-blue?style=for-the-badge)](https://mcp.hanzo.ai)
64
- [![PyPI](https://img.shields.io/pypi/v/hanzo-mcp?style=for-the-badge)](https://pypi.org/project/hanzo-mcp/)
65
- [![License](https://img.shields.io/github/license/hanzoai/mcp?style=for-the-badge)](https://github.com/hanzoai/mcp/blob/main/LICENSE)
66
- [![Join our Discord](https://img.shields.io/discord/YOUR_DISCORD_ID?style=for-the-badge&logo=discord)](https://discord.gg/hanzoai)
67
-
68
- ## 🥷 One MCP to Rule Them All
69
-
70
- **Start here. Add other MCPs later. Control everything through one opinionated interface.**
71
-
72
- Hanzo MCP isn't just another Model Context Protocol server—it's **THE** MCP server. While others give you fragments, we give you the complete toolkit. One server that orchestrates all others, with the power to add, remove, and control any MCP server dynamically.
73
-
74
- ```bash
75
- # Install and rule your development world
76
- uvx hanzo-mcp
77
- ```
78
-
79
- > **Note on Deprecation Warnings**: If you see Pydantic deprecation warnings, clear your uvx cache with `rm -rf ~/.cache/uv/` and run again. This is due to litellm using old Pydantic v1 config style in cached environments.
80
-
81
- ## 🎯 Why Hanzo MCP?
82
-
83
- ### The Problem with Other MCPs
84
- - **Fragmented Experience**: Install 10 different MCPs for 10 different tasks
85
- - **Inconsistent Interfaces**: Each MCP has its own conventions and quirks
86
- - **Limited Scope**: Most MCPs do one thing, leaving you to juggle multiple servers
87
- - **No Orchestration**: No way to coordinate between different MCP servers
88
-
89
- ### The Hanzo Way
90
- - **One Installation**: 65+ professional tools out of the box
91
- - **Unified Philosophy**: Consistent, opinionated interface following Unix principles
92
- - **MCP Orchestration**: Install and control other MCP servers through Hanzo
93
- - **Swappable Opinions**: Don't like our way? Load a different palette and change everything
94
-
95
- ## 🚀 Features That Set Us Apart
96
-
97
- ### 🎨 Palette System - Opinions Are Just Configurations
98
- ```python
99
- # Don't like our shell tools? Swap the palette
100
- palette_load(palette="minimal") # Just the essentials
101
- palette_load(palette="pentesting") # Security focused tools
102
- palette_load(palette="data-science") # Jupyter, pandas, numpy focused
103
- palette_load(palette="your-custom") # Your tools, your way
104
- ```
105
-
106
- ### 🔌 MCP Server Orchestration
107
- ```python
108
- # Add any MCP server dynamically
109
- mcp_add(url="github.com/someone/their-mcp", alias="their")
110
-
111
- # Use their tools through our unified interface
112
- their_tool(action="whatever", params=...)
113
-
114
- # Remove when done
115
- mcp_remove(alias="their")
116
- ```
117
-
118
- ### 🛠️ 65+ Battle-Tested Tools
119
-
120
- #### Intelligent Multi-Modal Search
121
- - **search**: Combines grep, AST analysis, vector embeddings, and git history
122
- - **symbols**: Find any code symbol across languages instantly
123
- - **git_search**: Search through git history, branches, and commits
124
-
125
- #### Advanced Development
126
- - **agent**: Delegate complex tasks to specialized AI agents
127
- - **llm**: Query multiple LLM providers with consensus
128
- - **jupyter**: Full Jupyter notebook support
129
- - **neovim**: Integrated Neovim for power users
130
-
131
- #### File Operations That Just Work
132
- - **edit/multi_edit**: Intelligent pattern-based editing
133
- - **read/write**: Automatic encoding detection
134
- - **tree**: Visual directory structures
135
- - **watch**: Monitor file changes in real-time
136
-
137
- #### Process & System Control
138
- - **run_command**: Secure command execution with timeout
139
- - **processes**: Monitor and manage system processes
140
- - **npx/uvx**: Package runners with background support
141
-
142
- #### And So Much More
143
- - Database tools (SQL, Graph)
144
- - Vector search and indexing
145
- - Todo management
146
- - Configuration management
147
- - MCP server management
148
- - Statistical analysis
149
- - Batch operations
150
-
151
- ## 🎯 The Zen of Hanzo
152
-
153
- 1. **One Tool, One Purpose** - Each tool does one thing exceptionally well
154
- 2. **Actions Over Tools** - Complex tools support multiple actions, not multiple interfaces
155
- 3. **Parallel by Default** - Run multiple operations concurrently
156
- 4. **Smart Fallbacks** - Automatically choose the best available backend
157
- 5. **Secure by Design** - Fine-grained permissions and audit trails
158
- 6. **Opinionated but Flexible** - Strong defaults with palette customization
159
-
160
- ## 🚀 Quick Start
161
-
162
- ### Installation
163
-
164
- ```bash
165
- # Install globally with uvx (recommended)
166
- uvx hanzo-mcp
167
-
168
- # Or install with pip
169
- pip install hanzo-mcp
170
-
171
- # Or install from source for development
172
- git clone https://github.com/hanzoai/mcp
173
- cd mcp
174
- make install
175
- ```
176
-
177
- ### Add to Claude Desktop
178
-
179
- ```bash
180
- # Automatic installation
181
- make install-desktop
182
-
183
- # Or manual configuration
184
- cat >> ~/Library/Application\ Support/Claude/claude_desktop_config.json << 'EOF'
185
- {
186
- "mcpServers": {
187
- "hanzo": {
188
- "command": "uvx",
189
- "args": ["hanzo-mcp"]
190
- }
191
- }
192
- }
193
- EOF
194
- ```
195
-
196
- ### Your First Session
197
-
198
- 1. Open Claude Desktop
199
- 2. Start with `search` to explore any codebase
200
- 3. Use `tree` to understand structure
201
- 4. Edit files with `edit` or `multi_edit`
202
- 5. Run commands with `run_command`
203
- 6. Add other MCP servers with `mcp_add`
204
-
205
- ## 🎨 Palette System
206
-
207
- Palettes let you completely transform Hanzo MCP's behavior:
208
-
209
- ```python
210
- # List available palettes
211
- palette_list()
212
-
213
- # Load a different personality
214
- palette_load(palette="minimal") # Just core tools
215
- palette_load(palette="academic") # Research and writing focused
216
- palette_load(palette="devops") # Infrastructure and deployment
217
-
218
- # Create your own
219
- palette_create(
220
- name="my-workflow",
221
- tools=["read", "write", "edit", "search", "my-custom-tool"],
222
- config={"editor": "vim", "search_backend": "ripgrep"}
223
- )
224
- ```
225
-
226
- ## 🔌 MCP Orchestration
227
-
228
- Hanzo MCP can manage other MCP servers:
229
-
230
- ```python
231
- # Add any MCP server
232
- mcp_add(url="github.com/modelcontextprotocol/servers/tree/main/postgres")
233
-
234
- # List installed servers
235
- mcp_stats()
236
-
237
- # Use tools from other servers seamlessly
238
- postgres_query(query="SELECT * FROM users")
239
-
240
- # Remove when done
241
- mcp_remove(alias="postgres")
242
- ```
243
-
244
- ## 📊 Advanced Features
245
-
246
- ### Intelligent Search
247
- ```python
248
- # Multi-modal search across your codebase
249
- results = search(
250
- query="authentication",
251
- include_git=True, # Search git history
252
- include_vector=True, # Semantic search
253
- include_ast=True, # AST symbol search
254
- parallel=True # Search all modes concurrently
255
- )
256
- ```
257
-
258
- ### Agent Orchestration
259
- ```python
260
- # Delegate complex tasks to specialized agents
261
- agent(
262
- task="Refactor this codebase to use async/await",
263
- files=["src/**/*.py"],
264
- instructions="Maintain backwards compatibility"
265
- )
266
- ```
267
-
268
- ### Consensus LLM Queries
269
- ```python
270
- # Query multiple LLMs and get consensus
271
- llm(
272
- action="consensus",
273
- prompt="Is this code secure?",
274
- providers=["openai", "anthropic", "google"],
275
- threshold=0.8
276
- )
277
- ```
278
-
279
- ## 🏗️ Architecture
280
-
281
- Built on modern Python with:
282
- - **FastMCP**: High-performance MCP framework
283
- - **UV**: Lightning-fast Python package management
284
- - **Parallel Execution**: Concurrent operations by default
285
- - **Smart Backends**: Automatic selection of best available tools
286
- - **Type Safety**: Full type hints and validation
287
-
288
- ## 🤝 Contributing
289
-
290
- We welcome contributions! The codebase is designed for extensibility:
291
-
292
- 1. **Add a Tool**: Drop a file in `hanzo_mcp/tools/`
293
- 2. **Create a Palette**: Define tool collections and configurations
294
- 3. **Improve Existing Tools**: Each tool is independently testable
295
-
296
- See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
297
-
298
- ## 📚 Documentation
299
-
300
- - **[Quick Start Guide](https://mcp.hanzo.ai/quickstart)** - Get running in 5 minutes
301
- - **[Tool Reference](https://mcp.hanzo.ai/tools)** - Detailed documentation for all 65+ tools
302
- - **[Palette System](https://mcp.hanzo.ai/palettes)** - Customize your experience
303
- - **[MCP Orchestration](https://mcp.hanzo.ai/orchestration)** - Control other MCP servers
304
- - **[Best Practices](https://mcp.hanzo.ai/best-practices)** - Tips from power users
305
-
306
- ## 🌟 Why Developers Choose Hanzo MCP
307
-
308
- > "I replaced 12 different MCP servers with just Hanzo. The palette system means I can switch contexts instantly—from web dev to data science to DevOps." - *Power User*
309
-
310
- > "The agent orchestration is incredible. I can delegate entire refactoring tasks and it just works." - *Sr. Engineer*
311
-
312
- > "Finally, an MCP that thinks like a developer. Smart defaults, great errors, and everything is parallel." - *Tech Lead*
313
-
314
- ## 📈 Stats
315
-
316
- - **65+** Professional Tools
317
- - **10x** Faster than installing multiple MCPs
318
- - **1** Unified interface to rule them all
319
- - **∞** Possibilities with the palette system
320
-
321
- ## 📄 License
322
-
323
- MIT - Use it, extend it, make it yours.
324
-
325
- ## 🔗 Links
326
-
327
- - [GitHub](https://github.com/hanzoai/mcp)
328
- - [Documentation](https://mcp.hanzo.ai)
329
- - [PyPI](https://pypi.org/project/hanzo-mcp/)
330
- - [Discord Community](https://discord.gg/hanzoai)
331
- - [Report Issues](https://github.com/hanzoai/mcp/issues)
332
-
333
- ---
334
-
335
- <p align="center">
336
- <b>The Zen of Hanzo MCP</b><br>
337
- <i>One server. All tools. Your way.</i><br><br>
338
- <code>uvx hanzo-mcp</code>
339
- </p>