
Mcp Multi Edit
io.github.eaisdevelopment由 GitHub 账号 eaisdevelopment 发布v0.2.7更新于 Oct 24, 2026
Atomic multi-file find-and-replace by Essential AI Solutions (essentialai.uk)
概览
一个本地 MCP 服务器,让助手在单次原子调用中,对一个或多个文件批量执行多处查找替换编辑。
- 可以做什么
- 在单个文件上按顺序原子地执行多处查找替换,支持全部替换、试运行预览,并默认生成 .bak 备份。跨多个文件协调编辑,任一文件失败时自动回滚所有已修改的文件。提交前可用试运行预览具体改动,并在查找文本匹配多处时收到结构化错误码、恢复提示和冲突警告。
- 适用场景
- 适合重命名变量、迁移日志调用或跨多个文件重构等场景,此时内置的单次编辑工具需要大量单独调用。它能减少批量编辑的工具调用次数和上下文 token 消耗。
- 运行要求
- 通过 npx 从 npm 包 @essentialai/mcp-multi-edit 以 stdio 在本地运行。需要 Node.js 20 或更高版本,以及 Claude Code 或 Claude Desktop。未声明认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Multi Edit,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Multi Edit MCP Server
[npm version] [license] [tests] [coverage]
An MCP server that gives Claude the ability to perform multiple find-and-replace operations in a single tool call with guaranteed atomicity -- all edits succeed or none apply.
Built by Essential AI Solutions for Claude Code and Claude Desktop.
Why Multi Edit?
Claude's built-in Edit tool handles one find-and-replace per call. When renaming a variable across a file or refactoring multiple files, that means dozens of individual tool calls -- each consuming context tokens and adding latency.
Multi Edit batches them into a single call:
Benchmarks run on realistic scenarios (bulk rename, logging migration, cross-file refactor). See benchmarks/results/BENCHMARK-REPORT.md for full details.
Quick Start
Claude Code
Add .mcp.json to your project root:
Restart Claude Code. Then add the included CLAUDE.md to your project root so Claude automatically prefers multi_edit over the built-in Edit tool:
That's it -- Claude will now use multi_edit whenever it's the right tool for the job.
Display name: Claude Code uses the key name in
mcpServersas the server's display name. You can change the key to any name you prefer.
Alternative: One-liner via CLI:
Note: The CLI only accepts simple names (letters, numbers, hyphens, underscores). For the full branded display name, use the
.mcp.jsonapproach above.
Claude Desktop
Add to your config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Restart Claude Desktop.
Full installation guide: docs/installation.md
Tools
multi_edit -- Single file, multiple edits
Batch multiple find-and-replace operations on one file. Edits apply sequentially and atomically.
multi_edit_files -- Multiple files, one atomic operation
Coordinate edits across multiple files. If any file fails, all files are rolled back automatically.
Full usage guide with examples: docs/usage.md
Features
- Atomic operations -- all edits succeed or none apply, no partial state
- Multi-file rollback -- if any file fails, all previously changed files are restored
- Dry-run preview -- see exactly what would change before committing
- Automatic backups --
.bakfiles created before every edit (disable withbackup: false) - Structured errors -- machine-readable error codes with recovery hints for automatic retry
- Conflict detection -- warns when
old_stringmatches multiple locations - Path validation -- absolute path enforcement, symlink resolution, existence checks
Error Codes
When retryable is true, Claude reads the recovery_hints in the response, adjusts the input, and retries automatically.
Troubleshooting guide: docs/troubleshooting.md
Requirements
- Node.js 20 or later
- Claude Code or Claude Desktop
Development
Project Structure
Documentation
License
PolyForm Noncommercial License 1.0.0
Free for personal and non-commercial use. For commercial licensing, contact [email protected].
Built by Essential AI Solutions
来源:README.md,提交 53fb3e7
工具
0版本历史
1- v0.2.7最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。