mcp -text-editor
An open source implementation of the Claude built-in text editor tool
claude mcp add --transport stdio bhouston-mcp-server-text-editor npx -y mcp-server-text-editor
How to use
This MCP server implements Claude's built-in text editor tool as a standardized MCP service. It exposes an API that lets you view, create, modify, and manage text files through a consistent tool interface. You can start the server locally using npx as shown in the usage examples, then connect to it via the MCP protocol by configuring it in Claude Desktop or your MCP client. The server supports the same operations as Claude’s text editor, including viewing file contents (with optional line ranges), creating new files, performing string replacements, inserting text at a specific line, and undoing the most recent edit.
How to install
Prerequisites:
- Node.js 18+
- pnpm (optional but recommended)
Install and run locally:
-
Install the MCP server package from npm or run via npx:
npm install -g mcp-server-text-editor
or run directly without installation
npx -y mcp-server-text-editor
-
Start the server (if installed globally, you can simply run the command below):
mcp-server-text-editor
-
If you prefer to install and run via pnpm helper, you can set up your environment and then start the server in your project:
git clone https://github.com/bhouston/mcp-server-text-editor.git cd mcp-server-text-editor pnpm install pnpm build pnpm start
-
To integrate with Claude Desktop or another MCP client, configure the MCP server reference as shown in the README example (textEditor) within your mcpServers configuration.
Additional notes
Tips:
- The server implements the following tool commands: view, create, str_replace, insert, and undo_edit. Each command follows the Claude Text Editor API surface so it should be straightforward to integrate into existing workflows.
- If you run into port or startup issues, verify your Node.js version and ensure npm/pnpm are up to date. Check that your environment allows executing npx commands and accessing the npm registry.
- When using Claude Desktop, you typically configure the server in the mcpServers section with command: "npx" and args: ["-y", "mcp-server-text-editor"], as shown in the usage example.
- You may customize file operations by providing appropriate JSON payloads to the tool API, e.g., view with path and an optional view_range, or insert to place new text at a specific line.
- If you need to revert changes, use undo_edit with the target file path to revert the last modification.
Related MCP Servers
autotask
MCP server for Kaseya Autotask PSA — 39 tools for companies, tickets, projects, time entries, and more
docmole
Dig through any documentation with AI - MCP server for Claude, Cursor, and other AI assistants
obsidian
MCP server for Obsidian vault management - enables Claude and other AI assistants to read, write, search, and organize your notes
gmail
A robust Model Context Protocol server for Gmail integration with intelligent authentication and comprehensive email operations
mcp-tidy
CLI tool to visualize and manage MCP server configurations in Claude Code. List servers, analyze usage statistics, and clean up unused servers
harvest
MCP server for Harvest time tracking API - use with Claude Desktop and other AI assistants