mcp editor
A TypeScript MCP server port of Anthropic's filesystem editing tools, allowing file manipulation via client-approved operations without automated writes to prevent system harm.
A TypeScript MCP server port of Anthropic's filesystem editing tools, allowing file manipulation via client-approved operations without automated writes to prevent system harm.
This is a direct port of Anthropic's filesystem editing tools from their computer use demos to a TypeScript MCP server. It was written largely by Claude Sonnet 3.5 on Roo Cline (now Roo Code) with probably not quite enough direct supervision. I checked over the code and use this server every day, but there may be mistakes or AI weirdness.
I recommend using this server along with mcp-server-commands
Get the files on your computer. Run:
npm install
npm build
If you're using the Claude desktop app, paste this into your config under "mcpServers", and edit the path to match where you put mcp-editor:
{
"mcpServers":
... your existing servers ...
"mcp-editor": {
"command": "node",
"args": ["/absolute/path/to/mcp-editor/dist/server.js"]
}
}
}
If you're using MCP Installer, you just need to provide your LLM with the path on your disk to mcp-editor.
[
{
"description": "View file contents or directory listing",
"inputSchema": {
"properties": {
"path": {
"description": "Absolute path to the file or directory",
"type": "string"
},
"view_range": {
"description": "Optional range of lines to view [start, end]",
"items": {
"type": "number"
},
"maxItems": 2,
"minItems": 2,
"type": "array"
}
},
"required": [
"path"
],
"type": "object"
},
"name": "view"
},
{
"description": "Create a new file with specified content",
"inputSchema": {
"properties": {
"file_text": {
"description": "Content to write to the file",
"type": "string"
},
"path": {
"description": "Absolute path where file should be created",
"type": "string"
}
},
"required": [
"path",
"file_text"
],
"type": "object"
},
"name": "create"
},
{
"description": "Replace a string in a file with a new string",
"inputSchema": {
"properties": {
"new_str": {
"description": "Replacement string (empty string if omitted)",
"type": "string"
},
"old_str": {
"description": "String to replace",
"type": "string"
},
"path": {
"description": "Absolute path to the file",
"type": "string"
}
},
"required": [
"path",
"old_str"
],
"type": "object"
},
"name": "string_replace"
},
{
"description": "Insert text at a specific line in the file",
"inputSchema": {
"properties": {
"insert_line": {
"description": "Line number where text should be inserted",
"type": "number"
},
"new_str": {
"description": "Text to insert",
"type": "string"
},
"path": {
"description": "Absolute path to the file",
"type": "string"
}
},
"required": [
"path",
"insert_line",
"new_str"
],
"type": "object"
},
"name": "insert"
},
{
"description": "Undo the last edit to a file",
"inputSchema": {
"properties": {
"path": {
"description": "Absolute path to the file",
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
},
"name": "undo_edit"
}
]