SuperAPIAI Directory

TZeroAlgorithm

github.com · AI coding

T-Zero is an open-source, deterministic AST code context compression engine and MCP server for editors such as Cursor, Claude Code, Windsurf, Cline, Zed, and VS Code. It reduces the code context passed to LLMs by keeping target files intact and compressing surrounding dependencies. It officially claims an 85–95% reduction in prompt tokens and provides zero-leak security scanning, 21 canonical MCP tools (58 runtime tools), 180-layer Anti-REA protection, real BPE benchmarks, and preflight Reality-Lock features. The project is completely free and open source, supports local operation, and optional network features require explicit user configuration.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

T-Zero is an open-source, deterministic AST context compression engine and Model Context Protocol (MCP) server for AI coding assistants, primarily serving editors such as Cursor, Claude Code, Google Antigravity IDE, Windsurf, Cline, Zed, and VS Code. Its core approach is to keep target files intact while compressing surrounding dependencies into summaries when providing code context to LLMs, thereby reducing prompt token consumption. It officially claims an 85–95% reduction in prompt tokens and emphasizes 100% zero-leak security.

Main capabilities include: deterministic AST context compression; 21 canonical MCP tools (58 total at runtime); Shannon entropy key scanning; BM25 lexical search; 180-layer Anti-REA sovereignty protection (requires explicit invocation); preflight Reality-Lock static AST validation; Turbo Overdrive burst acceleration (adaptive latency detection, up to 32-thread parallelism, sub-millisecond in-memory caching); autonomous dynamic sub-agent decomposition and PBFT consensus execution summaries; and TDQS tool documentation quality scoring.

Usage: The project supports one-click editor configuration via the MCP standard, and also provides manual configuration snippets and a uvx zero-install method. Local analysis (AST pruning, key scanning, BM25 search) runs completely offline; optional AI-assisted generation, package and tokenizer downloads, DuckDuckGo web search, public project metrics, and hosted demos may use the network, and only send to user-configured or explicitly selected providers. System repair and Anti-REA hardening tools run only when explicitly invoked.

Applicable scenarios: reducing code context token consumption in AI coding environments such as Cursor and Claude Code; performing local security scanning and architectural boundary checks on codebases; providing MCP tool support for local LLMs; optimizing prompts in development workflows that need to control API costs.

Limitations and notes: Official benchmarks show that full-repository snapshot scanning can reduce context tokens by 94.5%, but actual requests usually use only a subset of files, and assistants may have already selected context themselves, so this figure does not represent per-request savings, cost savings, or task accuracy. In autonomous pytest diagnostic tests, when the model could freely choose, it stillpreferred the built-in read_file over T-Zero's MCP search tools. When tasks depend on internal function behavior, full source code should be retained. GitHub previously flagged the npm package tzero-mcp@12.3.0 with a security advisory (GHSA-pm3r-rxg9-cj5j), and there is no patched version. Git hooks are optional to install, and installation and normal startup do not change core.hooksPath. Some features (such as AI-assisted generation, web search, and hosted demos) require network and corresponding configuration.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools