MCP编辑器
一个 TypeScript MCP 服务器端口,移植了 Anthropic 的文件系统编辑工具,允许通过客户端批准的操作进行文件操作,避免自动写入以防止系统受损。
可用工具 (5 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
view 2 个参数 需填 1 项
View file contents or directory listing
必填参数:path
create 2 个参数 需填 2 项
Create a new file with specified content
必填参数:path、file_text
string_replace 3 个参数 需填 2 项
Replace a string in a file with a new string
必填参数:path、old_str
insert 3 个参数 需填 3 项
Insert text at a specific line in the file
必填参数:path、insert_line、new_str
undo_edit 1 个参数 需填 1 项
Undo the last edit to a file
必填参数:path
服务介绍
mcp-editor
这是从Anthropic的文件系统编辑工具在他们的计算机使用演示中直接移植到TypeScript MCP服务器上的版本。它主要由Claude Sonnet 3.5在Roo Cline(现在是Roo Code)上编写,可能没有足够的直接监督。我检查了代码并每天都在使用这个服务器,但可能存在错误或AI的奇怪行为。
我建议将此服务器与mcp-server-commands一起使用。
警告:此MCP服务器没有任何访问控制,并完全依赖于您的客户端审批机制。使用风险自负。请勿自动批准写操作,这样做基本上等于授予LLM摧毁您计算机的权限。
警告:此MCP服务器未被积极维护,仅作为参考提供(例如创建具有适当访问控制的自己的MCP服务器)。我可能会偶尔更新它。
使用方法
获取您计算机上的文件。
运行:
npm install
npm build
如果您正在使用Claude桌面应用程序,请将以下内容粘贴到配置中的“mcpServers”下,并根据您放置mcp-editor的位置编辑路径:
{
"mcpServers":
... your existing servers ...
"mcp-editor": {
"command": "node",
"args": ["/absolute/path/to/mcp-editor/dist/server.js"]
}
}
}
如果您正在使用MCP Installer,只需向您的LLM提供磁盘上mcp-editor的路径即可。