MCP server for file operations on non-UTF-8 text: detects the encoding from the bytes, hands the model UTF-8, and writes back in the original encoding with BOM and CRLF/LF intact. 24 encodings — Cyrillic/CP1251, CP1252, KOI8, ISO-8859, UTF-16, GBK/GB18030.
- ✓Open-source license (GPL-3.0)
- ✓Recently active
- ✓Clear description
- ✓Topics declared
git clone https://github.com/dimitar-grigorov/mcp-file-tools{
"mcpServers": {
"mcp-file-tools": {
"command": "mcp-file-tools"
}
}
}MCP Servers overview
# MCP File Tools
[](https://goreportcard.com/report/github.com/dimitar-grigorov/mcp-file-tools)
[](https://github.com/dimitar-grigorov/mcp-file-tools/releases/latest)
[](LICENSE)
[](https://registry.modelcontextprotocol.io/?search=mcp-file-tools)
[](https://github.com/dimitar-grigorov/mcp-file-tools/actions/workflows/test.yml)
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.
- **24 encodings, read and write** — Cyrillic (CP1251, KOI8-R/U, CP866), Windows-125x, ISO-8859-x, UTF-16 LE/BE, GBK/GB18030 ([full list](#supported-encodings))
- **Encoding-aware across the whole tool set** — not just read and write: `edit_file`, `grep_text_files` and `search_files` decode the same way
- **Detection you can inspect** — `detect_encoding` reports the charset, a confidence score and any BOM, so garbled text becomes diagnosable instead of mysterious
- **BOM and line endings are first-class** — add or strip a BOM, convert CRLF↔LF, and do it correctly on UTF-16, where a naive byte-level rewrite corrupts the file
- **Sandboxed** — every path, including symlink and junction targets, is resolved and checked against the directories you allowed
**Perfect for:** Delphi/Pascal projects, legacy VB6 apps, old PHP/HTML sites, config and data files whose encoding you can't tell from the filename.
> **PRs welcome and merged fast** — no CLA, no style review, one-line fixes count. Forked this to fix something? Please [send it back](#contributing) instead.
## What It Does
Provides 22 tools for file operations with automatic encoding conversion:
- [`read_text_file`](TOOLS.md#read_text_file) - Read files with encoding auto-detection and conversion
- [`read_multiple_files`](TOOLS.md#read_multiple_files) - Read multiple files concurrently with encoding support
- [`write_file`](TOOLS.md#write_file) - Write files in specific encodings
- [`edit_file`](TOOLS.md#edit_file) - Line-based edits with diff preview and whitespace-flexible matching
- [`copy_file`](TOOLS.md#copy_file) - Copy a file to a new location
- [`delete_file`](TOOLS.md#delete_file) - Delete a file
- [`list_directory`](TOOLS.md#list_directory) - Browse directories with pattern filtering
- [`tree`](TOOLS.md#tree) - Compact indented tree view (85% fewer tokens than JSON)
- [`directory_tree`](TOOLS.md#directory_tree-deprecated) - Get recursive tree view as JSON (deprecated, use `tree`)
- [`search_files`](TOOLS.md#search_files) - Recursively search for files matching glob patterns
- [`grep_text_files`](TOOLS.md#grep_text_files) - Regex search in file contents with encoding support
- [`detect_encoding`](TOOLS.md#detect_encoding) - Auto-detect file encoding with confidence score
- [`convert_encoding`](TOOLS.md#convert_encoding) - Convert file between encodings
- [`detect_line_endings`](TOOLS.md#detect_line_endings) - Detect line ending style (CRLF/LF/mixed)
- [`change_line_endings`](TOOLS.md#change_line_endings) - Convert line endings to LF or CRLF
- [`manage_bom`](TOOLS.md#manage_bom) - Detect, strip, or add Unicode BOM
- [`list_encodings`](TOOLS.md#list_encodings) - Show all supported encodings
- [`get_file_info`](TOOLS.md#get_file_info) - Get file/directory metadata
- [`create_directory`](TOOLS.md#create_directory) - Create directories recursively (mkdir -p)
- [`move_file`](TOOLS.md#move_file) - Move or rename files and directories
- [`list_allowed_directories`](TOOLS.md#list_allowed_directories) - Show accessible directories
- [`check_for_updates`](TOOLS.md#check_for_updates) - Check whether a newer release is available
See [TOOLS.md](TOOLS.md) for detailed parameters and examples.
### Supported encodings
24 encodings, each usable for both reading and writing. Any of them can be named
explicitly via the `encoding` parameter, or left to auto-detection.
| Script / region | Encodings |
|---|---|
| Unicode | UTF-8, UTF-16 LE, UTF-16 BE |
| 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 |
| Chinese Simplified | GBK, GB18030 |
| Hebrew, Arabic, Baltic, Vietnamese, Thai | Windows-1255, 1256, 1257, 1258, 874 |
Common aliases are accepted (`cp1251`, `latin1`, `gb2312`, `tis-620`, …) —
[`list_encodings`](TOOLS.md#list_encodings) prints the whole table with aliases.
UTF-32 is partially supported: LE and BE BOMs are detected, and
[`manage_bom`](TOOLS.md#manage_bom) can add or strip them, but transcoding to or from
UTF-32 is not implemented and [`change_line_endings`](TOOLS.md#change_line_endings)
refuses UTF-32 files rather than corrupting their 4-byte alignment.
**Security:** All operations restricted to allowed directories only. Paths are resolved
before the check, so a symlink or Windows junction pointing outside an allowed directory
is rejected rather than followed.
> **Upgrading to 2.0.0?** `write_file` now defaults **new** files to `utf-8` instead of
> `cp1251`. Existing files keep their detected encoding and are unaffected. See the
> [CHANGELOG](CHANGELOG.md) for the migration path.
## Installation
### Claude Code plugin (recommended)
The simplest way to use this with Claude Code:
```
/plugin marketplace add dimitar-grigorov/mcp-file-tools
/plugin install mcp-file-tools
```
**Requires [Node.js](https://nodejs.org) 18+ on your PATH** — the launcher is a Node
script. Claude Code ships as a standalone binary and does not bundle Node, so
`node --version` can fail on an otherwise working install; the server then shows as
*not connected* in `/mcp`.
On first launch the plugin downloads the right binary for your OS, verifies its
SHA-256, caches it, and keeps it pinned to a known version. The server is
automatically scoped to the folder you have open (via the MCP roots protocol), so
there is nothing to configure.
The plugin only accesses your current workspace. Without Node, or to grant access to
directories outside the workspace, use a manual install (below).
**Already added the server the manual way?** Remove the old `claude mcp add` entry so
you are not running two copies:
```
claude mcp remove file-tools
```
### Updating the plugin
```
claude plugin marketplace update mcp-file-tools
claude plugin update mcp-file-tools@mcp-file-tools
```
Use the full `plugin@marketplace` id, not the bare name. Or enable auto-update in
`/plugin` → **Marketplaces**.
### MCP Registry
This server is listed in the [Official MCP Registry](https://registry.modelcontextprotocol.io/?search=mcp-file-tools) for discovery by any MCP client.
### Manual install (other MCP clients, or access outside your workspace)
Download the binary for your platform, then register it with the directories it may access.
| Platform | Release asset | Suggested path |
|----------|---------------|----------------|
| Windows x64 | `mcp-file-tools_windows_amd64.exe` | `%LOCALAPPDATA%\Programs\mcp-file-tools\mcp-file-tools.exe` |
| Linux x64 | `mcp-file-tools_linux_amd64` | `~/.local/bin/mcp-file-tools` |
| macOS ARM64 | `mcp-file-tools_darwin_arm64` | `~/.local/bin/mcp-file-tools` |
Windows (PowerShell, not CMD):
```powershell
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"
claude mcp add --scope user file-tools -- "$env:LOCALAPPDATA\Programs\mcp-file-tools\mcp-file-tools.exe" "D:\Projects"
```
Linux / macOS (swap the asset name from the table for your platform):
```bash
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
claude mcp add --scope user file-tools -- ~/.local/bin/mcp-file-tools ~/Projects
```
### Go install (all platforms)
```bash
# Requires Go 1.26+
go install github.com/dimitar-grigorov/mcp-file-tools/cmd/mcp-file-tools@latest
# Linux / macOS
claude mcp add --scope user file-tools -- $(go env GOPATH)/bin/mcp-file-tools ~/Projects
```
```powershell
# Windows PowerShell
claude mcp add --scope user file-tools -- "$(go env GOPATH)\bin\mcp-file-tools.exe" "D:\Projects"
```
### 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):
Windows:
```json
{
"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"]
}
}
}
```
macOS / Linux:
```json
{
"mcpServers": {
"file-tools": {
"command": "/Users/YOUR_NAME/.local/bin/mcp-file-tools",
"args": ["/Users/YOUR_NAME/Projects", "/Users/YOUR_NAME/Documents"]
}
}
}
```
The `args` array specifies allowed directories the server can access. Add as many directories as you need.
**VSCode / Cursor (Claude Code extension)**
If you already ran `claude mcp add --scope user` from the installation steps above, the server is already available in VSCode — no extra confWhat people ask about mcp-file-tools
What is dimitar-grigorov/mcp-file-tools?
+
dimitar-grigorov/mcp-file-tools is mcp servers for the Claude AI ecosystem. MCP server for file operations on non-UTF-8 text: detects the encoding from the bytes, hands the model UTF-8, and writes back in the original encoding with BOM and CRLF/LF intact. 24 encodings — Cyrillic/CP1251, CP1252, KOI8, ISO-8859, UTF-16, GBK/GB18030. It has 19 GitHub stars and was last updated today.
How do I install mcp-file-tools?
+
You can install mcp-file-tools by cloning the repository (https://github.com/dimitar-grigorov/mcp-file-tools) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is dimitar-grigorov/mcp-file-tools safe to use?
+
Our security agent has analyzed dimitar-grigorov/mcp-file-tools and assigned a Trust Score of 82/100 (tier: Trusted). See the full breakdown of passed checks and flags on this page.
Who maintains dimitar-grigorov/mcp-file-tools?
+
dimitar-grigorov/mcp-file-tools is maintained by dimitar-grigorov. The last recorded GitHub activity is from today, with 2 open issues.
Are there alternatives to mcp-file-tools?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy mcp-file-tools to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/dimitar-grigorov-mcp-file-tools)<a href="https://claudewave.com/repo/dimitar-grigorov-mcp-file-tools"><img src="https://claudewave.com/api/badge/dimitar-grigorov-mcp-file-tools" alt="Featured on ClaudeWave: dimitar-grigorov/mcp-file-tools" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!