Skip to main content
Glama

Filesystem MCP Server

by mark3labs

文件系统 MCP 服务器

Go 服务器为文件系统操作实现模型上下文协议 (MCP)。

特征

  • 读/写文件
  • 创建/列出/删除目录
  • 移动文件/目录
  • 搜索文件
  • 获取文件元数据
  • 生成目录树结构

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

API

资源

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

工具

  • 读取文件
    • 读取文件的完整内容
    • 输入: path (字符串)
    • 使用 UTF-8 编码读取完整的文件内容
  • 读取多个文件
    • 同时读取多个文件
    • 输入: paths (字符串[])
    • 读取失败不会停止整个操作
  • 写入文件
    • 创建新文件或覆盖现有文件(请谨慎操作)
    • 输入:
      • path (字符串):文件位置
      • content (字符串):文件内容
  • 创建目录
    • 创建新目录或确保其存在
    • 输入: path (字符串)
    • 如果需要,创建父目录
    • 如果目录存在,则静默成功
  • 列表目录
    • 列出带有 [FILE] 或 [DIR] 前缀的目录内容
    • 输入: path (字符串)
  • 移动文件
    • 移动或重命名文件和目录
    • 输入:
      • source (字符串)
      • destination (字符串)
    • 如果目标存在则失败
  • 搜索文件
    • 递归搜索文件/目录
    • 输入:
      • path (字符串):起始目录
      • pattern (字符串):搜索模式
    • 不区分大小写的匹配
    • 返回匹配的完整路径
  • 获取文件信息
    • 获取详细的文件/目录元数据
    • 输入: path (字符串)
    • 返回:
      • 尺寸
      • 创建时间
      • 修改时间
      • 访问时间
      • 类型(文件/目录)
      • 权限
    • 返回目录结构的分层 JSON 表示
    • 输入:
      • path (字符串):要遍历的目录(必需)
      • depth (数字):遍历的最大深度(默认值:3)
      • follow_symlinks (布尔值):是否跟随符号链接(默认值:false)
    • 返回带有文件/目录层次结构的格式化 JSON
    • 包括文件元数据(名称、路径、大小、修改时间)
  • 列出允许的目录
    • 列出服务器允许访问的所有目录
    • 无需输入
    • 返回:
      • 该服务器可以读取/写入的目录

与 Claude Desktop 一起使用

安装服务器

go install github.com/mark3labs/mcp-filesystem-server

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

{ "mcpServers": { "filesystem": { "command": "mcp-filesystem-server", "args": [ "/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.

Go 服务器为文件系统操作实现模型上下文协议 (MCP)。

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

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          Node.js server implementing Model Context Protocol (MCP) for filesystem operations.
          Last updated -
          39,735
          51,954
          Python
          MIT License
          • Linux
          • Apple
        • -
          security
          A
          license
          -
          quality
          godoc-mcp is a Model Context Protocol (MCP) server that provides efficient access to Go documentation. It helps LLMs understand Go projects by providing direct access to package documentation without needing to read entire source files.
          Last updated -
          24
          Go
          MIT License
        • -
          security
          A
          license
          -
          quality
          what is go-mcp-postgres? go-mcp-postgres is a Model Context Protocol (MCP) server designed for interacting with Postgres databases, allowing for easy CRUD operations and automation without the need for a Node.js or Python environment.
          Last updated -
          4
          Go
          MIT License
          • Linux
          • Apple
        • -
          security
          A
          license
          -
          quality
          This is a Model Context Protocol (MCP) server implemented in Go, providing a tool to analyze Go pprof performance profiles.
          Last updated -
          4
          Go
          MIT License
          • Linux
          • Apple

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/mark3labs/mcp-filesystem-server'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server