
Weavatrix Git
io.github.sergii-ziborov由 GitHub 账号 sergii-ziborov 发布v0.3.1更新于 Oct 24, 2026
Fast, bounded, read-only Git evidence for local AI coding agents.
概览
一个本地只读 MCP 服务器,让 AI 编程助手从代码仓库获取有界的 Git 证据,不调用 git 命令,也不修改任何内容。
- 可以做什么
- 查看仓库标识与 HEAD:符号 HEAD、精确目标对象 ID、哈希类型和 pack 数量,以及工作区安全状态与未跟踪、被忽略文件计数。读取历史:分页的提交 ID、树、父提交、签名、时间戳和摘要。比较版本:分页列出新增、删除、修改和类型变更的路径及新旧对象 ID。获取不可变快照:某个版本的规范路径、模式、类型和对象 ID 清单。所有列表工具都返回下一页游标、精确对象 ID 和截断标志,非 UTF-8 路径以精确字节保留。
- 适用场景
- 当助手需要基于本地 Git 仓库的历史、差异、状态或文件清单进行推理,并希望得到确定性的只读证据而不是调用 git 命令时使用。适合审计和代码审查类工作流,这类场景更看重有界且精确的答案,而非完整的 Git 客户端功能。
- 运行要求
- 作为本地 stdio 进程运行,通过 npx 从 npm 包启动(Node.js 负责选择并启动适用于 Windows x64、Linux x64/ARM64 或 macOS x64/ARM64 的内置原生二进制);也可用带 mcp 特性的 Cargo 安装。必须以绝对路径参数传入目标仓库路径。未声明任何账号、API 密钥或环境变量,也不使用网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 Weavatrix Git,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Weavatrix Git
[CI] [crates.io] [npm] [docs.rs] [MIT]
Part of the Weavatrix ecosystem: bounded Git evidence for AI software agents.
weavatrix-git gives AI coding agents fast, bounded, read-only Git evidence.
The Rust crate, CLI, MCP server, and npm package are the same contract:
parse repository storage directly. No git subprocess, C library, hooks,
filters, network access, checkout, or mutation. There is no write API in any
surface.
On the checked-in exact-parity benchmark, 1,000 warm history entries took
0.355 ms with Weavatrix, 0.884 ms with gix, and 1.552 ms with
libgit2. Across eight repositories, Weavatrix won all five measured p50
contracts. These are engine measurements from release builds; the MCP
transport is deliberately not hidden inside the claim.
Run the MCP server
No Rust toolchain is required:
Generic stdio client configuration:
The npm package contains verified native binaries for Windows x64, Linux x64 and ARM64, and macOS x64 and ARM64. Node only selects and launches the matching binary; repository parsing and MCP handling stay in safe Rust.
Tools for agents
Every list tool returns nextCursor, exact object IDs, and a truncated flag.
Non-UTF-8 paths retain their exact bytes in pathHex; display text is never
silently presented as exact evidence.
Runtime limits
The MCP binary uses mcport's controlled,
Tokio-free runtime:
- 256 KiB maximum request and 1 MiB maximum response;
- four in-flight handlers and bounded request/output queues;
- 30-second handler deadline with cooperative cancellation checks;
- panic isolation and atomic response-overflow errors;
- bounded Git object, history, tree, bitmap, reflog, and index reads;
- optional progress notifications and configurable response batching.
Defaults are suitable for interactive stdio. --help exposes overrides for
byte budgets, concurrency, queues, deadline, and batch size. The server writes
only newline-delimited UTF-8 JSON-RPC to stdout; diagnostics go to stderr.
Native Cargo installation is also available:
Why a separate crate?
A scanner discovers files. A code graph models relationships. This crate owns version-control evidence. Keeping that boundary independent lets any Rust application reuse Git intelligence without importing a larger product.
Supported contract
All public reads are in-process. Library code contains no subprocess fallback. Unsupported data returns a typed error rather than an approximate answer.
Rust library
Custom stores use the same object contract:
For cross-repository analysis, RepositorySet keeps object stores isolated and
returns deterministic serial or parallel results:
The diagnostic CLI uses the library:
Architecture
Limits bounds object bytes, cache bytes, delta/ref/tree depth, tree and index
entries, reflog/history length, parent count, and bitmap expansion. The crate
forbids unsafe Rust. The default library feature set remains dependency-free;
only the separate mcp feature adds mcport.
The source tree follows explicit modular boundaries:
The checked-in strict architecture contract rejects files over 300 physical
lines, functions over 100 physical lines, runtime cycles, mixed foo.rs plus
foo/ module ownership, and any dependency from the protocol-independent
library into the optional MCP adapter. It has no baseline or exceptions.
Correctness
The suite creates real Git repositories and verifies:
- loose and aggressively packed OFS/REF delta objects;
- SHA-1 and SHA-256 repositories;
- bare and linked-worktree layouts;
- classic MIDX lookup;
- multi-layer split commit-graphs and changed-path Bloom answers;
- pack and MIDX bitmap reachability against
git rev-list --objects; - index v2 and v4, reflog order, revwalk hide/reset, and tracked status;
- deterministic parallel and cross-repository results;
- immutable revision snapshots, merged timelines, and batch change sets;
- hostile format and configured-limit failures.
Current core line coverage is 85.27%. CI runs Rust 1.88 on Linux, Windows, and macOS, Clippy with warnings denied, coverage, audit, docs, and package verification.
Performance
Release measurements on Windows, 2026-07-27. Every row materializes the result and proves exact identifier, path, object-byte, or status parity before timing:
Direct in-process comparison on the same packed 2,000-commit fixture:
On a separate 10,000-path index, warm reads measured 1.160/1.100/1.489 ms respectively; reopen measured 5.225/7.745/11.251 ms. The benchmark rotates engine order and proves exact history IDs, raw object bytes, and canonical index paths before timing. See BENCHMARKS.md.
On eight independent repositories with 8,000 selected commits, Weavatrix
measured 5.667 ms serial history, 4.080 ms parallel history, 11.810 ms reopen,
4.148 ms shared-commit correlation, and 1.736 ms immutable manifests. It won
all five p50 contracts against gix and libgit2; exact per-repository
history order, shared locations, paths, and object IDs were proven first.
Position among alternatives
The deliberate remaining exclusions are pack index v1, reftable, incremental MIDX chains, split/sparse index extensions, shallow and replace-object semantics, revision-expression grammar, untracked/ignore/filter-aware status, submodule worktree status, network operations, and mutation.
Use Git, gix, or libgit2 for a complete client. Use this crate when bounded
local evidence, a small audit surface, deterministic reads, and zero
dependencies matter.
License
MIT
来源:README.md,提交 0be1ebc
工具
0版本历史
1- v0.3.1最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分

