Skip to content
Agentmart
Submit a tool

MCP File Tools

Non-UTF-8 files: CP1251, CP1252, KOI8, ISO-8859, UTF-16, GBK auto-detected and preserved

Connector by dimitar-grigorov · GitHub account verified by the MCP Registry

IndexedGPL-3.0Local (stdio)★ 26
Write a review

Install

Works with Claude Desktop. Read the repository before you give any tool access to your data.

Download the bundle

MCP bundle (.mcpb): open it with Claude Desktop.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Non-UTF-8 files: CP1251, CP1252, KOI8, ISO-8859, UTF-16, GBK auto-detected and preserved

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.

Tools
11 read · 6 write · 1 delete · 2 not yet classified
Secrets
None asked for
Install scripts
None found
Runs as
Downloaded binary

Tools by what they do 20

Read from the source code; the running server may list different tools.

Read 11 · Look things up without changing anything.

  • check_for_updates
  • convert_encoding
  • detect_encoding
  • get_file_info
  • grep_text_files
  • list_allowed_directories
  • list_directory
  • list_encodings
  • read_multiple_files
  • read_text_file
  • search_files

Write 6 · Create, change, send or run things.

  • create_directory
  • edit_file
  • manage_bom
  • manage_line_endings
  • move_file
  • write_file

Delete 1 · Delete, drop, revoke or wipe things.

  • delete_file

Not yet classified 2 · We could not tell from the name and description.

  • copy_file
  • tree

Network hosts it talks to 3

  • api.github.com · found in code
  • github.com · found in install command, code
  • glama.ai · found in code

Files it touches

  • /etc/passwd
  • /home/user
  • /home/user/file.txt
  • /home/user/other/file.txt
  • /home/user/project
  • /home/user/project_backup/file.txt
  • /home/user/project/../../../etc/passwd
  • /home/user/project/./file.txt
  • /home/user/project//double//slash
  • /home/user/project/file.txt
  • /home/user/project/src/main.go
  • /home/user/project1
  • /home/user/project1/file.txt
  • /home/user/project2
  • /home/user/project2/file.txt
  • /tmp/project/file.txt
  • Your home directory (~)
  • ~/Documents
  • ~/home
  • C:\\Users\\test
  • C:\\Users\\user\\project
  • C:\\Users\\user\\project\\file.txt
  • C:\\USERS\\USER\\PROJECT\\file.txt
  • C:\\Users\\user\\project2\\file.txt
  • C:\\USERS\\USER\\PROJECT2\\file.txt
  • D:\\\\Projects\
  • D:\\legacy\\data.txt
  • D:\\OpenAI-Tunnel\\start-tunnel.ps1
  • D:\\proj
  • D:\\proj\\src
  • D:\\src\\app.pas
  • D:\\src\\unit1.pas
  • D:\\www\\index.php
  • E:\\OpenAI-Tunnel\\start-tunnel.ps1

