fast-filesystem-mcp
快速入门
添加到您的 Claude Desktop 配置中。
基础设置
{
"mcpServers": {
"fast-filesystem": {
"command": "npx",
"args": ["-y", "fast-filesystem-mcp"]
}
}
}启用备份文件
{
"mcpServers": {
"fast-filesystem": {
"command": "npx",
"args": ["-y", "fast-filesystem-mcp"],
"env": {
"CREATE_BACKUP_FILES": "true"
}
}
}
}备份配置
控制备份文件的创建行为。
CREATE_BACKUP_FILES=false(默认):禁用备份文件创建以减少冗余CREATE_BACKUP_FILES=true:在修改前创建备份文件
注意:备份文件会带有时间戳(例如 file.txt.backup.1755485284402),以防止编辑过程中数据丢失。
调试和日志配置
MCP 服务器使用一种安全日志系统,可防止 JSON-RPC 通信错误。
DEBUG_MCP=true或MCP_DEBUG=true:启用调试日志输出到 stderrMCP_LOG_FILE=/path/to/log.txt:将日志写入文件而不是 stderrMCP_SILENT_ERRORS=true或SILENT_ERRORS=true:在响应中抑制错误消息
注意:默认情况下会自动抑制调试输出,以防止 Claude Desktop 中出现 JSON 解析错误。
Related MCP server: Code Buddy
新版本更新
要更新到最新版本,请按照以下步骤操作。
卸载旧版本
npm uninstall -g fast-filesystem-mcp清理缓存和依赖项
npm cache clean --force pnpm store prune安装最新版本
npm install -g fast-filesystem-mcp验证安装
npm list -g fast-filesystem-mcp fast-filesystem-mcp --version
功能特性
核心文件操作
快速文件读写:针对 Claude Desktop 优化,支持分块处理
顺序读取:支持续传令牌,可完整读取大文件
大文件处理:基于流的写入,支持任意大小的文件
目录操作:全面的目录列表、创建和管理功能
文件搜索:基于名称和内容的文件搜索,支持过滤
高级功能
分页支持:高效处理大型目录
分块读取:以可管理的块读取大文件
流式写入:针对大文件的内存高效写入
备份与恢复:自动创建备份和错误恢复
重试逻辑:内置重试机制,确保操作可靠
性能优化
Claude 优化:响应大小和格式针对 Claude 进行了优化
内存高效:流式操作防止内存溢出
智能排除:自动排除系统文件和目录
进度跟踪:大文件操作的实时进度监控
可用工具
文件操作
工具 | 描述 |
| 支持分块读取文件 |
| 支持顺序读取,可同时读取多个文件 |
| 写入或修改文件 |
| 针对大文件的流式写入 |
| 获取详细的文件信息 |
复杂文件管理
工具 | 描述 |
| 带有高级选项的文件和目录复制 |
| 安全地移动/重命名文件和目录 |
| 带有保护机制的文件和目录删除 |
| 按顺序执行多个文件操作 |
归档管理
工具 | 描述 |
| 创建压缩归档 (tar, tar.gz, tar.bz2) |
| 带有选项的压缩归档解压 |
目录同步
工具 | 描述 |
| 具有多种模式的高级目录同步 |
高级编辑工具
工具 | 描述 |
| 具有多种模式的精确行级文件编辑 |
| 使用精确字符串匹配的安全块编辑 |
| 针对多个精确更改的批量块编辑 |
| 在单次操作中编辑多个部分 |
| 从文件中提取特定行或范围 |
目录操作
工具 | 描述 |
| 带分页功能的目录列表 |
| 递归创建目录 |
| 获取目录树结构 |
搜索操作
工具 | 描述 |
| 按名称或内容搜索文件 |
| 集成 ripgrep 的高级代码搜索 |
| 在目录中查找大文件 |
系统操作
工具 | 描述 |
| 检查磁盘使用信息 |
| 列出允许访问的目录 |
编辑工具
精确文件编辑
fast-filesystem MCP 现在包含用于源代码和文本文件的强大编辑工具。
fast_edit_file - 单块编辑
支持多种编辑模式。
replace:替换文本或整行
replace_range:一次替换多行
insert_before:在指定行之前插入内容
insert_after:在指定行之后插入内容
delete_line:删除特定行
{
"tool": "fast_edit_file",
"arguments": {
"path": "/path/to/file.js",
"mode": "replace",
"line_number": 10,
"new_text": "const newVariable = 'updated value';",
"backup": true
}
}fast_edit_multiple_blocks - 批量编辑
在单次操作中编辑文件的多个部分。
{
"tool": "fast_edit_multiple_blocks",
"arguments": {
"path": "/path/to/file.js",
"edits": [
{
"mode": "replace",
"old_text": "oldFunction()",
"new_text": "newFunction()"
},
{
"mode": "insert_after",
"line_number": 5,
"new_text": "// Added comment"
}
],
"backup": true
}
}fast_extract_lines - 行提取
按行号、范围或模式提取特定行。
{
"tool": "fast_extract_lines",
"arguments": {
"path": "/path/to/file.js",
"pattern": "function.*",
"context_lines": 2
}
}fast_search_and_replace - 高级替换
支持正则表达式的强大搜索和替换。
{
"tool": "fast_search_and_replace",
"arguments": {
"path": "/path/to/file.js",
"search_pattern": "console\\.log\\(.*\\)",
"replace_text": "logger.info($1)",
"use_regex": true,
"max_replacements": 10,
"backup": true
}
}编辑功能
自动备份:在修改前创建备份
错误恢复:失败时从备份恢复
行级操作:对特定行进行精确控制
模式匹配:支持正则表达式
批量操作:单次事务中进行多次编辑
上下文提取:提取带有周围上下文的行
大文件写入
fast_large_write_file流式处理:分块写入文件以防止内存问题
备份:在覆盖前自动创建备份
验证:写入后验证文件完整性
重试逻辑:失败时自动重试,并采用指数退避策略
进度跟踪:实时监控写入进度
许可证
Apache 2.0
Copyright 2025 efforthye
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
徽章
仓库
Available Tools
25 toolsfast_batch_file_operationsC
Performs batch operations on multiple files
Inputs: operations (required), stop_on_error, dry_run, create_backup.
fast_compress_filesC
Compresses files or directories
Inputs: paths (required), output_path (required), format, compression_level, +1 more.
fast_copy_fileC
Copies a file or directory
Inputs: source (required), destination (required), overwrite, preserve_timestamps, +2 more.
fast_create_directoryC
Creates a directory
Inputs: path (required), recursive.
fast_delete_fileC
Deletes a file or directory
Inputs: path (required), recursive, force, backup_before_delete, +1 more.
fast_edit_blockC
Precise block editing: safely replace exact matches (desktop-commander style)
Inputs: path (required), old_text (required), new_text (required), expected_replacements, +4 more.
fast_edit_blocksC
Processes multiple precise block edits at once (array of fast_edit_block)
Inputs: path (required), edits (required), backup.
fast_edit_multiple_blocksC
Edits multiple parts of a file at once
Inputs: path (required), edits (required), backup.
fast_extract_archiveC
Extracts an archive file
Inputs: archive_path (required), extract_to, overwrite, create_dirs, +2 more.
fast_extract_linesD
Extracts specific lines from a file
Inputs: path (required), line_numbers, start_line, end_line, +2 more.
fast_find_large_filesC
Finds large files
Inputs: path (required), min_size, max_results.
fast_get_directory_treeC
Gets the directory tree structure
Inputs: path (required), max_depth, show_hidden, include_files.
fast_get_disk_usageC
Gets disk usage information
Inputs: path.
fast_get_file_infoB
Gets detailed information about a file or directory
Inputs: path (required).
fast_large_write_fileA
Reliably writes large files (with streaming, retry, backup, and verification features)
Inputs: path (required), content (required), encoding, create_dirs, +6 more.
fast_list_allowed_directoriesB
Lists the allowed directories
Inputs: no named parameters.
fast_list_directoryB
Lists the contents of a directory (with auto-chunking and pagination support)
Inputs: path (required), page, page_size, pattern, +5 more.
fast_move_fileB
Moves or renames a file or directory
Inputs: source (required), destination (required), overwrite, create_dirs, +1 more.
fast_read_fileB
Reads a file (with auto-chunking support)
Inputs: path (required), start_offset, max_size, line_start, +4 more.
fast_read_multiple_filesB
Reads the content of multiple files simultaneously (supports sequential reading)
Inputs: paths (required), continuation_tokens, auto_continue, chunk_size.
fast_safe_editB
Safe smart editing: Detects risks and provides interactive confirmation
Inputs: path (required), old_text (required), new_text (required), safety_level, +2 more.
fast_search_codeB
Searches for code (ripgrep-style) - provides auto-chunking, line numbers, and context
Inputs: path (required), pattern (required), file_pattern, context_lines, +6 more.
fast_search_filesB
Searches for files (by name/content) - supports auto-chunking, regex, context, and line numbers
Inputs: path (required), pattern (required), content_search, case_sensitive, +6 more.
fast_sync_directoriesC
Synchronizes two directories
Inputs: source_dir (required), target_dir (required), sync_mode, delete_extra, +3 more.
fast_write_fileC
Writes or modifies a file (provides emoji guidelines)
Inputs: path (required), content (required), encoding, create_dirs, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 25 tools
Most tools are distinct, but there is notable overlap between fast_edit_block, fast_safe_edit, fast_edit_multiple_blocks, and fast_edit_blocks—all handle editing and could confuse an agent. Similarly, fast_search_files and fast_search_code have overlapping purposes despite different descriptions.
The fast_ prefix is applied consistently and most tools follow a verb_noun pattern (e.g., fast_read_file, fast_create_directory). Minor deviations like fast_edit_blocks vs fast_edit_multiple_blocks and fast_batch_file_operations are slightly inconsistent but still readable.
25 tools is at the upper boundary of what is reasonable for a filesystem server. The count feels heavy because several tools overlap (multiple edit variants, two search tools, multiple read/write variants), but each has a plausible use case.
The tool surface covers the full filesystem lifecycle: read, write, edit, list, search, create, copy, move, delete, batch operations, compression, sync, and disk usage. There are no obvious dead ends for common file operations.
Maintenance
Related MCP Connectors
Cloud-hosted MCP server for durable AI memory
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Hosted MySQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.15305MIT
- AlicenseCqualityDmaintenanceA comprehensive MCP server that provides AI assistants with tools for file system management, Git integration, and shell command execution. It features specialized code utilities for analysis, formatting, and linting to enhance development workflows within Claude Desktop.287MIT
- AlicenseAqualityCmaintenanceA comprehensive MCP server that enables AI models to perform local file operations, command execution, and task management across multiple platforms. It features advanced capabilities like row-level file editing, directory searching, and system monitoring with built-in security filters.1348 npmMulan Permissive Software , Version 2
- AlicenseNot gradedqualityDmaintenanceA tuned filesystem MCP server for Codex-style development, offering fast file operations, bounded output, and safe edits.MIT