Supports legacy Delphi and Pascal projects by providing tools to read and write source files and UI text in legacy encodings like Windows-1251.
Facilitates the maintenance of legacy PHP and HTML websites by providing encoding-aware file operations and regex search capabilities for localized content.
Provides automatic detection and conversion between various legacy encodings and Unicode, ensuring data integrity for files with non-UTF-8 text.
MCP File Tools
Non-UTF-8 file encoding server: Cyrillic (CP1251, KOI8), Windows-1250-1258, ISO-8859 with auto-detection and Unicode conversion. Lets AI assistants read and write files in legacy encodings that would otherwise corrupt 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 conversionread_multiple_files- Read multiple files concurrently with encoding supportwrite_file- Write files in specific encodingsedit_file- Line-based edits with diff preview and whitespace-flexible matchingcopy_file- Copy a file to a new locationdelete_file- Delete a filelist_directory- Browse directories with pattern filteringtree- Compact indented tree view (85% fewer tokens than JSON)directory_tree- Get recursive tree view as JSON (deprecated, usetree)search_files- Recursively search for files matching glob patternsgrep_text_files- Regex search in file contents with encoding supportdetect_encoding- Auto-detect file encoding with confidence scoreconvert_encoding- Convert file between encodingsdetect_line_endings- Detect line ending style (CRLF/LF/mixed)list_encodings- Show all supported encodingsget_file_info- Get file/directory metadatacreate_directory- Create directories recursively (mkdir -p)move_file- Move or rename files and directorieslist_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
Linux x64
macOS ARM64
Go Install (All Platforms)
Other Clients
For Claude Desktop, VSCode, or Cursor, use the downloaded binary path in your config:
Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
VSCode / Cursor - Two options:
Option 1: Global config (recommended) - Available in all projects
CLI command (easiest):
Or manually edit %USERPROFILE%\.claude.json:
Option 2: Per-project config - Create .mcp.json in project root:
Note: The type: "stdio" field is required. The args array specifies allowed directories - the VSCode extension does not automatically add the workspace directory, so you must list all directories you want to access.
How to Use
Once installed, just ask Claude:
"List all .pas files in this directory"
"Read config.ini and detect its encoding"
"Show all supported encodings"
"Read MainForm.dfm using CP1251 encoding"
Security: The server only accesses directories you explicitly allow:
Automatic: Claude Desktop/Code provide workspace directories automatically
Manual: Specify directories in config
args: ["/path/to/project"]
Configuration
The server can be configured via environment variables:
Variable | Description | Default |
| Default encoding for |
|
| Memory threshold in bytes. Files smaller are loaded into memory for faster I/O; larger files use streaming. Also affects encoding detection mode. |
|
Example (Claude Desktop config):
Use Cases
Legacy Codebases
Many legacy projects use non-UTF-8 encodings that AI assistants can't handle natively:
Delphi/Pascal (Windows-1251): Source files with Cyrillic UI text
Visual Basic 6 (Windows-1252): Forms and config files with Western European characters
Legacy PHP/HTML (CP1251, ISO-8859-1): Web apps with localized content
Old config files (Various): INI, properties, registry files with legacy encodings
How it works:
The original encoding is preserved - files remain compatible with legacy tools.
Development
Prerequisites: Go 1.23+
Debugging with MCP Inspector
MCP Inspector provides a web UI for testing MCP servers.
Prerequisites: Node.js v18+
Opens a browser where you can view tools, call them with custom arguments, and inspect responses.
Manual Debugging
Run the server with an allowed directory and send JSON-RPC commands via stdin:
Example commands (paste into terminal):
License
GPL-3.0 - see LICENSE