BM

bhouston/mcp-server-text-editor

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

36 stars 6 forks 品質 63 トレンド 12MIT

Claudeの組み込みテキストエディタツールのオープンソースの実装

概要

Claude の組み込みテキストエディタツールを Model Context Protocol (MCP) サーバーとしてオープン ソースの実装。 このパッケージは、Claudeの組み込みテキストエディタツールと同じ機能を提供し、標準化されたAPIを使用してテキストファイルを閲覧、編集、および作成することができます。 - : Claudeの組み込みテキストエディタツールと同じインターフェイスを実装 - : AIツールの統合のためのモデルコンテキストプロトコル標準に従ってください - : - 任意の行範囲の仕様でファイルコンテンツを表示 - 新しいファイルを作成する - 既存のファイルでテキストを置き換える - 特定の行番号でテキストを入力 - 前の編集を行ないません このパッケージは、組み込みのClaudeテキストエディタツールバージョンに等しいツールを実行します。 - text editor 20241022 (Claude 3.5 Sonnet) - text editor 20250124 (Claude 3.7 Sonnet) しかし、組み込みのClaudeツールで名前の競合を避けるために、ツール名 'text editor' を使用します。 ファイルやディレクトリの内容を表示します。 指定したコンテンツで新しいファイルを作成します.

概要(AI 翻訳)

Claude の組み込みテキストエディタツールを Model Context Protocol (MCP) サーバーとしてオープン ソースの実装。 このパッケージは、Claudeの組み込みテキストエディタツールと同じ機能を提供し、標準化されたAPIを使用してテキストファイルを閲覧、編集、および作成することができます。

##特徴

-ClaudeのテキストエディタへのIdentical API:Claudeの組み込みテキストエディタツールと同じインターフェイスを実装

  • MCPサーバーの実装: AIツールの統合のためのモデルコンテキストプロトコル規格に従う
  • ファイル操作:
  • 任意回線範囲の指定のファイル内容を見る
  • 新しいファイルを作成する
  • 既存のファイルにテキストを置換する
  • 特定の行番号でテキストを入力
  • 前の編集をUndo

サポートされているClaudeテキストエディタバージョン

このパッケージは、組み込みのClaudeテキストエディタツールバージョンに等しいツールを実行します。

  • [text_editor_20241022 (クロード3.5ソンネット)
  • [text_editor_20250124 (クロード 3.7 ソンネット)

しかし、組み込みのClaudeツールで名前の競合を避けるために、ツール名 ‘text editor’ を使用します。

インストール

使用法

サーバーの起動

##Claudeデスクトップの設定

ツールコマンド

################################################################################################################################################################################################################################################################

ファイルやディレクトリの内容を表示します。

作成

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Claude Text Editor MCP Server

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",
GitHub で README 全文を見る

インストール

npx -y mcp-server-text-editor
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "textEditor": { "command": "npx", "args": ["-y", "mcp-server-text-editor"] } } }