MCP.so
登录

MCP Filesystem Server

@mark3labs

基本信息

分类

文件与存储

许可证

MIT

传输方式

stdio

作者

mark3labs

关于 MCP Filesystem Server

Go server implementing Model Context Protocol (MCP) for filesystem operations.

MCP Filesystem Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-filesystem-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/mark3labs/mcp-filesystem-server:latest",
        "/path/to/allowed/directory"
      ]
    }
  }
}

MCP Filesystem Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP Filesystem Server?

MCP Filesystem Server provides secure access to the local filesystem through the Model Context Protocol (MCP). It is intended for applications that support MCP and need controlled file read, write, search, and directory operations.

How to use MCP Filesystem Server?

Install via go install github.com/mark3labs/mcp-filesystem-server@latest. Start the server by specifying one or more allowed directories as arguments, for example mcp-filesystem-server /path/to/allowed/directory. It can also be used as a Go library or run in Docker. Integrate with MCP-compatible apps by adding the server to the mcpServers configuration.

Key features of MCP Filesystem Server

  • Secure access to specified directories only
  • Path validation to prevent directory traversal attacks
  • Symlink resolution with security checks
  • MIME type detection for files
  • Support for text, binary, and image files
  • Size limits for inline content and base64 encoding

Use cases of MCP Filesystem Server

  • Read file contents for analysis or summarization by an LLM
  • Write generated content to local files
  • Search for files by name or text within a directory tree
  • Manage directory structures (create, list, copy, move, delete)
  • Retrieve detailed metadata about files and directories

常见问题

1

What directories can the server access?

The server only accesses directories that are explicitly passed as arguments at startup. The `list_allowed_directories` tool returns this list.

2

How does the server ensure security?

It performs path validation to prevent directory traversal attacks and symlink resolution with security checks, ensuring operations stay within allowed directories.

3

Can I run the server in Docker?

Yes. A Docker image is available at `ghcr.io/mark3labs/mcp-filesystem-server:latest`. You can mount host volumes to allow the container to modify files on the host.

4

What file types does the server support?

It supports text, binary, and image files. MIME type detection is included.

5

Are there any size limits?

Yes, the server enforces size limits for inline content and base64 encoding, though the exact limits are not specified in the README.

评论

文件与存储 分类下的更多 MCP 服务器