MCP server for file operations with non-UTF-8 encoding support
MCP File Tools
Claude sees Настройки — not ???? or Íàñòðîéêè.
MCP server for file operations with non-UTF-8 encoding support. Auto-detects and converts 22 encodings (Cyrillic, Windows-125x, ISO-8859, KOI8, UTF-16) so AI assistants can read and write legacy files without corrupting data.
Perfect for: Delphi/Pascal projects, legacy VB6 apps, old PHP/HTML sites, config files with non-UTF-8 text.
What It Does
Provides 19 tools for file operations with automatic encoding conversion:
- `read_text_file` - Read files with encoding auto-detection and conversion
- `read_multiple_files` - Read multiple files concurrently with encoding support
- `write_file` - Write files in specific encodings
- `edit_file` - Line-based edits with diff preview and whitespace-flexible matching
- `copy_file` - Copy a file to a new location
- `delete_file` - Delete a file
- `list_directory` - Browse directories with pattern filtering
- `tree` - Compact indented tree view (85% fewer tokens than JSON)
- `directory_tree` - Get recursive tree view as JSON (deprecated, use
tree) - `search_files` - Recursively search for files matching glob patterns
- `grep_text_files` - Regex search in file contents with encoding support
- `detect_encoding` - Auto-detect file encoding with confidence score
- `convert_encoding` - Convert file between encodings
- `detect_line_endings` - Detect line ending style (CRLF/LF/mixed)
- `list_encodings` - Show all supported encodings
- `get_file_info` - Get file/directory metadata
- `create_directory` - Create directories recursively (mkdir -p)
- `move_file` - Move or rename files and directories
- `list_allowed_directories` - Show accessible directories
Supported encodings (22 total):
- Unicode: UTF-8, UTF-16 LE, UTF-16 BE (with BOM detection for UTF-16 and UTF-32)
- Cyrillic: Windows-1251, KOI8-R, KOI8-U, CP866, ISO-8859-5
- Western European: Windows-1252, ISO-8859-1, ISO-8859-15
- Central European: Windows-1250, ISO-8859-2
- Greek: Windows-1253, ISO-8859-7
- Turkish: Windows-1254, ISO-8859-9
- Other: Hebrew (1255), Arabic (1256), Baltic (1257), Vietnamese (1258), Thai (874)
See TOOLS.md for detailed parameters and examples.
Security: All operations restricted to allowed directories only.
Installation
MCP Registry
This server is listed in the Official MCP Registry for discovery.
Windows x64
Note: Run these commands in PowerShell, not in CMD.
# Download
mkdir -Force "$env:LOCALAPPDATA\Programs\mcp-file-tools"
iwr "https://github.com/dimitar-grigorov/mcp-file-tools/releases/latest/download/mcp-file-tools_windows_amd64.exe" -OutFile "$env:LOCALAPPDATA\Programs\mcp-file-tools\mcp-file-tools.exe"
# Install with Claude Code + VSCode (allows access to D:\Projects)
claude mcp add --scope user file-tools -- "$env:LOCALAPPDATA\Programs\mcp-file-tools\mcp-file-tools.exe" "D:\Projects"
Linux x64
# Download
mkdir -p ~/.local/bin
curl -L "https://github.com/dimitar-grigorov/mcp-file-tools/releases/latest/download/mcp-file-tools_linux_amd64" -o ~/.local/bin/mcp-file-tools
chmod +x ~/.local/bin/mcp-file-tools
# Install with Claude Code + VSCode (allows access to ~/Projects)
claude mcp add --scope user file-tools -- ~/.local/bin/mcp-file-tools ~/Projects
macOS ARM64
# Download
mkdir -p ~/.local/bin
curl -L "https://github.com/dimitar-grigorov/mcp-file-tools/releases/latest/download/mcp-file-tools_darwin_arm64" -o ~/.local/bin/mcp-file-tools
chmod +x ~/.local/bin/mcp-file-tools
# Install with Claude Code + VSCode (allows access to ~/Projects)
claude mcp add --scope user file-tools -- ~/.local/bin/mcp-file-tools ~/Projects
Go Install (All Platforms)
# Install with Go (requires Go 1.23+)
go install github.com/dimitar-grigorov/mcp-file-tools/cmd/mcp-file-too
Tools (5)
read_text_fileRead files with encoding auto-detection and conversionwrite_fileWrite files in specific encodingsdetect_encodingAuto-detect file encoding with confidence scoregrep_text_filesRegex search in file contents with encoding supporttreeCompact indented tree view of directory contentsConfiguration
{"mcpServers": {"file-tools": {"command": "mcp-file-tools", "args": ["/path/to/your/files"]}}}