mcp-edit-file-lines
Edit File Lines MCP Server allows for precise editing of text files using simple or complex matching in a secure environment. The server supports dry runs to preview changes and restricts operations to specified directories.
What is the purpose of the dry run mode?
Dry run mode allows users to preview the changes that will be made to a file without actually applying them, ensuring that the edits are correct before finalizing.
How does the server ensure security?
The server restricts file operations to allowed directories, validates symlinks, prevents directory traversal, and normalizes paths to maintain security.
Can I use both string and regex matching in the same edit?
No, you cannot use both 'strMatch' and 'regexMatch' in the same edit operation.
What happens if I use an expired state ID?
Using an expired or invalid state ID will result in an error, as state IDs expire after a short time for security reasons.
How are whitespace and indentation handled?
The tool intelligently handles whitespace, preserving original indentation and normalizing spaces for matching.