MCP Catalogs
Home

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.

developer-toolsai-llmfile-system
4
Forks
1
Open issues
1 mo ago
Last commit
2d ago
Indexed

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:

you:Reducing token usage when working with large source code files by reading only necessary line ranges
you:Preventing silent corruption of code when AI agents edit files that have changed concurrently
you:Improving efficiency in multi-file editing sessions by batching edits and reducing context window overhead
you:What platforms does trueline-mcp support?
you:How does trueline-mcp prevent silent corruption of files?

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 README
  • trueline_outline

    Returns an AST-based structural outline of any file showing functions, classes, declarations, and their line ranges.

  • trueline_read

    Reads specific line ranges from files to minimize token usage.

  • trueline_search

    Finds lines by literal string or regex and returns them with edit-ready references.

  • trueline_edit

    Performs compact and verified edits using line-range references and content hashes instead of echoing back entire blocks.

  • trueline_changes

    Provides an AST-based summary of structural changes compared to a git ref.

  • trueline_verify

    Checks whether held content references are still valid without re-reading the file.

Comparable tools

vscode-hashline-edit-tool

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.

Compare trueline-mcp with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.