Filesystem MCP Server

by ai-yliu

文件系统 MCP 服务器

为 Claude AI 提供文件系统操作的模型上下文协议 (MCP) 服务器。

特征

该 MCP 服务器提供以下文件系统操作:

  1. read_file :读取文件的完整内容
    • 输入: path (字符串)
    • 使用 UTF-8 编码读取完整的文件内容
  2. read_multiple_files :同时读取多个文件
    • 输入: paths (字符串[])
    • 读取失败不会停止整个操作
  3. write_file :创建新文件或覆盖现有文件
    • 输入:
      • path (字符串):文件位置
      • content (字符串):文件内容
  4. create_directory :创建新目录或确保其存在
    • 输入: path (字符串)
    • 如果需要,创建父目录
    • 如果目录存在,则静默成功
  5. list_directory :列出带有 [FILE] 或 [DIR] 前缀的目录内容
    • 输入: path (字符串)
  6. move_file :移动或重命名文件和目录
    • 输入:
      • source (字符串)
      • destination (字符串)
    • 如果目标存在则失败
  7. search_files :递归搜索文件/目录
    • 输入:
      • path (字符串):起始目录
      • pattern (字符串):搜索模式
    • 不区分大小写的匹配
    • 返回匹配的完整路径
  8. get_file_info :获取详细的文件/目录元数据
    • 输入: path (字符串)
    • 返回:
      • 尺寸
      • 创建时间
      • 修改时间
      • 访问时间
      • 类型(文件/目录)
      • 权限
  9. list_allowed_directories :列出服务器允许访问的所有目录
    • 无需输入
    • 返回此服务器可以读取/写入的目录

安全

服务器仅允许在通过命令行参数指定的目录内进行操作。

安装

  1. 克隆此存储库
  2. 安装依赖项: npm install
  3. 构建项目: npm run build

用法

使用一个或多个允许的目录运行服务器:

node build/index.js /path/to/allowed/dir1 /path/to/allowed/dir2

MCP 配置

将服务器添加到您的 MCP 配置文件:

{ "mcpServers": { "filesystem-server": { "command": "node", "args": [ "/path/to/filesystem-server/build/index.js", "/path/to/allowed/dir1", "/path/to/allowed/dir2" ], "disabled": false, "autoApprove": [] } } }

执照

国际学习中心

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

MCP 服务器允许 Claude AI 执行文件系统操作,包括读取、写入、列出、移动文件以及在指定的允许路径内搜索目录。

  1. Features
    1. Security
      1. Installation
        1. Usage
          1. MCP Configuration
            1. License

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                An MCP server that provides access to project files and their contents, allowing users to retrieve file data from specified project directories with error handling and configuration options.
                Last updated -
                1
                4
                TypeScript
                MIT License
              • A
                security
                A
                license
                A
                quality
                An MCP server that provides tools for reading, writing, and editing files on the local filesystem.
                Last updated -
                1
                1,200
                Python
                Apache 2.0
                • Apple
              • -
                security
                A
                license
                -
                quality
                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.
                Last updated -
                125
                Python
                MIT License
                • Apple
                • Linux
              • A
                security
                F
                license
                A
                quality
                A MCP server that allows searching for files in the filesystem based on path fragments, returning file metadata including name, path, size, and creation date.
                Last updated -
                1
                Python
                • Apple

              View all related MCP servers

              ID: tsjbgy73p2