mcp-text-editor

mcp-text-editor

111

MCP Text Editor Server is a Model Context Protocol server designed for efficient line-oriented text file editing. It supports safe collaborative editing, robust conflict detection, and reduces token consumption in LLM tools. Key features include atomic file operations and comprehensive encoding support.

What are the system requirements for MCP Text Editor Server?

The server requires Python 3.11 or higher, a POSIX-compliant operating system (Linux, macOS, etc.) or Windows, and sufficient disk space for text file operations.

How does the server handle concurrent edits?

The server uses hash-based validation to detect and handle concurrent edits, ensuring safe and conflict-free file modifications.

What encoding formats are supported?

The server supports multiple character encodings, including utf-8, shift_jis, and latin1.

How can I troubleshoot hash mismatch errors?

Hash mismatch errors occur when a file is modified by another process. Use get_text_file_contents to retrieve the latest content and hashes before retrying the operation.

What security measures are in place?

The server implements file path validation, access control, hash validation, input sanitization, and error handling to ensure security and prevent unauthorized access.