MCP.so
ログイン

MCP Filesystem Server

@mark3labs

MCP Filesystem Server について

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

基本情報

カテゴリ

ファイルとストレージ

ライセンス

MIT

ランタイム

go

トランスポート

stdio

公開者

mark3labs

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

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

ツール

ツールは検出されませんでした

ツールは 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

FAQ from MCP Filesystem Server

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.

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.

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.

What file types does the server support?

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

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.

コメント

「ファイルとストレージ」の他のコンテンツ