Loading...

MCP Text Editor Server provides line-oriented text file editing with conflict detection, partial file access, and encoding support, optimized for LLM tools.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
MCP Text Editor Server provides line-oriented text file editing with conflict detection, partial file access, and encoding support, optimized for LLM tools.
The Text Editor Server is relatively safe when used with appropriate file system permissions and careful input validation. However, the ability to write to arbitrary files makes it risky if not properly secured. It is crucial to restrict access to authorized directories and sanitize user inputs to prevent potential security vulnerabilities.
Performance depends on file size and network latency. Partial file access can improve performance for large files. Encoding conversions may introduce overhead.
Cost is primarily related to compute resources for running the server. Token usage is minimized by partial file access.
uvx mcp-text-editor{
"mcpServers": {
"text-editor": {
"command": "uvx",
"args": [
"mcp-text-editor"
]
}
}
}get_text_file_contentsRetrieves the content of a text file, optionally specifying a line range.
Read-only operation, no modification of files.
patch_text_file_contentsApplies patches to a text file, allowing for modifications with conflict detection.
Modifies file content, but includes hash-based validation for conflict detection.
None
cloud
The Text Editor Server is relatively safe when used with appropriate file system permissions and careful input validation. However, the ability to write to arbitrary files makes it risky if not properly secured. It is crucial to restrict access to authorized directories and sanitize user inputs to prevent potential security vulnerabilities.
Autonomy is limited by file system permissions. The agent can only modify files it has access to. Hash validation provides a basic level of safety against concurrent modifications.
Production Tip
Implement robust logging and monitoring to track file modifications and detect potential security issues.
The server supports a variety of encodings, including utf-8, shift_jis, and latin1. The specific encodings available depend on the Python installation.
The server uses SHA-256 hashes to detect concurrent edits. If a hash mismatch is detected, an error is returned, and the client must retrieve the latest version of the file.
The server returns an error if a patch range is invalid (e.g., out of bounds or overlapping). The error message will indicate the specific issue.
Yes, both `get_text_file_contents` and `patch_text_file_contents` support editing multiple files in a single request.
Use `"end": null` in the patch definition to indicate that the content should be appended to the end of the file.
The server requires read and write permissions to the files and directories it will be accessing.
Verify that the file encoding matches the encoding specified in the request. Use utf-8 for new files and check for BOM markers in existing files.