loading…
Search for a command to run...
loading…
Provides safe local file operations through MCP, including reading, writing, searching, organizing, and protected deletion with configurable path restrictions.
Provides safe local file operations through MCP, including reading, writing, searching, organizing, and protected deletion with configurable path restrictions.
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.
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.
git clone https://github.com/argtobias/fsorg.git
cd fsorg
pnpm install
pnpm build
Then configure Claude Desktop:
{
"mcpServers": {
"local-files": {
"command": "node",
"args": ["/path/to/fsorg/dist/index.js"]
}
}
}
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$"
]
}
| Option | Description | Default |
|---|---|---|
allowedPaths |
Paths where delete operations are permitted | ~/projects, ~/dev, etc. |
additionalProtectedPaths |
Extra paths to protect from deletion | [] |
additionalProtectedPatterns |
Regex patterns for protected file names | [] |
/, /etc, /usr, /bin, /System, etc.~, ~/Documents, ~/Desktop, ~/Downloads, ~/.ssh.git, .env, .ssh, credentials, secrets| Tool | Description |
|---|---|
read_file |
Read file contents (UTF-8 or base64) |
write_file |
Write content to file (UTF-8 or base64) |
delete_file |
Safely delete a file with protection checks |
move_file |
Move file with optional empty directory cleanup |
analyze_file |
Get file stats (size, MIME, lines, words) |
| Tool | Description |
|---|---|
list_directory |
List files with optional recursion and glob patterns |
delete_directory |
Safely delete directory (requires confirmation for recursive) |
organize_by_type |
Organize files into folders by extension/date/size |
| Tool | Description |
|---|---|
search_content |
Search for regex patterns in file contents |
find_duplicates |
Find duplicate files by MD5 hash |
sort_file_content |
Sort lines in a file |
| Tool | Description |
|---|---|
rename_files |
Batch rename files using regex patterns |
{
"tool": "read_file",
"arguments": {
"path": "~/projects/myfile.txt"
}
}
{
"tool": "find_duplicates",
"arguments": {
"path": "~/projects/images",
"recursive": true
}
}
{
"tool": "delete_file",
"arguments": {
"path": "~/projects/temp/old-file.txt",
"preview": true
}
}
{
"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 build
Create user config at:
macOS/Linux: ~/.config/localfiles-org/config.json
Windows: %LOCALAPPDATA%\\localfiles-org\\config.json
Minimal config example:
{
"allowedPaths": ["~/projects", "~/Development"],
"additionalProtectedPaths": [],
"additionalProtectedPatterns": []
}
allowedPaths can delete files..git, .env) is enforced.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 } }
pnpm install
pnpm build
pnpm dev
ISC
Выполни в терминале:
claude mcp add local-files-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.