Fast, bounded, read-only Git evidence for local AI coding agents.
io.github.sergii-ziborov/weavatrix-git — MCP Server
The MCP server provides fast, bounded, read-only Git evidence intended for local AI coding agents. It focuses on Git repository analysis without external dependencies, exposing Git-related information derived from repository state for downstream tooling.
🛠️ Key Features
Fast Git evidence extraction
Bounded processing
Read-only access model
Zero-dependencies design
🚀 Use Cases
Local AI coding agents that need Git evidence
Repository-oriented static analysis
⚡ Developer Benefits
Supports workflows centered on git repository data
Fits environments seeking rust-based and zero-dependency tooling
Aligns with static-analysis use cases
⚠️ Limitations
Read-only: does not modify Git state
Uses bounded behavior, which may restrict scope compared to unbounded history operations
weavatrix-git gives AI coding agents fast, bounded, read-only Git evidence.
Install it from npm as a native MCP server or embed its dependency-free Rust
core. Both paths parse repository storage directly: no git subprocess, C
library, hooks, filters, network access, checkout, or mutation.
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.
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.
paginated added/deleted/modified/type-changed paths with old/new object IDs
git_status
tracked index and worktree state; untracked files are intentionally excluded
git_snapshot
canonical immutable path, mode, kind, and object-ID manifest for a revision
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.
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.
All public reads are in-process. Library code contains no subprocess fallback.
Unsupported data returns a typed error rather than an approximate answer.
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:
Layer
Responsibility
model
object IDs, typed Git objects, errors, and validation contracts
storage
loose/pack/MIDX/commit-graph decoding, bounded inflate and caches
repository
refs, history, diffs, status, snapshots, trees, and revwalks
workspace
deterministic multi-repository queries and correlation
mcp
optional read-only protocol adapter over the library
facade / CLI
stable Rust exports and diagnostic command entry points
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:
Exact-parity operation
weavatrix-git p50
git.exe p50
6,000-object bitmap reachability
0.431 ms
72.656 ms
one-entry index read
0.033 ms
60.758 ms
clean tracked status
0.186 ms
72.735 ms
cached commit lookup
0.001 ms
65.267 ms
1,000-commit history, reused repository
0.086 ms
66.961 ms
Direct in-process comparison on the same packed 2,000-commit fixture:
Exact-parity operation
Weavatrix p50
gix 0.86 p50
git2 0.21 p50
1,000-commit history, warm
0.355 ms
0.884 ms
1.552 ms
1,000-commit history, reopen
2.521 ms
3.940 ms
10.483 ms
1,000 cached object reads
0.082 ms
0.068 ms
5.640 ms
history plus 1,000 raw objects
0.494 ms
0.992 ms
1.375 ms
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
Capability
weavatrix-git
Git CLI
gix
libgit2
In-process
yes
no
yes
yes
Pure safe Rust
yes
no
yes
no, C core
Crate dependencies
zero
n/a
many modular crates
native library
Object/delta caches
yes
yes
yes
yes
MIDX and reachability bitmap reads
yes
yes
yes
yes
Split commit-graph and path Bloom reads
yes
yes
yes
commit-graph
Custom read-only ODB
yes
n/a
store abstractions
yes
Lazy revwalk, reflog, index, tracked status
yes
yes
yes
yes
First-class cross-repository evidence queries
yes
application code
application code
application code
Canonical immutable commit manifest
yes
application code
traversal API
tree walk API
Network and mutation
no
yes
yes
yes
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.