This commit adds a comprehensive Sphinx documentation system to the project: - Created a new docs/ directory with Sphinx configuration - Added documentation pages for installation, quick start, IDE integration - Added security guide, debugging guide, and system prompt documentation - Included guides for useful prompts and commands - Set up the Read the Docs theme for better readability - Added .gitignore for build files This documentation system makes the project more accessible to new users and provides centralized, browsable documentation that can be built into HTML, PDF, or other formats as needed.
2.9 KiB
IDE Integration
This document explains how to use Hanzo MCP alongside an IDE or other external editor for an improved development workflow.
Using --disable-write-tools Flag
Hanzo MCP provides a --disable-write-tools flag that disables all file writing and editing tools, allowing you to use your preferred IDE or editor for making changes while still using MCP for analysis, search, and exploration.
What It Does
When the --disable-write-tools flag is enabled:
-
Disabled Tools:
write_file: Creating or overwriting filesedit_file: Making changes to existing filescontent_replace: Finding and replacing text across filesedit_notebook: Editing Jupyter notebook cells
-
Available Tools:
- All read-only filesystem tools (
read_files,directory_tree,get_file_info,search_content) - Read-only Jupyter tools (
read_notebook) - All shell tools (
run_command,run_script,script_tool) - Project analysis tools
- Thinking tool
- All read-only filesystem tools (
Note: Shell commands can still modify files even with this flag enabled. This is by design, as shell commands are necessary for many analysis operations.
Configuring with Claude Desktop
You can configure Claude Desktop to use Hanzo MCP with write tools disabled:
hanzo-mcp --install --disable-write-tools
This will install a configuration in Claude Desktop that launches Hanzo MCP with write tools disabled.
Command Line Usage
To start Hanzo MCP with write tools disabled:
hanzo-mcp --disable-write-tools
Recommended Workflow
-
Start Hanzo MCP with write tools disabled:
hanzo-mcp --disable-write-tools --project-dir /path/to/your/project -
Use Claude with Hanzo MCP for:
- Exploring and understanding code
- Searching for patterns and usages
- Analyzing project structure
- Planning changes
- Running commands or scripts
-
Use your IDE or editor for:
- Making changes to files
- Creating new files
- Editing and running Jupyter notebooks
- Refactoring code
This workflow combines the analytical strengths of Claude with the editing capabilities of your preferred development environment.
Benefits
- Better Editor Integration: Use your familiar IDE features like syntax highlighting, auto-completion, and debugging
- Version Control Integration: Use your IDE's Git integration for staging, committing, and reviewing changes
- Task Separation: Let Claude focus on analysis and exploration while your IDE handles editing
- Performance: Reduce the number of MCP tools being registered for faster startup and operation
Limitations
- Shell commands can still modify files, so be careful when running them through Claude
- You'll need to manually switch between Claude and your IDE when making changes
- Claude won't be able to see changes you've made in your IDE until you explicitly tell it to check the file again