// may the 4th be with you⚔️
file-systemsdeveloper-tools

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.

github stars

35

0 commentsdiscussion

Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.

Hash-based concurrency controlToken-efficient partial file accessMultiple encoding support

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

npm version CI Status Test Coverage

<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 project
  • pnpm lint: Run ESLint with auto-fixing
  • pnpm format: Format code with Prettier
  • pnpm clean: Remove build artifacts
  • pnpm clean:all: Remove build artifacts and node_modules
  • pnpm test: Run tests
  • pnpm 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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.

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
MCP server reviews

Ratings

4.775 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

1 / 8