Text EditorSAFE
A token-efficient MCP server for safe, line-oriented text file editing with partial reads, hash-based conflict detection, and atomic multi-file operations.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://codecov.io/gh/tumf/mcp-text-editor) [](https://smithery.ai/server/mcp-text-editor) [](https://glama.ai/mcp/servers/k44dnvso10)
A Model Context Protocol (MCP) server that provides line-oriented text file editing capabilities through a standardized API. Optimized for LLM tools with efficient partial file access to minimize token usage.
Quick Start for Claude.app Users
To use this editor with Claude.app, add the following configuration to your prompt:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"text-editor": {
"command": "uvx",
"args": [
"mcp-text-editor"
]
}
}
}Overview
MCP Text Editor Server is designed to facilitate safe and efficient line-based text file operations in a client-server architecture. It implements the Model Context Protocol, ensuring reliable file editing with robust conflict detection and resolution. The line-oriented approach makes it ideal for applications requiring synchronized file access, such as collaborative editing tools, automated text processing systems, or any scenario where multiple processes need to modify text files safely. The partial file access capability is particularly valuable for LLM-based tools, as it helps reduce token consumption by loading only the necessary portions of files.
Key Benefits
- Line-based editing operations
- Token-efficient partial file access with line-range specifications
- Optimized for LLM tool integration
- Safe concurrent editing with hash-based validation
- Atomic multi-file operations
- Robust error handling with custom error types
- Comprehensive encoding support (utf-8, shift_jis, latin1, etc.)
Features
- Line-ori
9a067f7559a6OBSERVED · 2026-10-06Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add mcp-text-editor -- uvx mcp-text-editor
{
"mcpServers": {
"mcp-text-editor": {
"command": "uvx",
"args": [
"mcp-text-editor"
]
}
}
}Exposed tools (6)
2 read · 3 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
append_text_file_contents | read | Append content to a text file. |
create_text_file | write | Create a new text file. |
delete_text_file_contents | destructive | Delete the contents of a text file. |
get_text_file_contents | read | Get the contents of text files. |
insert_text_file_contents | write | Insert content into a text file at a specific position. |
patch_text_file_contents | write | Patch the contents of a text file. |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (1 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (11)
delete_text_file_contents
.codecov.yml
.pre-commit-config.yaml
normalize_and_validate_path("/etc/passwd", tmpdir)normalize_and_validate_path("subdir/../../../etc/passwd", tmpdir)"../../../etc/passwd",
"~/../../../etc/passwd",
"/./../../etc/passwd",
normalize_and_validate_path("test.txt\x00../../etc/passwd", tmpdir)curl -LsSf https://astral.sh/uv/install.sh | sh
curl -LsSf https://astral.sh/uv/install.sh | sh
Gates applied: no_behavioural_pass.
9a067f7559a6full audit observations/trust-audit/mcp-server/tumf__text-editor.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-06 | 9a067f7559a6 | SAFE | B | 89 | first audit |
Questions
What is the Text Editor MCP server?
A token-efficient MCP server for safe, line-oriented text file editing with partial reads, hash-based conflict detection, and atomic multi-file operations.
What tools does Text Editor expose?
6 in total: 2 read-only, 3 that write, and 1 that can delete or overwrite (delete_text_file_contents). Every one is listed on this page with its risk.
Is Text Editor safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Text Editor need?
No credential environment variables were found in its source, so it appears to need none.
How does Text Editor run?
It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as mcp-text-editor.
How current is this page?
The grade is for one exact copy of the source (9a067f7559a6), read on 2026-10-06. The repository is watched and re-audited when it changes.