MCP File System Server
@asirulnik
MCP File System Server について
概要はまだありません
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"mcp-server-filesystem-asirulnik": {
"command": "python",
"args": [
"-m",
"venv",
"venv"
]
}
}
}ツール
6Lists 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
FAQ from MCP File System Server
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.
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.
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.
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.
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.
「ファイルとストレージ」の他のコンテンツ
Sample S3 Model Context Protocol Server
aws-samplesMCP File System Server
MarcusJellinghausMCP Workspace Server: A secure Model Context Protocol server providing file, git, and GitHub tools for AI assistants within a sandboxed project directory.
File Context Server
bsmi021A Model Context Protocol (MCP) server that provides file system context to Large Language Models (LLMs). This server enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.
Google Drive MCP Server
hxie-pallasA google drive mcp servers based on Python
Storacha MCP Storage Server
storachaStoracha MCP storage server - self-sovereign data for your AI applications.
コメント