# Patch-DIFF MCP server

> Provides a transactional, PostgreSQL-backed document editing runtime for AI agents to perform atomic and auditable code modifications.

- Repository: https://github.com/paragon-ux/Patch-DIFF
- Page: https://hostedmcp.org/servers/paragon-ux/patch-diff
- Transport: —
- Stars: 0
- License: MIT

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `PATCHDIFF_DATABASE_URL` | no | no |  |
| `PATCHDIFF_MCP_PROFILE` | no | no |  |
| `PATCHDIFF_WAYMARK_MODE` | no | no |  |
| `PATCHDIFF_WORKSPACE_ROOT` | no | no |  |
| `PATCHDIFF_WORKSPACE_SYNC_ON_SAVE` | no | no |  |

## FAQ

### What makes PatchDIFF different from native Git editing?

Unlike native Git which lacks transactional guarantees and can leave partial modifications on disk, PatchDIFF provides atomic, all-or-nothing commits and optimistic concurrency control.

### How does PatchDIFF ensure editing accuracy?

It uses exact matching where every edit must match a unique substring or a strictly guarded code-point span; if the target shifts by even one character, the operation fails.

### Does PatchDIFF support structural code editing?

Yes, through its structural profiles, it uses AST (Abstract Syntax Tree) indexing to locate target scopes directly, reducing the need for iterative chunk reads.

### What operating systems are supported?

The default observed_workspace profile requires a POSIX environment such as Linux, WSL2 on Windows, macOS, or Docker.
