Skip to main content
Glama
fast-filesystem-mcp
by efforthye

快速入门

添加到您的 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:启用调试日志输出到 stderr

  • MCP_LOG_FILE=/path/to/log.txt:将日志写入文件而不是 stderr

  • MCP_SILENT_ERRORS=true 或 SILENT_ERRORS=true:在响应中抑制错误消息

注意:默认情况下会自动抑制调试输出,以防止 Claude Desktop 中出现 JSON 解析错误。

Related MCP server: Code Buddy

新版本更新

要更新到最新版本,请按照以下步骤操作。

  1. 卸载旧版本

    npm uninstall -g fast-filesystem-mcp
  2. 清理缓存和依赖项

    npm cache clean --force
    pnpm store prune
  3. 安装最新版本

    npm install -g fast-filesystem-mcp
  4. 验证安装

    npm list -g fast-filesystem-mcp
    fast-filesystem-mcp --version

功能特性

核心文件操作

  • 快速文件读写:针对 Claude Desktop 优化,支持分块处理

  • 顺序读取:支持续传令牌,可完整读取大文件

  • 大文件处理:基于流的写入,支持任意大小的文件

  • 目录操作:全面的目录列表、创建和管理功能

  • 文件搜索:基于名称和内容的文件搜索,支持过滤

高级功能

  • 分页支持:高效处理大型目录

  • 分块读取:以可管理的块读取大文件

  • 流式写入:针对大文件的内存高效写入

  • 备份与恢复:自动创建备份和错误恢复

  • 重试逻辑:内置重试机制,确保操作可靠

性能优化

  • Claude 优化:响应大小和格式针对 Claude 进行了优化

  • 内存高效:流式操作防止内存溢出

  • 智能排除:自动排除系统文件和目录

  • 进度跟踪:大文件操作的实时进度监控

可用工具

文件操作

工具

描述

fast_read_file

支持分块读取文件

fast_read_multiple_files

支持顺序读取,可同时读取多个文件

fast_write_file

写入或修改文件

fast_large_write_file

针对大文件的流式写入

fast_get_file_info

获取详细的文件信息

复杂文件管理

工具

描述

fast_copy_file

带有高级选项的文件和目录复制

fast_move_file

安全地移动/重命名文件和目录

fast_delete_file

带有保护机制的文件和目录删除

fast_batch_file_operations

按顺序执行多个文件操作

归档管理

工具

描述

fast_compress_files

创建压缩归档 (tar, tar.gz, tar.bz2)

fast_extract_archive

带有选项的压缩归档解压

目录同步

工具

描述

fast_sync_directories

具有多种模式的高级目录同步

高级编辑工具

工具

描述

fast_edit_file

具有多种模式的精确行级文件编辑

fast_edit_block

使用精确字符串匹配的安全块编辑

fast_edit_blocks

针对多个精确更改的批量块编辑

fast_edit_multiple_blocks

在单次操作中编辑多个部分

fast_extract_lines

从文件中提取特定行或范围

目录操作

工具

描述

fast_list_directory

带分页功能的目录列表

fast_create_directory

递归创建目录

fast_get_directory_tree

获取目录树结构

搜索操作

工具

描述

fast_search_files

按名称或内容搜索文件

fast_search_code

集成 ripgrep 的高级代码搜索

fast_find_large_files

在目录中查找大文件

系统操作

工具

描述

fast_get_disk_usage

检查磁盘使用信息

fast_list_allowed_directories

列出允许访问的目录

编辑工具

精确文件编辑

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.

徽章

Listed on Spark

仓库

https://github.com/efforthye/fast-filesystem-mcp

Available Tools

25 tools
fast_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

    C2.9/5.0

    Scored across 25 tools

    Disambiguation3/5

    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.

    Naming Consistency4/5

    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.

    Tool Count3/5

    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.

    Completeness5/5

    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

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      An 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.
      15
      305
      MIT
    • A
      license
      C
      quality
      D
      maintenance
      A 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.
      28
      7
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      A 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.
      13
      48 npm
      Mulan Permissive Software , Version 2
    • A
      license
      Not graded
      quality
      D
      maintenance
      A tuned filesystem MCP server for Codex-style development, offering fast file operations, bounded output, and safe edits.
      MIT