# Patchloom [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/patchloom/patchloom  
**GitHub Stars:** 21  
**npm Downloads (last month):** 1798  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/patchloom

## Description
AI agent file editing via MCP: JSON/YAML/TOML, AST renames, markdown, batch.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "patchloom": {
    "command": "npx",
    "args": ["-y","patchloom"]
  }
}
```

## Documentation

## What Patchloom does

Patchloom gives AI coding agents an MCP tool layer for modifying files with structure-aware operations. Its `doc` commands target values in JSON, YAML, and TOML by selector path instead of relying on regular expressions. The parser-backed workflow writes valid structured output and preserves comments and formatting, including during array changes.

Markdown operations work by document structure: agents can address sections, tables, and bullet lists through headings. Code-oriented operations use abstract syntax trees to list, rename, replace, and analyze symbols across 20 programming languages. Plain file operations are also available for actions such as replacement and file creation.

Patchloom is intended to complement a coding agent rather than replace its complete editing loop. It is particularly suited to configuration updates, coordinated changes across several files, and edits where preserving syntax or comments matters.

## How it works

The executable can run as an MCP server with `patchloom mcp-server`, exposing its operations as structured tool calls. Agents can also use the command-line interface directly. A batch input can contain multiple operations, allowing several file changes to travel through one tool call. The `tx` workflow groups operations and can roll them back when a later format or validation step fails.

Operations support previewing before changes are applied through dry-run behavior. Applying a change requires the relevant `--apply` option in the command examples. For command-line use, an optional containment mode rejects parent-directory escapes and absolute paths outside the selected working directory. MCP containment is enabled by default, while CLI containment is optional.

The same binary and command behavior are intended for Linux, macOS, and Windows, with no dependency on utilities such as `sed`, `jq`, or `grep`.

## Setup and configuration

Install the Patchloom binary and start its MCP entry point with `patchloom mcp-server`. The executable is distributed as a single binary for multiple operating systems. A working directory can be supplied with `--cwd`; CLI containment can then be enabled with `--contain` to restrict reads and writes to that workspace.

Patchloom can also be embedded by Rust applications. The MCP usage model is aimed at coding agents such as Claude Code, Codex, and Cursor, which call Patchloom as their file-editing tool layer.

## Tools and capabilities

- Edit JSON, YAML, and TOML values by selector while retaining comments and formatting.
- Append structured values, including array elements, without treating the file as unstructured text.
- Modify Markdown sections, tables, and bullets using headings rather than line numbers.
- List, rename, replace, and analyze code symbols through AST operations across 20 languages.
- Search and replace text, create files, and combine heterogeneous operations in a batch.
- Use transactions with strict rollback when formatting or validation fails.
- Preview changes before applying them and return stable `error_kind` values for host handling.

## Limitations and notes

Patchloom is not a general replacement for native filesystem tools. Native file reads are preferable for reading one file, and native search or replacement tools may be quicker for simple single-file text tasks. Its main advantages apply to structured edits, comment preservation, multi-file batches, and syntax-aware code changes.

Batching reduces agent round-trips, but it does not make every individual operation faster than a native command. The MCP and CLI modes share the same binary, while path containment behaves differently: it is always active for MCP and must be requested for CLI use.

_Full upstream README: https://allmcps.com/mcp/patchloom/readme_

