Text Editor▌
by bhouston
Edit, view, and create text files with persistent state using our server, featuring tools like Adobe Acrobat DC PDF edit
Implements Claude's text editor tool as a server, enabling viewing, editing, and creating text files with persistent state across command calls.
Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.
best for
- / LLM-powered code editing and refactoring
- / Automated text processing workflows
- / Collaborative editing with conflict prevention
- / Large file manipulation with minimal memory usage
capabilities
- / Read specific line ranges from text files
- / Edit files using line-based operations
- / Handle multiple file patches atomically
- / Detect and prevent concurrent editing conflicts
- / Support multiple text encodings
- / Access partial file contents to reduce tokens
what it does
Provides line-based text file editing with partial file access and concurrency control. Optimized for LLM tools to minimize token usage when reading and modifying files.
about
Text Editor is a community-built MCP server published by bhouston that provides AI assistants with tools and capabilities via the Model Context Protocol. Edit, view, and create text files with persistent state using our server, featuring tools like Adobe Acrobat DC PDF edit It is categorized under file systems, developer tools. This server exposes 1 tool that AI clients can invoke during conversations and coding sessions.
how to install
You can install Text Editor in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
license
MIT
Text Editor is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
readme
Claude Text Editor MCP Server
<p align="center"> <img src="https://mintlify.s3.us-west-1.amazonaws.com/mcp/logo/dark.svg" alt="Model Context Protocol Logo" width="200"/> </p>An open-source implementation of the Claude built-in text editor tool as a Model Context Protocol (MCP) server. This package provides the same functionality as Claude's built-in text editor tool, allowing you to view, edit, and create text files through a standardized API.
Features
- Identical API to Claude's Text Editor: Implements the exact same interface as Claude's built-in text editor tool
- MCP Server Implementation: Follows the Model Context Protocol standard for AI tool integration
- File Operations:
- View file contents with optional line range specification
- Create new files
- Replace text in existing files
- Insert text at specific line numbers
- Undo previous edits
Supported Claude Text Editor Versions
This package implements an equivalent tool to the built-in Claude text editor tool versions:
text_editor_20241022(Claude 3.5 Sonnet)text_editor_20250124(Claude 3.7 Sonnet)
But using the tool name 'text_editor' to avoid name conflicts with built-in Claude tools.
Installation
# Install from npm
npm install mcp-server-text-editor
# Or with pnpm
pnpm add mcp-server-text-editor
Usage
Starting the Server
# Using npx
npx -y mcp-server-text-editor
# Or if installed globally
mcp-server-text-editor
Configuring in Claude Desktop
{
"mcpServers": {
"textEditor": {
"command": "npx",
"args": ["-y", "mcp-server-text-editor"]
}
}
}
Tool Commands
View
View the contents of a file or directory.
{
"command": "view",
"path": "/path/to/file.js",
"view_range": [1, 10] // Optional: Show lines 1-10 only
}
Create
Create a new file with the specified content.
{
"command": "create",
"path": "/path/to/file.js",
"file_text": "console.log('Hello, world!');"
}
String Replace
Replace text in a file.
{
"command": "str_replace",
"path": "/path/to/file.js",
"old_str": "console.log('Hello, world!');",
"new_str": "console.log('Hello, Claude!');"
}
Insert
Insert text at a specific line.
{
"command": "insert",
"path": "/path/to/file.js",
"insert_line": 5,
"new_str": "// This line was inserted by Claude"
}
Undo Edit
Revert the last edit made to a file.
{
"command": "undo_edit",
"path": "/path/to/file.js"
}
Development
Prerequisites
- Node.js 18+
- pnpm
Setup
# Clone the repository
git clone https://github.com/bhouston/mcp-server-text-editor.git
cd mcp-server-text-editor
# Install dependencies
pnpm install
# Build the project
pnpm build
Scripts
pnpm build: Build the TypeScript projectpnpm lint: Run ESLint with auto-fixingpnpm format: Format code with Prettierpnpm clean: Remove build artifactspnpm clean:all: Remove build artifacts and node_modulespnpm test: Run testspnpm test:coverage: Run tests with coverage report
Testing
This project uses Vitest for testing.
To run the tests:
# Run all tests
pnpm test
# Run tests with coverage report
pnpm test:coverage
The test coverage report will be generated in the coverage directory.
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
FAQ
- What is the Text Editor MCP server?
- Text Editor is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
- How do MCP servers relate to agent skills?
- Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
- How are reviews shown for Text Editor?
- This profile displays 75 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.7 out of 5—verify behavior in your own environment before production use.
Use Cases▌
Code & Document Analysis
Read, analyze, and understand files in your project
Example
Summarize README, analyze code structure, find TODO comments across codebase
Navigate large codebases 5x faster, understand projects quickly
Automated File Operations
Create, move, rename, and organize files based on natural language instructions
Example
Organize downloads by file type, rename files following convention, batch process images
Save hours on manual file organization
Content Search & Extraction
Search files for patterns, extract data, find information across directories
Example
Find all config files with API keys, extract emails from documents, search logs for errors
Find information instantly instead of manual grep/find
File Generation & Templates
Generate boilerplate files, apply templates, create project structures
Example
Create React component with tests and styles, generate OpenAPI spec, scaffold new project
Eliminate repetitive file creation work
Implementation Guide▌
Prerequisites
- ›Claude Desktop or Cursor with MCP support
- ›File system permissions for directories you want to access
- ›Understanding of file paths and directory structure
- ›Backup of important files before bulk operations
Time Estimate
10-20 minutes including configuration
Installation Steps
- 1.Install filesystem MCP server (often built-in with Claude Desktop)
- 2.Configure allowed directories in MCP config for security
- 3.Test read: 'Show me contents of ~/Documents/test.txt'
- 4.Test write: 'Create a new file notes.md in current directory'
- 5.Test search: 'Find all .js files containing TODO'
- 6.Test batch operations: 'Rename all .jpeg files to .jpg'
- 7.Verify file permissions and access controls
Troubleshooting
- ⚠Permission denied: Check file/directory permissions, run with appropriate user
- ⚠Path not found: Verify path is absolute or relative to working directory
- ⚠MCP server can't access directory: Add to allowed directories in config
- ⚠File already exists: Use overwrite flag or check before writing
- ⚠Operation failed: Check disk space, file locks, antivirus interference
Best Practices▌
✓ Do
- +Configure allowed directories explicitly—don't grant full filesystem access
- +Back up important files before bulk operations
- +Use dry-run mode for risky operations when available
- +Validate file paths before operations
- +Set appropriate file permissions on created files
- +Log file operations for audit trail
- +Test operations on sample files first
✗ Don't
- −Don't grant MCP access to system directories (/etc, /System)
- −Don't allow write access to production config files
- −Don't skip backup before bulk delete/move operations
- −Don't use for sensitive files (passwords, keys) without encryption
- −Don't ignore file permission errors—investigate root cause
- −Don't expose personal documents without considering privacy
💡 Pro Tips
- ★Use .gitignore patterns to exclude sensitive files from AI access
- ★Create sandboxed working directory for file experiments
- ★Combine with version control (git) for easy rollback
- ★Use file watching for real-time monitoring and reactions
- ★Create templates for common file generation tasks
- ★Leverage file metadata (timestamps, size) for smart organization
Technical Details▌
Architecture
MCP server provides file I/O operations (read, write, search, metadata) as tools Claude can invoke with natural language instructions.
Protocols
- Local file system API
- Glob patterns for search
- File streams for large files
Compatibility
- macOS
- Linux
- Windows
- Local files only (no remote filesystems by default)
When to Use This▌
✓ Use When
Use for code analysis, file organization, content search, template generation, and automating repetitive file operations. Best for local development workflows.
✗ Avoid When
Avoid for system-critical files, sensitive credentials, production environments, or when file integrity is paramount. Don't use on files you can't afford to lose.
Integration▌
- →Combine with git for version-controlled file operations
- →Integrate with code editors for seamless workflow
- →Use with backup tools for safety net
- →Pair with file watchers for automated reactions
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
List & Promote Your MCP Server
Share your MCP server with the developer community
Ratings
4.7★★★★★75 reviews- ★★★★★Mateo Iyer· Dec 28, 2024
Text Editor is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
- ★★★★★Lucas Agarwal· Dec 20, 2024
I recommend Text Editor for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
- ★★★★★Ren Choi· Dec 16, 2024
Text Editor reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
- ★★★★★Ren Haddad· Dec 8, 2024
We wired Text Editor into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
- ★★★★★Ganesh Mohane· Dec 4, 2024
We evaluated Text Editor against two servers with overlapping tools; this profile had the clearer scope statement.
- ★★★★★Lucas Menon· Dec 4, 2024
Useful MCP listing: Text Editor is the kind of server we cite when onboarding engineers to host + tool permissions.
- ★★★★★Sakshi Patil· Nov 23, 2024
Text Editor has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
- ★★★★★Lucas Bansal· Nov 23, 2024
Strong directory entry: Text Editor surfaces stars and publisher context so we could sanity-check maintenance before adopting.
- ★★★★★Ren Dixit· Nov 19, 2024
According to our notes, Text Editor benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
- ★★★★★Fatima Rahman· Nov 11, 2024
Text Editor reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
showing 1-10 of 75