DG

dimitar-grigorov/mcp-file-tools

Developer tools

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

30 stars 10 forks 品質 85 トレンド 20GPL-3.0

非UTF-8テキストのファイル操作のためのMCPサーバー:バイトからエンコーディングを検出し、モデルUTF-8を手渡しし、BOMとCRLF / LF intactで元のエンコーディングに戻って書き込みます.

概要

Claude は Настройки — ??? または . UTF-8 でないテキストのファイル操作のための MCP サーバー。 ファイル拡張子ではなく、ファイルのバイトからエンコーディングを検出し、モデルUTF-8をハンドし、元のエンコーディングに戻って書き込みます。 BOMとCRLF / LF intactは、レガシーツールがファイルを所有するのと互換性があります。 - — サイリル (CP1251, KOI8-R/U, CP866/855), Windows-125x, ISO-8859-x, DOS コード ページ, MacRoman, UTF-16/UTF-32, CJK (GBK, Big5, Shift JIS, EUC-JP/KR) (フルリスト) - - 編集ファイル, grep text files and search files は同じ方法でデコードを許可しました, 単に読み書きではなく, テキストを記述する - テキストやテキストを編集する - TF----------------------------------------------------------- Cyrillic UI テキスト、VB6 フォーム、ローカライズされたコンテンツのレガシー PHP/HTML、および INI またはデータファイルを含む Delphi/Pascal ユニット.

概要(AI 翻訳)

Настройки — ではなく ???? または Íàñòðîéêè を参照します。

UTF-8 でないテキストのファイル操作のための MCP サーバー。 からエンコーディングを検知 拡張子ではなくファイルのバイト、モデル UTF-8 を手渡しし、 元のエンコーディング — BOM と CRLF/LF の intact は、どんなレガシーとでもバイト互換 ツールはファイルを所有しています。

-45のエンコーディング、読み書き — Cyrillic (CP1251、KOI8-R/U、CP866/855)、Windows-125x、ISO-8859-x、DOSコードページ、MacRoman、UTF-32、CJK (GBK、Big5、Shift JIS、EUC-JP/KR) (フルリスト)

  • 全ツールセットを渡るEncoding-aware — [[edit_file], [[grep_text_files]]]] と [[search_files]]] が同じようにデコードされ、読み書きするだけでなく、
  • チェックできる検出 — [detect_encoding] は、charset、自信のスコア、BOM を報告します。
  • BOM と行末は、UTF-16 を含むクラス で、nive バイトレベルがファイルを書き換える -Sandboxed — 含まれているすべてのパス、シンリンク、およびジャンクションターゲットは、許可されたディレクトリに対してチェックされます。

ビルト: Cyrillic UI テキスト、VB6 フォーム、レガシーの PHP/HTML を使用した Delphi/Pascal ユニット

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

README

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

MCP File Tools

Claude sees Настройки — not ???? or Íàñòðîéêè.

MCP server for file operations on text that isn’t UTF-8. It detects the encoding from the file’s bytes rather than its extension, hands the model UTF-8, and writes back in the original encoding — BOM and CRLF/LF intact, still byte-compatible with whatever legacy tool owns the file.

  • 45 encodings, read and write — Cyrillic (CP1251, KOI8-R/U, CP866/855), Windows-125x, ISO-8859-x, DOS code pages, MacRoman, UTF-16/UTF-32, CJK (GBK, Big5, Shift_JIS, EUC-JP/KR) (full list)
  • Encoding-aware across the whole tool set — edit_file, grep_text_files and search_files decode the same way, not just read and write
  • Detection you can inspect — detect_encoding reports the charset, a confidence score and any BOM, so garbled text becomes diagnosable
  • BOM and line endings are first-class — including on UTF-16, where a naive byte-level rewrite corrupts the file
  • Sandboxed — every path, symlink and junction targets included, is checked against the directories you allowed

Built for: Delphi/Pascal units with Cyrillic UI text, VB6 forms, legacy PHP/HTML with localized content, and INI or data files whose encoding you can’t tell from the filename.

User: Read config.ini and change the title to "Настройки"
Claude: [read_text_file → cp1251 detected] → [edits UTF-8] → [write_file → back to cp1251]

PRs welcome and merged fast — no CLA, no style review, one-line fixes count. Forked this to fix something? Please send it back instead.

Installation

claude plugin marketplace add dimitar-grigorov/mcp-file-tools
claude plugin install mcp-file-tools

Inside a session: /plugin marketplace add … and /plugin install ….

Requires Node.js 18+ on your PATH. The launcher is a Node script

GitHub で README 全文を見る

インストール

npx @modelcontextprotocol/inspector go run ./cmd/mcp-file-tools -- /path/to/allowed/dir
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "file-tools": { "command": "C:\\Users\\YOUR_NAME\\AppData\\Local\\Programs\\mcp-file-tools\\mcp-file-tools.exe", "args": ["D:\\Projects", "C:\\Users\\YOUR_NAME\\Documents"] } } }