Files
python-sdk/pkg/hanzo-mcp/README.md
T
zeekay 02f2ec2014 hanzo-mcp: the README documents the server that exists
The quickstart called create_mcp_server, server.register_*_tools and
server.tools.read — no such names. The real surface is the hanzo-mcp
command, its flags, and HanzoMCPServer; the tools come from whichever
hanzo-tools-* packages are installed, through the hanzo.tools entry
point. Verified against --version, --help and the constructor.

Drop the three *_COMPLETE.md status reports, MODULAR_ARCHITECTURE.md
(a proposal), COMPREHENSIVE_DOCUMENTATION.md (claims 70+ tools over a
package with seven) and SEARCH_GUIDE.md (documents an ffind tool that
does not exist).

SECURITY_PATCH.md named files and lines for three findings in 0.8.13;
all three are addressed in 0.15.15 — the shell escaper it flagged is
gone with its module, permissions.py refuses .. and ~ before resolving,
and the third asked for a token the server minted, persisted to
~/.hanzo/mcp_token and never once checked. That token is gone too: auth
is IAM's, and a credential nothing verifies reads as a gate that is not
there.
2026-08-23 12:31:08 -07:00

2.8 KiB

hanzo-mcp

PyPI Python Version

A Model Context Protocol server. It gives an MCP client — Claude Desktop, an editor, an agent — filesystem, shell, search and agent tools over one connection.

Install

pip install hanzo-mcp

Run

hanzo-mcp                                   # stdio, the transport clients speak
hanzo-mcp --transport sse --host 127.0.0.1 --port 8888
hanzo-mcp --install                         # write the config into Claude Desktop

Point it at what it may touch, and nothing else:

hanzo-mcp --allow-path ~/work/project --project-dir ~/work/project

--allow-path may be repeated. Every filesystem tool refuses a path outside the set, and .. and ~ are refused before resolution.

Flags

flag what it does
--transport {stdio,sse} how the client connects; stdio by default
--allow-path PATH grant access to a path; repeatable
--project-dir DIR the project root, also granted
--enable-agent let the server delegate to sub-agents
--agent-model, --agent-api-key, --agent-base-url which model the agent tool calls
--disable-write-tools read-only: no write, edit or shell mutation
--disable-search-tools drop the search family
--command-timeout, --search-timeout, --find-timeout, --ast-timeout per-family limits, in seconds
--shell, --force-shell, --all-shells which shell the shell tools use
--log-level LEVEL server logging

hanzo-mcp --help prints the whole set; --version prints the build.

Tools

The server registers what the installed hanzo-tools-* packages provide — each one publishes a TOOLS list under the hanzo.tools entry point, and the server loads every package it finds. hanzo-tools-fs, hanzo-tools-shell and hanzo-tools-core come with this package; install another and its tools appear on the next start.

pip install hanzo-tools-git hanzo-tools-sql

In a client

Claude Desktop, claude_desktop_config.json — or hanzo-mcp --install, which writes it for you:

{
  "mcpServers": {
    "hanzo": {
      "command": "hanzo-mcp",
      "args": ["--allow-path", "/Users/you/work"]
    }
  }
}

Embedding it

from hanzo_mcp.server import HanzoMCPServer

server = HanzoMCPServer(name="hanzo", allowed_paths=["/Users/you/work"])
server.run(transport="stdio")

run blocks, and takes the transport. The rest of what the CLI accepts — allowed_paths, project_dir, enable_agent_tool, disable_write_tools, disable_search_tools, the timeouts — are constructor keywords.

Development

uv sync
uv run pytest tests/ -v

License

Apache-2.0.