# Patchloom MCP server

> Enables AI agents to perform safe, structured edits on JSON, YAML, TOML, Markdown, and code using AST-aware operations and atomic batching.

- Repository: https://github.com/patchloom/patchloom
- Page: https://hostedmcp.org/servers/patchloom/patchloom
- Transport: stdio
- Stars: 20
- License: MIT
- Latest version: 0.37.7

## Install

### Claude Code

```sh
claude mcp add patchloom -- npx -y patchloom
```

### Cursor (`~/.cursor/mcp.json`)

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

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "patchloom": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "patchloom"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"patchloom","type":"stdio","command":"npx","args":["-y","patchloom"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

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

### Codex

```sh
codex mcp add patchloom -- npx -y patchloom
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.patchloom]
command = "npx"
args = ["-y", "patchloom"]
```

### Gemini CLI

```sh
gemini mcp add -s user patchloom npx -- -y patchloom
```

### Gemini settings.json (`~/.gemini/settings.json`)

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

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `PATCHLOOM_MCP_SURFACE` | no | no |  |

## Tools (6)

- `batch`
- `doc`
- `ast`
- `patch`
- `tidy`
- `mcp-server`

## FAQ

### Is Patchloom a generic filesystem MCP?

No, unlike default filesystem MCPs that read and write files as text, Patchloom provides parser-backed edits, AST operations, and batching.

### How does Patchloom prevent syntax corruption?

It uses parser-backed commands to change values by selector paths, ensuring valid output while preserving comments and formatting.

### Can Patchloom perform multiple edits at once?

Yes, it uses batch and tx commands to combine multiple file operations into a single tool call with atomic rollback capabilities.

### Does it work on Windows?

Yes, it is a single static binary that works identically on Linux, macOS, and Windows without requiring tools like sed or jq.
