trueline-mcp
by rjkaes·★ 17·Score 43
An MCP plugin that provides hash-verified file editing and targeted reads for AI coding agents to reduce token usage and prevent silent corruption.
Overview
trueline-mcp is a Model Context Protocol server designed to optimize how AI coding agents interact with files. It provides six MCP tools that enable targeted reading (fetching only needed line ranges), compact editing (using content hashes instead of echoing back old text), and semantic change review (AST-based summaries). The server intercepts built-in edit calls, redirecting large file reads to its efficient tools and blocking unverified edits to prevent silent corruption when files change unexpectedly.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose trueline-mcp when working with AI coding agents on large codebases where reducing token usage and preventing silent file corruption are priorities.
When NOT to choose this
Don't choose trueline-mcp if you primarily work with small files under 3KB where the built-in tools are sufficient, or if your AI platform doesn't support MCP hooks.
Tools this server exposes
6 tools extracted from the READMEtrueline_outlineReturns an AST-based structural outline of any file showing functions, classes, declarations, and their line ranges.
trueline_readReads specific line ranges from files to minimize token usage.
trueline_searchFinds lines by literal string or regex and returns them with edit-ready references.
trueline_editPerforms compact and verified edits using line-range references and content hashes instead of echoing back entire blocks.
trueline_changesProvides an AST-based summary of structural changes compared to a git ref.
trueline_verifyChecks whether held content references are still valid without re-reading the file.
Comparable tools
Installation
Installation
**Claude Code (recommended; hooks are automatic):**
/plugin marketplace add rjkaes/trueline-mcp
/plugin install trueline-mcp@trueline-mcp**Other platforms (Gemini CLI, VS Code Copilot, OpenCode, Codex CLI):** See [INSTALL.md](https://github.com/rjkaes/trueline-mcp/blob/main/INSTALL.md) for platform-specific setup.
**CLI (no MCP):** For agents that use shell commands instead of MCP, install globally with npm i -g trueline-mcp and add configs/cli/instructions.md to your agent's system prompt.
FAQ
- What platforms does trueline-mcp support?
- It supports Claude Code, Gemini CLI, VS Code Copilot, OpenCode, and Codex CLI, with different levels of functionality based on platform capabilities.
- How does trueline-mcp prevent silent corruption of files?
- It uses content hash verification - every read operation includes hash values, and edits must present these hashes back. If the file has changed since it was read or if the agent hallucinates content, the edit is rejected.
On Hacker News
Recent discussion from the developer community.
- Story by rjkaes · 2026-03-05
Compare trueline-mcp with
Last updated · Auto-generated from public README + GitHub signals.