Tools (20)

Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • check_for_updates

    Check if a newer version of mcp-file-tools is available. Returns current version, latest version, and update instructions if outdated. Uses a cached result (max 1 GitHub API call per 30 min); force=true bypasses the cache. Call once at the start of each session.

  • convert_encoding

    Convert files between encodings. Parameters: path (one file) OR paths (a batch — never both), to (required), from (omit to auto-detect), backup (write .bak first), dryRun (report only), allowLowConfidence, bom ("auto" default, "always", "never", "preserve"). Refuses rather than corrupting: a narrowing conversion (utf-8 to cp1251) names the characters the target lacks with line and column, and an untrusted detection names its best guess — confirm it with from, or pass allowLowConfidence=true. A source BOM is stripped before decoding; one contradicting an explicit from is an error. No-op if the …

  • copy_file

    Copy one file byte for byte, keeping its encoding, BOM, line endings, permissions and mtime. Use it to back up a file before an edit or a conversion. Parameters: source (required), destination (required). Never overwrites: an existing destination is an error and nothing is written, so the same call repeated fails the second time rather than copying again. Source must be a file, a directory is refused. The destination's parent directory has to exist already (create_directory first), both paths must sit inside the allowed directories, and a relative path resolves against the directory the server…

  • create_directory

    Create a directory recursively (mkdir -p). Succeeds silently if already exists. Parameter: path (required).

  • delete_file

    Delete a file. Does not delete directories. Parameter: path (required).

  • detect_encoding

    Auto-detect file encoding with confidence score (0-100) and BOM detection. ALWAYS use this first when encountering garbled text or � characters. Use before read_text_file to determine the correct encoding. Parameters: path (required), mode (sample=fast default, chunked=thorough, full=entire file). When the answer is in doubt the result also ranks candidates, all of them usable; retry the read with one and ask the user if two are plausible. A file the detector cannot place is refused rather than guessed at, with the same ranking in the error.

  • edit_file

    Edit one file with replacements or a unified diff. Returns a unified diff and keeps the file's encoding and line endings. PREFER THIS over read+write to modify a file. In 'ask before edits' mode call dryRun=true first, show the diff, then dryRun=false once the user confirms; with auto-edit permissions go straight to dryRun=false. On no match, prefer fixing oldText from the closest-content hint. Alternatively retry that edit with similarity (0.0-1.0) for whitespace/comment drift, not different code. Do NOT re-read the file afterwards to verify: a success with a diff means the edit is on disk, a…

  • get_file_info

    Get file/directory metadata: size, timestamps, permissions, type. Use this to check file size before reading large files with read_text_file. Parameter: path (required).

  • grep_text_files

    Regex search in file contents with encoding support. PREFER THIS over built-in Grep for non-UTF-8 files. Skips .gitignore'd files (respectGitignore=false to include). Parameters: pattern (regex) or patterns (array), paths (array of files, or dirs searched recursively), caseSensitive (default true), contextBefore/After, maxMatches (default 1000), offset, include/includes, exclude/excludes, encoding. patterns finds ANY of several regexes in ONE pass — sweeping a codebase for a list of names is one call, not one per name. outputMode: "content" (default, matching lines), "files_with_matches" (path…

  • list_allowed_directories

    Returns the list of directories this server is allowed to access, normally the directory it was started in. Subdirectories are also accessible. If empty, the user needs to add paths as args in .mcp.json or set MCP_FILE_TOOLS_ALLOWED_DIRS.

  • list_directory

    List files and directories with optional glob pattern filtering (e.g., *.pas, *.dfm). Parameters: path (required), pattern (optional, default: *), sortBy ("name" default, "mtime" newest first, "size" largest first), reverse (bool, flips the order).

  • list_encodings

    Description is built at runtime.

  • manage_bom

    Detect, strip, or add Unicode BOM (Byte Order Mark). UTF-8 BOM breaks PHP/shell scripts; UTF-16 files need BOMs. Parameters: path (required), action (required: "detect"|"strip"|"add"), encoding (required for "add": utf-8, utf-16-le, utf-16-be, utf-32-le, utf-32-be).

  • manage_line_endings

    Detect or fix line endings. action="detect" reports the dominant style (crlf/lf/mixed/none), total lines, and the line numbers that disagree — use it when a file looks inconsistent. action="convert" rewrites the file to style, per code unit for UTF-16/32 and preserving its BOM; no-op if the file already matches. Parameters: path, action ("detect"|"convert"), style ("lf"|"crlf", required for convert), encoding (auto-detected, including most BOM-less UTF-16 — pass utf-16-le/utf-16-be if a very short or unusual file is misread). Example: {"path": "D:\\src\\unit1.pas", "action": "convert", "style"…

  • move_file

    Move or rename files/directories. Fails if destination exists. Parameters: source (required), destination (required).

Show 5 more tools
  • read_multiple_files

    Read multiple files concurrently with encoding support. PREFER THIS when reading several non-UTF-8 files at once. Individual failures don't stop the batch — partial results are returned. Parameters: paths (required array), encoding (optional, auto-detected per file).

  • read_text_file

    Read file with encoding auto-detection, converts to UTF-8. PREFER THIS over built-in Read for non-UTF-8 files (Cyrillic, legacy codebases). Returns totalLines and fileSizeBytes for planning the next read, and contentHash — pass that back as expectedHash on edit_file or write_file and the call fails, changing nothing, if the file moved on since you read it. Parameters: path, encoding (auto-detected), offset (1-indexed start line), limit (max lines), maxCharacters (caps output to avoid token overflow), lineNumbers (default false: prefix lines with "N<tab>", absolute numbers — use to locate lines…

  • search_files

    Recursively search for files matching a glob pattern (*.ext at any depth, **/*.ext, several ** and {a,b} alternatives allowed). Returns full paths. Skips .gitignore'd files (respectGitignore=false to include). Parameters: path (required), pattern (required), excludePatterns, maxResults (default 10000), sortBy, reverse. sortBy: "name" (default, lexical), "mtime" (newest first) or "size" (largest first); reverse flips the order. Unlike the built-in Glob there is no mtime default — pass sortBy "mtime" for newest first. With mtime or size the whole tree is ranked before the cap, so a truncated res…

  • tree

    Compact indented tree view of directory structure. PREFER THIS for directory visualization. Skips .gitignore'd files and .git (respectGitignore=false to include). Set showEncoding=true to detect and display file encodings (e.g., for auditing legacy codebases). Parameters: path (required), maxDepth (0=unlimited), maxFiles (default 1000), dirsOnly (bool), exclude (array of patterns), showEncoding (bool, shows detected encoding per file).

  • write_file

    Write file with encoding conversion from UTF-8. PREFER THIS over built-in Write for non-UTF-8 files. Use after read_text_file to keep the original encoding. Parameters: path, content, encoding (default: the existing file's detected encoding, else utf-8), bom, lineEndings, expectedHash (the contentHash of the read this rewrite is based on — the write fails and changes nothing if the file has since changed). bom: "auto" (default) writes a BOM for utf-16-*/utf-32-* targets, else keeps one only if the file already had a BOM of the same encoding; "preserve" keeps it even when the encoding changed; …

Signals

Stars
26
Forks
10
Open issues
1
Last commit
Oct 16, 2026 (12 days ago)
Last release
Oct 16, 2026 (12 days ago)

From GitHub (fetched Oct 24, 2026).

Details

Registry name
io.github.dimitar-grigorov/mcp-file-tools
Version
4.5.2
Auth
No auth
License
GPL-3.0
First seen
Oct 24, 2026
Last checked
Oct 25, 2026
Cite this page

MCP File Tools. Agent Mart. https://agentmart.dev/connectors/dimitar-grigorov-mcp-file-tools (last updated 2026-10-25)