
A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

An MCP server that implements Anthropic's text editor tool commands so clients can read, modify, create and revert files within a specified working directory.
MCP Text Editor Server is cataloged as an MCP server attributed to nathanonn. An MCP server that implements Anthropic's text editor tool commands so clients can read, modify, create and revert files within a specified working directory. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP Text Editor Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It validates paths to keep operations within the base directory, creates automatic backups before modifications, provides clear error messages, and creates the base directory if it does not exist.
If no directory is specified, the server defaults to ./texteditor-data.
README.md · 503ec6981134 · 采集于 2026-11-13 12:14:40 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A Model Context Protocol (MCP) server that implements Anthropic's text editor tool functionality. This server allows Claude and other MCP clients to read and modify files within a specified directory.
The server implements the same commands as Anthropic's text editor tool, plus an enhanced edit command:
view: Examine file content or list directory contents
str_replace: Make precise text replacements
edit: Edit blocks of code by line numbers
insert: Add new content at specific line numbers
create: Create new files or overwrite existing ones
undo_edit: Restore files from backups
Create a new project:
mkdir text-editor-mcp
cd text-editor-mcp
npm init -y
Install dependencies:
npm install @modelcontextprotocol/sdk zod
npm install -D @types/node typescript
Create a TypeScript configuration:
Create a tsconfig.json file:
{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"moduleResolution": "Node16",
"outDir": "./build",
"esModuleInterop": true,
"strict": true
},
"include": ["*.ts"]
}
Save the source code:
Save the text editor server code as text-editor-server.ts in your project.
Compile:
npx tsc
node build/text-editor-server.js /path/to/working/directory
If you don't specify a directory, it defaults to ./texteditor-data.
Open your Claude for Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd the server to your configuration:
{
"mcpServers": {
"text-editor": {
"command": "node",
"args": ["/absolute/path/to/build/text-editor-server.js", "/absolute/path/to/working/directory"]
}
}
}
Restart Claude for Desktop.
View file content or directory listings.
Parameters:
path (required): File or directory path relative to the base directoryview_range (optional): Array of two integers specifying line range to view (e.g., [1, 10])
-1 for the end line to read to the end of the fileExample Usage in Claude: "Show me the content of main.py" "Show me lines 10-20 of server.js" "List the files in the projects directory"
Replace specific text in files. Best for simple, targeted text replacements.
Parameters:
path (required): File path relative to the base directoryold_str (required): Text to replacenew_str (required): New textcount (optional): Number of occurrences to replace (all if not specified)Example Usage in Claude: "Replace 'function' with 'method' in utils.js" "Replace the first occurrence of 'error' with 'exception' in error_handler.py"
Edit a range of lines in a file. This is safer than str_replace for editing larger blocks of code.
Parameters:
path (required): File path relative to the base directorystart_line (required): First line number to edit (1-based)end_line (required): Last line number to edit (1-based, or -1 for "to the end of file")new_content (required): New content to replace the specified line rangeExample Usage in Claude: "Edit lines 10-15 in server.js to implement proper error handling" "Replace the function starting at line 25 with this improved version"
Insert text at specific line numbers.
Parameters:
path (required): File path relative to the base directoryline_number (required): Line number to insert at (1-based)text (required): Text to insertExample Usage in Claude: "Insert a docstring after line 5 in main.py" "Add a new import statement at line 1 of app.js"
Create new files with specified content.
Parameters:
path (required): File path relative to the base directorycontent (required): Content to write to the fileoverwrite (optional): Whether to overwrite if file exists (default: false)Example Usage in Claude: "Create a new file named config.json with these settings" "Create a Python script that prints 'Hello World'"
Restore files from backups.
Parameters:
path (required): File path relative to the base directoryExample Usage in Claude: "Undo my last edit to README.md" "Revert the changes to server.js"
The server includes several important security measures:
Here are some example conversations to try with Claude:
These rules help Claude determine when and how to use the text editor tool:
For ANY request involving viewing, editing, creating, or modifying files:
1. When you need to view file content:
+ Use the "view" command with the file path
+ For large files, use view_range parameter to see specific sections
2. When you need to edit existing files:
+ First use "view" to see the current content
+ For simple text replacements, use "str_replace" with old_str and new_str
+ For editing blocks of code or multiple lines, use "edit" with start_line, end_line, and new_content
+ For adding new content at a specific location, use "insert" with line_number and text
3. When you need to create new files:
+ Use "create" with path and content parameters
+ If replacing an existing file, set overwrite to true
4. If a user is unhappy with changes:
+ Use "undo_edit" to revert the most recent change to a file
Always confirm you've made the requested changes and summarize what you've done. When possible, show the relevant portions of the file before and after changes.
You can include these rules in your Claude prompts to help guide the model on when and how to use the text editor tool.
These rules help Claude determine when and how to use the text editor tool:
For ANY request involving viewing, editing, creating, or modifying files:
1. When you need to view file content:
+ Use the "view" command with the file path
+ For large files, use view_range parameter to see specific sections
2. When you need to edit existing files:
+ First use "view" to see the current content
+ For simple replacements, use "str_replace" with old_str and new_str
+ For adding new content at a specific location, use "insert" with line_number and text
3. When you need to create new files:
+ Use "create" with path and content parameters
+ If replacing an existing file, set overwrite to true
4. If a user is unhappy with changes:
+ Use "undo_edit" to revert the most recent change to a file
Always confirm you've made the requested changes and summarize what you've done. When possible, show the relevant portions of the file before and after changes.
You can include these rules in your Claude prompts to help guide the model on when and how to use the text editor tool.
If you encounter issues:
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP Text Editor Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-text-editor-server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.