Files
mcp/rust/Cargo.toml
zeekay e9e6096ce4 feat(rust): fs search_text and code search_symbol on tgrep, in process
hanzo-trigram is the one search engine behind both actions: tgrep-core
(the hanzoai fork, MIT, pinned by commit, feature docs) linked as a
library, so a search is a call, not an rg spawn. It is its own crate so
Dev can link it without this crate's browser and parser dependencies;
hanzo_mcp::trigram re-exports it.

Results are ranked (matching lines a file, or definitions before uses
for a symbol), then path, then line, so a page is an offset into one
fixed list and the cursor really pages: before, rg stopped at limit and
a cursor repeated the first page. .gitignore, hidden and binary files
are skipped as rg skips them. A glob that names a document type (*.pdf,
*.docx, *.zip) reads documents too, and a hit inside one carries the
archive members and its page, slide, paragraph or cell.

fs and code keep their names, schemas and answer shapes; entry and place
appear on a document hit only. search_symbol now reads definitions by
the engine's declaration patterns, not the first-keyword guess.

Linking tgrep-core brings libsqlite3-sys (its managed-index code), which
needs a newer cc than the tree-sitter grammars allow, so Cargo resolves
tree-sitter-{c,cpp,javascript,python,rust,typescript} to their previous
patch releases. 241 library tests and the code tool's pass on them.
Gating managed/ behind a feature in the fork removes both.
2026-10-14 13:37:01 -07:00

106 lines
2.7 KiB
TOML

[workspace]
members = ["trigram"]
[package]
name = "hanzo-mcp"
version = "1.1.29"
repository = "https://github.com/hanzoai/mcp"
homepage = "https://hanzo.ai"
keywords = ["mcp", "ai", "tools", "hanzo", "llm"]
categories = ["development-tools", "command-line-utilities"]
edition = "2021"
authors = ["Hanzo AI"]
description = "Native MCP server for Hanzo AI Cloud and local development tools"
license = "MIT"
exclude = ["target/", "tests/", "benches/"]
[dependencies]
# Core
tokio = { version = "1", features = ["full"] }
async-trait = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
toml = "0.8"
sha2 = "0.10"
blake3 = "1.5"
# MCP Protocol
jsonrpc-core = "18.0"
jsonrpc-derive = "18.0"
jsonrpc-http-server = "18.0"
# Logging
log = "0.4"
env_logger = "0.10"
# Utils
anyhow = "1.0"
thiserror = "1.0"
dirs = "5.0"
clap = { version = "4.4", features = ["derive"] }
reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls"] }
walkdir = "2.4"
glob = "0.3"
regex = "1.10"
rayon = "1.8"
once_cell = "1.19"
base64 = "0.21"
shellexpand = "3.1"
chrono = { version = "0.4", features = ["serde"] }
tempfile = "3.10"
which = "6.0"
shell-escape = "0.1"
# The ZAP router every Hanzo process embeds (one per login, elected by lock),
# and this process's seat on it. crates.io has 1.1.2, which predates the
# unpaired door on 9998, so the tag is the pin.
zapd = "1.1.5"
# Search and AST
# The in-process text, symbol and document search over tgrep-core; light enough for
# Dev to link on its own, re-exported here as `hanzo_mcp::trigram`.
hanzo-trigram = { path = "trigram", version = "0.1.0" }
tree-sitter = "0.20"
tree-sitter-rust = "0.20"
tree-sitter-javascript = "0.20"
tree-sitter-typescript = "0.20"
tree-sitter-python = "0.20"
tree-sitter-go = "0.20"
tree-sitter-java = "0.20"
tree-sitter-cpp = "0.20"
tree-sitter-c = "0.20"
# Vector store (optional)
# lance = "0.10" # Temporarily disabled due to arrow version conflict
# arrow = "50.0" # Temporarily disabled due to build issues
# vectordb = { version = "0.1", optional = true }
[dev-dependencies]
[target.'cfg(unix)'.dependencies]
nix = { version = "0.29", features = ["signal", "process"] }
# Platform specific
[target.'cfg(target_os = "macos")'.dependencies]
cocoa = "0.25"
objc = "0.2"
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["winuser", "wingdi", "windef", "minwindef"] }
[target.'cfg(target_os = "linux")'.dependencies]
x11 = "2.21"
[features]
default = []
# all-tools = ["computer-control", "blockchain", "vector-store", "file-system", "web-search", "code-execution"]
[[bin]]
name = "hanzo-mcp"
path = "src/main.rs"
[lib]
name = "hanzo_mcp"
path = "src/lib.rs"
crate-type = ["lib", "cdylib", "staticlib"]