MCP Text Editor Server
@nathanonn
关于 MCP Text Editor Server
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-text-editor-server": {
"command": "npx",
"args": [
"tsc"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is MCP Text Editor Server?
An MCP server that implements Anthropic's text editor tool functionality, allowing Claude and other MCP clients to read and modify files within a specified directory. It provides commands for viewing, editing, creating, and undoing file changes, with automatic backups and path validation for security.
How to use MCP Text Editor Server?
Install Node.js 16+ and TypeScript, then set up a project with @modelcontextprotocol/sdk and zod. Compile the source code and run the server with node build/text-editor-server.js /path/to/working/directory. For Claude for Desktop integration, add the server to the mcpServers configuration in claude_desktop_config.json.
Key features of MCP Text Editor Server
- View file contents or directory listings with line numbers
- Make precise text replacements with
str_replace - Edit blocks of code by line numbers with
edit - Insert new content at specific line numbers
- Create new files optionally overwriting existing ones
- Undo edits by restoring files from automatic backups
Use cases of MCP Text Editor Server
- Claude viewing and analyzing source code files in a project directory
- Making targeted string replacements across code files
- Editing entire code blocks or functions with before/after comparison
- Creating new files (config files, scripts) from natural language instructions
- Reverting accidental file modifications using the undo command
FAQ from MCP Text Editor Server
What commands does MCP Text Editor Server support?
It supports six commands: view, str_replace, edit, insert, create, and undo_edit. Each has specific parameters for controlling file operations.
What are the system requirements?
Node.js 16 or higher and TypeScript are required. The server uses the @modelcontextprotocol/sdk and zod libraries.
How does the server ensure security?
It validates paths to keep operations within the base directory, creates automatic backups before every modification, provides clear error messages, and automatically creates the base directory if missing.
Can I integrate this with Claude for Desktop?
Yes. Add the server to the mcpServers array in your claude_desktop_config.json file with the command and arguments pointing to your compiled server and working directory.
How do I undo a change?
Use the undo_edit command with the file path to restore the file to its state before the last modification. The server automatically creates a backup for every edit operation.
其他 分类下的更多 MCP 服务器
Blender
ahujasidOpen-source MCP to use Blender with any LLM
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Awesome Mlops
visengerA curated list of references for MLOps
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
评论