PO

proofmath-owner/ai-filesystem-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

5 stars 5 forks Качество 70 Тренд 10MIT

Редактирование вашего ИИ-агента не атомарно. Этот MCP делает это так — атомные многофайловые изменения с откатом для Claude Code, Codex CLI, Cursor Agents.

Обзор

Одноинструментальный MCP-сервер для атомных многофайловых изменений с автоматическим откатом — построен для Claude Code, Codex CLI, Cursor и других современных кодирующих агентов. Эти агенты поставляются с отличными встроенными инструментами для чтения, письма, поиска, редактирования и оболочки. Они не поставляются с примитивным, потому что это единственное, что обеспечивает этот MCP. Транзакция — примените пакет файловых операций атомарно. Если операция 4 выходит из строя, операции 1-3 восстанавливаются из резервной копии до возврата вызова. Если все удается, резервные копии очищаются. Ранее версии 2.x отправляли 39 команд: файл I/O, поиск, git, анализ кода, shell, архивы, диффы, метаданные, шифрование, просмотрщик файлов. Современные кодирующие агенты уже делают все это лучше с помощью своих собственных инструментов Read / Edit / Write / Grep / Glob / Bash - обертывание тех, кто в MCP, только добавляет задержку и новую поверхность отказа. Редактирование агента не может рассматривать несколько изменений файла как одну единицу работы.

Обзор (машинный перевод)

Редактирование вашего агента ИИ не является атомным. MCP делает это так.

Одноинструментальный MCP-сервер для атомных многофайловых изменений с автоматическим управлением Rollback — создан для Claude Code, Codex CLI, Cursor Agents и других современных программ. Кодирующие агенты.

Эти агенты имеют отличные встроенные инструменты для чтения, письма, Поиск, редактирование и оболочка. Они не имеют примитивного для "применять эти N-файловые операции как одну транзакцию; если какая-либо из них не удается, Обратить все вспять. Это единственное, что может предложить MCP.

Инструмент

transaction — применять партию файловых операций атомарно.

Если операция 4 выходит из строя, операции 1-3 восстанавливаются из резервной копии перед вызовом. Возвращается. Если все удается, резервные копии очищаются.

Операции

[[Т1]] Требуемые поля Что он делает [править править код] [[Т2]] [[Т3]], [[Т4]] Создайте новый файл (создает родительские dirs). write``path, content | Перезапись существующего файла. [8][9], [10][10][11][11][11][11][11][11][11][11]][11][11][11][11]][11][11][11]]. [12][13], [14][14][15][16]]. ! delete path | Удалить файл или каталог (рекурсивный).

Почему один инструмент

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

ai-filesystem-mcp

Your AI agent’s Edit isn’t atomic. This MCP makes it so.

A single-tool MCP server for atomic multi-file changes with automatic rollback — built for Claude Code, Codex CLI, Cursor agents, and other modern coding agents.

Those agents ship with excellent built-in tools for reading, writing, searching, editing, and shell. They do not ship with a primitive for “apply these N file operations as one transaction; if any of them fail, revert everything.” That is the one and only thing this MCP provides.

The tool

transaction — apply a batch of file operations atomically.

{
  "name": "transaction",
  "arguments": {
    "operations": [
      { "type": "create", "path": "src/feature.ts",  "content": "..." },
      { "type": "write",  "path": "src/index.ts",    "content": "..." },
      { "type": "update", "path": "src/lib/util.ts",
        "updates": [{ "oldText": "foo()", "newText": "foo(arg)" }] },
      { "type": "move",   "path": "src/old.ts", "destination": "src/legacy/old.ts" },
      { "type": "delete", "path": "src/dead.ts" }
    ],
    "rollbackOnError": true
  }
}

If operation 4 fails, operations 1-3 are restored from backup before the call returns. If everything succeeds, backups are cleaned up.

Operation kinds

type Required fields What it does
create path, content Make a new file (creates parent dirs).
write path, content Overwrite an existing file.
update path, updates[] In-place String.replace(oldText, newText) for each update, in order.
move path, destination Rename path → destination.
delete path Remove a file or directory (recursive).

Why one tool

Earlier 2.x versions shipped 39 commands: file I/O, search, git, code analysis, shell, archives, diffs, metadata, encryption, file watcher. Modern coding agents already do all of that better with their own Read / Edit / Write / Grep / Glob / Bash tools — wrapping those in MCP only adds latency and a new failure surface.

What an agent’s Edit cannot do is treat several file changes as one unit of work. If op 4 of 5 fails, ops 1-3 are already on disk. Until the agent grows a real transaction primitive, that gap is filled externally — which is the entire job of this server.

When you actually need this

You probably don’t need it for a typical “fix this bug” turn. You do need it when a single logical change must touch several files together:

  • DB migration: schema file + matching ORM model + matching test fixtures must all land or all revert.
  • Cross-cutting rename / refactor that spans many files and would half-apply if the agent crashes or runs out of context mid-stream.
  • Generated-code updates where the generator output and the hand-edited glue must stay in sync.
  • Config + corresponding code change (e.g. routing table entry + handler), where the half state is broken.
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "ai-filesystem": { "command": "node", "args": ["/absolute/path/to/ai-filesystem-mcp/dist/index.js"] } } }