MCP.so
ログイン

MCP File System Server

@asirulnik

基本情報

カテゴリ

ファイルとストレージ

ライセンス

MIT license

トランスポート

stdio

作者

asirulnik

MCP File System Server について

概要はまだありません

MCP File System Server の設定

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

{
  "mcpServers": {
    "mcp-server-filesystem-asirulnik": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        "venv"
      ]
    }
  }
}

MCP File System Server のツール

6

Lists files and directories in the project directory

Reads the contents of a file

Creates or overwrites files atomically

Adds content to existing files

Removes files from the filesystem

Makes selective edits using pattern matching

概要

What is MCP File System Server?

MCP File System Server is a simple Model Context Protocol (MCP) server that provides file system operations. It enables AI assistants like Claude to read, write, update, and delete files within a specified project directory, securely containing all operations.

How to use MCP File System Server?

Install by cloning the repository, creating a virtual environment, and running pip install -e .. Start the server with python -m src.main --project-dir /path/to/project (required argument). Optionally set log level and log file path. For integration with Claude Desktop or VSCode/Cline, configure the server in the respective MCP settings JSON file.

Key features of MCP File System Server

  • List directory contents with .gitignore filtering
  • Read file contents as string
  • Save files atomically with full content
  • Append content to existing files only
  • Delete files irreversibly within project directory
  • Edit files using pattern matching with dry-run support
  • Structured logging with human-readable and JSON formats

Use cases of MCP File System Server

  • Read existing project code for analysis and recommendations
  • Write new files with AI-generated content
  • Make selective edits to code without rewriting entire files
  • Delete temporary or obsolete files
  • Debug and fix issues by modifying files in place

よくある質問

1

What runtime does MCP File System Server require?

Python is required. The recommended setup uses a virtual environment and installs dependencies via `pip install -e .`. No other external services are needed.

2

How are file operations secured?

All paths are normalized and validated to remain within the specified project directory. Path traversal attacks are prevented, and writes are atomic to avoid data corruption. Delete operations are also restricted to the project directory.

3

What tools does MCP File System Server expose?

It exposes six tools: `list_directory`, `read_file`, `save_file`, `append_file`, `delete_this_file`, and `edit_file`. Each tool has specific parameters documented in the README.

4

How do I integrate MCP File System Server with Claude Desktop or VSCode/Cline?

You add a configuration block to the respective settings JSON file (e.g., `claude_desktop_config.json` for Claude Desktop or `cline_mcp_settings.json` for VSCode/Cline), specifying the Python executable, script path, project directory, and optional auto-approve list.

5

Can I auto-approve certain operations for convenience?

Yes, the `autoApprove` array in the configuration allows you to skip user approval for selected tools. The README recommends auto-approving only read-only operations like `list_directory` and `read_file` for better security.

コメント

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