MCP文件工具 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
MCP文件工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
MCP文件工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/dimitar-grigorov/mcp-file-tools
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"mcp----": {
"command": "npx",
"args": ["-y", "mcp-file-tools"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 MCP文件工具 执行以下任务... Claude: [自动调用 MCP文件工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"mcp____": {
"command": "npx",
"args": ["-y", "mcp-file-tools"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
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.
edit_file, grep_text_files and search_files decode the same way, not just read and writedetect_encoding reports the charset, a confidence score and any BOM, so garbled text becomes diagnosableBuilt for: Delphi/Pascal units with Cyrillic UI text, VB6 forms, legacy PHP/HTML with localized content, and INI or data files whose encoding you can't tell from the filename.
User: Read config.ini and change the title to "Настройки"
Claude: [read_text_file → cp1251 detected] → [edits UTF-8] → [write_file → back to cp1251]
PRs welcome and merged fast — no CLA, no style review, one-line fixes count. Forked this to fix something? Please send it back instead.
go install github.com/dimitar-grigorov/mcp-file-tools/v4/cmd/mcp-file-tools@latest
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):
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" "C:\Projects"
Linux / macOS (swap the asset name from the table for your platform):
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
```bash
```bash
claude mcp remove file-tools
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 reaches only the directories you allowed. It takes them from args: ["/path/to/project"] first, then MCP_FILE_TOOLS_ALLOWED_DIRS, and failing both from the directory it was started in — the workspace, when a client launches it there. Clients that still speak the MCP roots protocol add their roots on top. A drive root or your home directory is never granted by that last fallback; name it explicitly instead. Paths are resolved before the check, so a symlink or Windows junction pointing outside is rejected rather than followed.
The server can be configured via environment variables:
| Variable | Description | Default |
|---|---|---|
MCP_DEFAULT_ENCODING | Default encoding for write_file on **new** files when none specified. Existing files keep their detected encoding. Set to cp1251 to restore the pre-2.0.0 default. | utf-8 |
MCP_DEFAULT_LINE_ENDINGS | Line endings for write_file on **new** files (crlf/lf). Existing files keep their own style regardless. | unset (write unchanged) |
MCP_MEMORY_THRESHOLD | Memory threshold in bytes. Files smaller are loaded into memory for faster I/O; larger files use streaming. Also affects encoding detection mode. | 67108864 (64MB) |
MCP_DETECTION_CANDIDATES | Comma-separated list pinning what detection may answer, in priority order — e.g. utf-8,windows-1252. See [Pinning the encodings](#pinning-the-encodings). | unset (detection unrestricted) |
MCP_FILE_TOOLS_ALLOWED_DIRS | Allowed directories as an OS path list (; on Windows, : elsewhere). For clients where env is the only block you control, such as the Claude Code plugin. Overridden by args. | unset |
MCP_FILE_TOOLS_NO_CWD_FALLBACK | Set to turn off granting the working directory when neither args nor MCP_FILE_TOOLS_ALLOWED_DIRS names one. | unset (fallback on) |
Set them with an env block in your config (Claude Desktop example):
{
"mcpServers": {
"file-tools": {
"command": "C:\\Users\\YOUR_NAME\\AppData\\Local\\Programs\\mcp-file-tools\\mcp-file-tools.exe",
"args": ["D:\\Projects"],
"env": {
"MCP_DEFAULT_ENCODING": "utf-8"
}
}
}
}
claude plugin marketplace add dimitar-grigorov/mcp-file-tools
claude plugin install mcp-file-tools
Inside a session: /plugin marketplace add … and /plugin install ….
Requires Node.js 18+ on your PATH. The launcher is a Node script and Claude Code does not bundle Node; without it /mcp shows the server as not connected.
First launch downloads the binary for your OS at a pinned version, verifies its SHA-256 and caches it. It is scoped to the folder you have open, so there is nothing to configure. For directories outside the workspace, or a machine without Node, use a manual install.
```bash claude mcp list # find the old file-tools entry claude mcp remove file-tools claude plugin marketplace add dimitar-grigorov/mcp-file-tools claude plugin install mcp-file-tools
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 turn on auto-update in /plugin → Marketplaces.
claude mcp list
claude plugin uninstall mcp-file-tools ```
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
⚠️ GPL 3.0 — 强 Copyleft,衍生作品须开源,含专利保护条款,不可闭源使用。
经综合评估,MCP文件工具 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | mcp-file-tools |
| 原始描述 | 开源MCP工具:MCP server for file operations with non-UTF-8/Unicode encoding: Cyrillic, CP1251。⭐15 · Go |
| Topics | mcpcp1251cyrillicgo |
| GitHub | https://github.com/dimitar-grigorov/mcp-file-tools |
| License | GPL-3.0 |
| 语言 | Go |
收录时间:2026-06-26 · 更新时间:2026-06-26 · License:GPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端