Local Files MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Local Files MCP Server show me the contents of ~/projects/notes.txt"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Local Files MCP Server
A Model Context Protocol (MCP) server for managing local files. Provides tools for reading, writing, analyzing, searching, and organizing files with built-in safety protections.
Features
📖 Read/Write files - UTF-8 and base64 support
📂 Directory operations - List, organize, search
🔍 Content search - Regex pattern matching
🔎 Find duplicates - MD5 hash comparison
📊 File analysis - Size, MIME type, line counts
🛡️ Safety protections - Configurable allowed/protected paths
🖥️ Cross-platform - macOS, Linux, Windows
Related MCP server: Local AI Files MCP
Installation
NPX
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"local-files": {
"command": "npx",
"args": ["-y", "fsorg"]
}
}
}That's it! Claude Desktop will automatically download and run the MCP server via npx.
Alternative: Install from source
git clone https://github.com/argtobias/fsorg.git
cd fsorg
pnpm install
pnpm buildThen configure Claude Desktop:
{
"mcpServers": {
"local-files": {
"command": "node",
"args": ["/path/to/fsorg/dist/index.js"]
}
}
}Safety Configuration
Create a config file at:
-- macOS/Linux: ~/.config/localfiles-org/config.json
-- Windows: %LOCALAPPDATA%\localfiles-org\config.json
{
"allowedPaths": [
"~/projects",
"~/Development",
"~/workspace",
"/tmp"
],
"additionalProtectedPaths": [
"~/my-important-folder"
],
"additionalProtectedPatterns": [
"^backup",
"\\.bak$"
]
}Configuration Options
Option | Description | Default |
| Paths where delete operations are permitted |
|
| Extra paths to protect from deletion |
|
| Regex patterns for protected file names |
|
Always Protected (cannot be overridden)
System paths:
/,/etc,/usr,/bin,/System, etc.User paths:
~,~/Documents,~/Desktop,~/Downloads,~/.sshPatterns:
.git,.env,.ssh, credentials, secrets
Available Tools
File Operations
Tool | Description |
| Read file contents (UTF-8 or base64) |
| Write content to file (UTF-8 or base64) |
| Safely delete a file with protection checks |
| Move file with optional empty directory cleanup |
| Get file stats (size, MIME, lines, words) |
Directory Operations
Tool | Description |
| List files with optional recursion and glob patterns |
| Safely delete directory (requires confirmation for recursive) |
| Organize files into folders by extension/date/size |
Search Operations
Tool | Description |
| Search for regex patterns in file contents |
| Find duplicate files by MD5 hash |
| Sort lines in a file |
Batch Operations
Tool | Description |
| Batch rename files using regex patterns |
Usage Examples
Read a file
{
"tool": "read_file",
"arguments": {
"path": "~/projects/myfile.txt"
}
}Find and delete duplicates
{
"tool": "find_duplicates",
"arguments": {
"path": "~/projects/images",
"recursive": true
}
}Safely delete with preview
{
"tool": "delete_file",
"arguments": {
"path": "~/projects/temp/old-file.txt",
"preview": true
}
}Organize files by extension
{
"tool": "organize_by_type",
# Local Files MCP Server
Simple MCP server for safe local file operations: read, write, search, organize and protected delete.
## Quick install
Run via npx (recommended for Claude Desktop):
```json
{
"mcpServers": {
"local-files": {
"command": "npx",
"args": ["-y", "fsorg"]
}
}
}From source:
git clone https://github.com/argtobias/fsorg.git
cd fsorg
pnpm install
pnpm buildConfiguration
Create user config at:
macOS/Linux:
~/.config/localfiles-org/config.jsonWindows:
%LOCALAPPDATA%\\localfiles-org\\config.json
Minimal config example:
{
"allowedPaths": ["~/projects", "~/Development"],
"additionalProtectedPaths": [],
"additionalProtectedPatterns": []
}Safety
Only operations inside
allowedPathscan delete files.System and user-critical paths are always protected.
Pattern-based protection (e.g.
.git,.env) is enforced.
Usage examples
Read a file:
{ "tool": "read_file", "arguments": { "path": "~/projects/myfile.txt" } }Find duplicates:
{ "tool": "find_duplicates", "arguments": { "path": "~/projects/images", "recursive": true } }Delete with preview (safe):
{ "tool": "delete_file", "arguments": { "path": "~/projects/temp/old.txt", "preview": true } }Development
pnpm install
pnpm build
pnpm devLicense
ISC
Available Tools
12 toolsanalyze_fileC
Analyze a file and return statistics: size, MIME type, line/word/character counts, and dates.
Inputs: path (required).
delete_directoryA
Safely delete a directory with protection checks. Only works within allowed paths. Recursive deletion requires confirmRecursive=true. Use preview=true to see what will be deleted first.
Inputs: path (required), preview, recursive, confirmRecursive.
delete_fileA
Safely delete a file with protection checks. Only works within allowed paths. Use preview=true to see what will be deleted first.
Inputs: path (required), preview, cleanupEmpty.
find_duplicatesB
Find duplicate files by comparing MD5 hashes. Returns groups of identical files.
Inputs: path (required), recursive.
list_directoryB
List files and directories in a path. Supports recursive listing and glob pattern filtering.
Inputs: path (required), recursive, pattern.
move_fileA
Move a file from source to destination. Creates parent directories if needed. Optionally cleans up empty parent directories.
Inputs: source (required), destination (required), cleanupEmpty.
organize_by_typeA
Organize files into subdirectories by extension, date, or size category. Automatically cleans up empty source directory.
Inputs: source (required), destination (required), criteria (required), cleanupEmpty.
read_fileA
Read the contents of a file. Can read as UTF-8 text or base64 encoded. Optionally read only the first N lines.
Inputs: path (required), encoding, lines.
rename_filesC
Batch rename files in a directory using regex pattern matching. Supports preview mode.
Inputs: path (required), pattern (required), replacement (required), preview.
search_contentA
Search for a pattern (regex) in file contents. Returns matches with line numbers and context.
Inputs: path (required), pattern (required), recursive.
sort_file_contentB
Sort the lines of a file. Supports ascending/descending, numeric sorting, and duplicate removal.
Inputs: path (required), order, numeric, unique.
write_fileA
Write content to a file. Supports UTF-8 or base64 encoding. Can overwrite or append. Creates parent directories if needed.
Inputs: path (required), content (required), encoding, mode.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose: reading, writing, deleting, moving, listing, analyzing, searching, sorting, renaming, finding duplicates, and organizing files or directories. No two tools overlap in functionality.
All tool names follow a consistent verb_noun pattern (e.g., read_file, delete_directory, search_content), making it easy for an agent to predict tool names and purposes.
With 12 tools, the server provides a well-scoped set of file and directory operations. The number is appropriate for the domain, covering essential actions without being overwhelming.
The tool set covers most common file operations: CRUD, listing, searching, analysis, organization, and batch operations. A minor gap is the lack of a copy_file tool, but move_file can serve a similar role in many cases.
Maintenance
Related MCP Connectors
Browse and manage files in your Moxt AI workspace from any MCP client.
Persistent file storage for AI agents via MCP and curl. Upload, download, and version files.
Persistent file storage for AI agents. Save files over MCP, get a link a human can open.
Project management MCP for AI agents with safe task reads and writes.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables file system operations such as listing, reading, and creating files within a scoped local project directory. It provides a secure way to manage local files through standardized MCP tools built with FastMCP.-
- AlicenseNot gradedqualityDmaintenanceProvides safe, allowlisted local filesystem access for MCP-compatible AI clients, enabling directory listing, file reading/writing (with byte limits), and text search while blocking paths outside approved roots and symlink escapes.MIT
- FlicenseAqualityDmaintenanceEnables saving and managing files in a sandboxed local folder via MCP, with tools for listing, reading, writing, appending, searching, moving, and deleting files and directories.10-
- FlicenseNot gradedqualityAmaintenanceProvides a sandboxed filesystem API for AI agents, enabling natural-language file read, write, append, delete, move, list, create, and metadata operations through MCP tools.1-