- Home
- MCP servers
- MCP File Tools
MCP File Tools
- go
5
GitHub Stars
go
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"dimitar-grigorov-mcp-file-tools": {
"command": "go",
"args": [
"run",
"./cmd/mcp-file-tools",
"/path/to/project"
],
"env": {
"GO111MODULE": "on",
"MCP_DEFAULT_ENCODING": "utf-8",
"MCP_MEMORY_THRESHOLD": "67108864"
}
}
}
}MCP File Tools enables reading, writing, and manipulating files across legacy encodings with automatic detection and conversion. It provides a suite of tools designed to keep data intact when working with non-UTF-8 text, making it ideal for Delphi/Pascal projects, legacy VB6 apps, old PHP/HTML sites, and non-UTF-8 configuration files.
How to use
Install and run the MCP File Tools server locally, then interact with it through a compatible MCP client. You can perform operations such as reading files with proper encoding, converting between encodings, editing lines, listing directories, and searching for content across a project while ensuring data integrity for legacy encodings.
How to install
Prerequisites: a Go 1.23+ toolchain is recommended for building or running the development flow. You can also run pre-built binaries on supported platforms if you prefer to avoid compiling.
Go-based run (development/debug flow) start command is shown below. Replace /path/to/project with your target directory when testing.
# Start the MCP server from source for a specific project path
go run ./cmd/mcp-file-tools /path/to/project
Additional setup notes
If you plan to use tooling integrations, you may configure your MCP client to point at the local Go runtime or at a pre-built binary if you prefer. For debugging and testing, you can use the MCP Inspector or other debugging utilities to exercise individual tools and verify encoding handling.
Available tools
read_text_file
Read a file with automatic encoding detection and conversion so you can obtain UTF-8 content or your preferred encoding.
read_multiple_files
Read several files concurrently with proper encoding handling to speed up batch reads.
write_file
Write content to a file using a specified encoding, ensuring data integrity for legacy encodings.
edit_file
Perform line-based edits with diff previews and whitespace-flexible matching to minimize unintended changes.
copy_file
Copy a file to a new location while preserving content and metadata.
delete_file
Delete a file from the filesystem in a controlled manner.
list_directory
Browse directories with optional pattern filtering to locate relevant files.
tree
Display a compact, indented tree view of a directory structure for quick navigation.
directory_tree
Get a recursive tree view as JSON (deprecated; use tree).
search_files
Recursively search for files matching glob patterns across directories.
grep_text_files
Regex search within file contents with encoding support to find text efficiently.
detect_encoding
Auto-detect the encoding of a given file with a confidence score.
convert_encoding
Convert a file's encoding from one charset to another.
detect_line_endings
Identify the line ending style used in a file (CRLF, LF, or mixed).
list_encodings
Show all supported encodings available for read and write operations.
get_file_info
Retrieve metadata about files and directories.
create_directory
Create directories recursively, equivalent to mkdir -p.
move_file
Move or rename files and directories.
list_allowed_directories
Show directories that your MCP client is allowed to access.