# MCP File Tools

Detects non-UTF-8 encodings from raw bytes, serves UTF-8 to the model, and writes changes back in the original format. Useful for legacy Delphi, VB6, or old INI files.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 26
- Author: dimitar-grigorov
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dimitar-grigorov/mcp-file-tools
- Updated: 2026-10-17
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-file-tools

## What it does

This server handles text files that do not use UTF-8. It inspects raw bytes rather than file extensions to identify the character set. The model receives plain UTF-8 for its work. When changes are written back, the tool restores the original encoding. Byte order marks and CRLF line endings remain intact.

The toolset covers 45 encodings, including legacy Windows and Cyrillic charsets. It provides `detect_encoding`, `edit_file`, `grep_text_files`, and `search_files`. The detection command returns the charset name, a confidence score, and BOM status. Every path and symlink is checked against permitted folders. Outside directories stay blocked.

Claude Code requires Node.js 18 or later on your `PATH` to launch this server. Without Node present, the server status will stay disconnected.

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- inspect non-UTF-8 files like CP1251 or UTF-16 without corrupting characters
- edit Delphi and VB6 source code while keeping the original charset
- search legacy encoded documents using `grep_text_files`
- preserve CRLF line endings and BOM markers during file saves

## Example prompts
- Check the encoding of `config.ini` with `detect_encoding` and show the confidence score.
- Search for the string 'Connection Error' across legacy files using `grep_text_files`.
- Open `main.pas`, update the window title to 'Settings', and save it preserving the original charset.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
