Hanzo MCP server

Enables secure interaction with codebases through tools for file operations, command execution, project analysis, and Jupyter notebook management with path validation and operation allowlisting
Back to servers
Setup instructions
Provider
Hanzo
Release date
Mar 25, 2025
Language
Python
Package
Stats
10.2K downloads
8 stars

Hanzo MCP is a comprehensive Model Context Protocol server that provides a unified interface for accessing over 65 professional tools in one installation. Unlike other MCP servers that offer fragmented experiences, Hanzo MCP allows you to orchestrate multiple MCP servers through a single, consistent interface with customizable configurations through its palette system.

Installation Options

Using uvx (Recommended)

# Install globally with uvx
uvx hanzo-mcp

Alternative Installation Methods

# Install with pip
pip install hanzo-mcp

# Install from source
git clone https://github.com/hanzoai/mcp
cd mcp
make install

Note: If you encounter Pydantic deprecation warnings, clear your uvx cache with rm -rf ~/.cache/uv/ and run again.

Adding to Claude Desktop

Automatic Installation

make install-desktop

Manual Configuration

cat >> ~/Library/Application\ Support/Claude/claude_desktop_config.json << 'EOF'
{
  "mcpServers": {
    "hanzo": {
      "command": "uvx",
      "args": ["hanzo-mcp"]
    }
  }
}
EOF

Getting Started

  1. Open Claude Desktop
  2. Use search to explore any codebase
  3. Understand structure with tree
  4. Edit files using edit or multi_edit
  5. Execute commands with run_command
  6. Add other MCP servers via mcp_add

Using the Palette System

Customize Hanzo MCP's behavior and available tools with palettes:

# List available palettes
palette_list()

# Switch to a different palette
palette_load(palette="minimal")  # Just core tools
palette_load(palette="academic")  # Research and writing focused
palette_load(palette="devops")   # Infrastructure and deployment

# Create your own custom palette
palette_create(
    name="my-workflow",
    tools=["read", "write", "edit", "search", "my-custom-tool"],
    config={"editor": "vim", "search_backend": "ripgrep"}
)

Managing Other MCP Servers

Hanzo MCP can orchestrate other MCP servers:

# Add another MCP server
mcp_add(url="github.com/modelcontextprotocol/servers/tree/main/postgres")

# List installed servers
mcp_stats()

# Use tools from other servers
postgres_query(query="SELECT * FROM users")

# Remove an MCP server
mcp_remove(alias="postgres")

Advanced Features

Intelligent Search

# Multi-modal search across your codebase
results = search(
    query="authentication",
    include_git=True,      # Search git history
    include_vector=True,   # Semantic search
    include_ast=True,      # AST symbol search
    parallel=True          # Search all modes concurrently
)

Agent Orchestration

# Delegate complex tasks to specialized agents
agent(
    task="Refactor this codebase to use async/await",
    files=["src/**/*.py"],
    instructions="Maintain backwards compatibility"
)

Consensus LLM Queries

# Query multiple LLMs and get consensus
llm(
    action="consensus",
    prompt="Is this code secure?",
    providers=["openai", "anthropic", "google"],
    threshold=0.8
)

Key Tools

Search and Analysis

  • search: Combines grep, AST analysis, vector embeddings, and git history
  • symbols: Find code symbols across languages
  • git_search: Search through git history

Development Tools

  • agent: Delegate tasks to AI agents
  • llm: Query multiple LLM providers
  • jupyter: Jupyter notebook support
  • neovim: Integrated Neovim

File Operations

  • edit/multi_edit: Pattern-based editing
  • read/write: Automatic encoding detection
  • tree: Visual directory structures
  • watch: Monitor file changes

Process Management

  • run_command: Secure command execution
  • processes: Monitor system processes
  • npx/uvx: Package runners

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "hanzo" '{"command":"uvx","args":["hanzo-mcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "hanzo": {
            "command": "uvx",
            "args": [
                "hanzo-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "hanzo": {
            "command": "uvx",
            "args": [
                "hanzo-mcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later