# MCP File Tools

> MCP File Tools is an open-source MCP server for files and documents. Read, edit and search non-UTF-8 files in 45 encodings without corrupting them. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** Windows, Linux, macOS, CLI, self-hosted
- **Repository:** https://github.com/dimitar-grigorov/mcp-file-tools
- **MCP Registry name:** io.github.dimitar-grigorov/mcp-file-tools
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

Legacy files such as Delphi units, VB6 forms or older PHP often use CP1251, KOI8 or other code pages, and a model that reads them as UTF-8 sees garbage. This server detects each file's encoding from its bytes, hands the model clean UTF-8, and writes back in the original encoding.

Byte order marks and CRLF or LF line endings are preserved, including on UTF-16 where a naive rewrite breaks the file. Edit, grep and search tools decode the same way, and every path, symlink and junction is checked against the directories you allowed.

It ships as a Claude Code plugin (needs Node.js 18+ for the launcher), as downloadable binaries for Windows, Linux and macOS, or via `go install`.

## Features

- **45 encodings:** Read and write Cyrillic, Windows-125x, ISO-8859, DOS, UTF-16/32 and CJK code pages.
- **Detection report:** Reports charset, confidence and any BOM.
- **Round-trip safe edits:** Keeps BOM and line endings intact.
- **Encoding-aware search:** Grep and file search decode the same way.
- **Directory sandbox:** Paths and links must sit inside allowed folders.

## Good for

- Edit a Cyrillic Delphi project with an AI assistant
- Diagnose why a legacy file shows question marks
- Search a tree of mixed-encoding INI and HTML files
- Change a UI string and save back as CP1251

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-file-tools -- npx -y https://github.com/dimitar-grigorov/mcp-file-tools/releases/download/v4.6.2/mcp-file-tools_windows_amd64.exe
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-file-tools": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/dimitar-grigorov/mcp-file-tools/releases/download/v4.6.2/mcp-file-tools_windows_amd64.exe"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-file-tools": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/dimitar-grigorov/mcp-file-tools/releases/download/v4.6.2/mcp-file-tools_windows_amd64.exe"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-file-tools": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/dimitar-grigorov/mcp-file-tools/releases/download/v4.6.2/mcp-file-tools_windows_amd64.exe"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-file-tools": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/dimitar-grigorov/mcp-file-tools/releases/download/v4.6.2/mcp-file-tools_windows_amd64.exe"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-file-tools": {
      "command": "npx",
      "args": [
        "-y",
        "https://github.com/dimitar-grigorov/mcp-file-tools/releases/download/v4.6.2/mcp-file-tools_windows_amd64.exe"
      ]
    }
  }
}
```

## Tools

- `detect_encoding`: Reports charset, confidence score and any BOM
- `read_text_file`: Reads a file and returns UTF-8
- `write_file`: Writes back in the original encoding
- `edit_file`: Encoding-aware edit
- `grep_text_files`: Encoding-aware text search
- `search_files`: Encoding-aware file search

## FAQ

### How does it know the encoding?

It detects it from file bytes, not the extension, and `detect_encoding` shows confidence.

### Does it need Node?

The Claude Code plugin launcher needs Node.js 18+; manual binary installs do not.

### Which folders can it touch?

Only directories you pass as arguments.

### Is MCP File Tools free?

Yes. MCP File Tools is open source, so you can use and self-host it for free.

### How do I add MCP File Tools to Claude Code?

Run this command in your terminal: claude mcp add mcp-file-tools -- npx -y https://github.com/dimitar-grigorov/mcp-file-tools/releases/download/v4.6.2/mcp-file-tools_windows_amd64.exe

### What are the best alternatives to MCP File Tools?

The closest alternatives to MCP File Tools are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/mcp-file-tools
