Back to MCP Directory
Text Editor
Model Context Protocol moderate risk

Text Editor

MCP Text Editor Server provides line-oriented text file editing with conflict detection, partial file access, and encoding support, optimized for LLM tools.

Connections & Capabilities

Connects To

Filesystem

Capabilities

readwrite

Quickstart

Install

uvx mcp-text-editor

Config

{
  "mcpServers": {
    "text-editor": {
      "command": "uvx",
      "args": [
        "mcp-text-editor"
      ]
    }
  }
}

Exposed MCP Tools (2)

safe
get_text_file_contents

Retrieves the content of a text file, optionally specifying a line range.

Read-only operation, no modification of files.

moderate
patch_text_file_contents

Applies patches to a text file, allowing for modifications with conflict detection.

Modifies file content, but includes hash-based validation for conflict detection.

Safety Assessment

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.

  • Line-based editing limits scope of changes.
  • Hash-based validation prevents concurrent edit conflicts.
  • File path validation mitigates directory traversal attacks.
  • Encoding support prevents some injection attacks.
  • Allows writing to arbitrary files on the system.
  • Improperly configured permissions could lead to unauthorized access.
  • No built-in access controls beyond file system permissions.
  • Potential for denial-of-service through excessive file operations.