Readonly Filesystem MCP Server

Integrations

  • Implemented as a Node.js server supporting readonly filesystem operations including reading files, directory listing, file searching, and metadata retrieval.

只读文件系统 MCP 服务器

Node.js 服务器实现了模型上下文协议 (MCP),用于只读文件系统操作。克隆自modelcontextprotocol/server-filesystem

特征

  • 读取文件
  • 列出目录
  • 搜索文件
  • 获取文件元数据

注意:服务器只允许在通过args指定的目录内进行操作。

API

资源

  • file://system :文件系统操作接口

工具

  • 读取文件
    • 读取文件的完整内容
    • 输入:
      • path (字符串):要读取的文件路径
      • from (数字):可选。读取的起始行号。默认为 0。
      • to (数字):可选。结束行号。如果未设置,则读取至文件末尾。
    • 使用 UTF-8 编码读取文件内容(全部或部分)
  • 读取多个文件
    • 同时读取多个文件
    • 输入: paths (字符串[])
    • 读取失败不会停止整个操作
  • 列表目录
    • 列出带有 [FILE] 或 [DIR] 前缀的目录内容
    • 输入: path (字符串)
  • 搜索文件
    • 递归搜索文件/目录
    • 输入:
      • path (字符串):起始目录
      • pattern (字符串):搜索模式
      • excludePatterns (string[]):排除任何模式。支持 Glob 格式。
    • 不区分大小写的匹配
    • 返回匹配的完整路径
  • 获取文件信息
    • 获取详细的文件/目录元数据
    • 输入: path (字符串)
    • 返回:
      • 尺寸
      • 创建时间
      • 修改时间
      • 访问时间
      • 类型(文件/目录)
      • 权限
  • 列出允许的目录
    • 列出服务器允许访问的所有目录
    • 无需输入
    • 返回:
      • 该服务器可以读取/写入的目录

与 Claude Desktop 一起使用

将其添加到您的claude_desktop_config.json中:

注意:您可以通过将沙盒目录挂载到/projects来为服务器提供沙盒目录。添加ro标志将使服务器只读该目录。

NPX

{ "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@danielsuguimoto/readonly-server-filesystem", "/Users/username/Desktop", "/path/to/other/allowed/dir" ] } } }

执照

此 MCP 服务器采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

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

Node.js 服务器实现了模型上下文协议,用于安全的只读文件系统操作,允许 Claude 读取文件、列出目录、搜索文件以及获取指定目录内的文件元数据。

  1. 特征
    1. API
      1. 资源
      2. 工具
    2. 与 Claude Desktop 一起使用
      1. NPX
    3. 执照

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        Node.js server implementing Model Context Protocol (MCP) for filesystem operations.
        Last updated -
        24,780
        44,603
        JavaScript
        MIT License
        • Linux
        • Apple
      • -
        security
        F
        license
        -
        quality
        Node.js server implementing Model Context Protocol for filesystem operations, allowing Claude to read, write, and manipulate files and directories in specified locations.
        Last updated -
        24,780
        JavaScript
      • A
        security
        A
        license
        A
        quality
        A Node.js implementation of the Model Context Protocol that provides secure shell command execution capabilities, allowing AI models like Claude to run shell commands in a controlled environment with built-in security measures.
        Last updated -
        1
        110
        25
        JavaScript
        MIT License
        • Apple
      • -
        security
        A
        license
        -
        quality
        Node.js server implementing Model Context Protocol that enables seamless interaction between Windows and Linux distributions under WSL, allowing file operations like reading, writing, searching, and managing files across the WSL filesystem from Windows.
        Last updated -
        49
        1
        JavaScript
        MIT License

      View all related MCP servers

      ID: b03yztjzhk