MCP File System Server
@MarcusJellinghaus
关于 MCP File System Server
MCP Workspace Server: A secure Model Context Protocol server providing file, git, and GitHub tools for AI assistants within a sandboxed project directory.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp_server_filesystem": {
"command": "python",
"args": [
"-m",
"venv",
"venv"
]
}
}
}工具
10Lists 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 exact string matching
Moves or renames files and directories
Lists available reference projects
Lists files in a reference project
Reads files from reference projects
概览
What is MCP File System Server?
A Model Context Protocol (MCP) server that enables AI assistants (e.g., Claude via Claude Desktop) to read, write, edit, delete, and manage files within a specified project directory. All file operations are securely contained to that directory, with optional read‑only reference projects for additional context.
How to use MCP File System Server?
Install by cloning the repository and running pip install -e . in the project directory. Start the server with mcp-workspace --project-dir /path/to/project and optional arguments for reference projects, logging level, log file path, and file size limit. For Claude Desktop integration, add the server configuration to claude_desktop_config.json with the mcp-workspace command and required --project-dir argument.
Key features of MCP File System Server
- Directory listing with gitignore filtering and exclusion of
.gitfolders - Reading files with optional line ranges and line numbers
- Atomic file creation/overwrite with
save_file - Append content to existing files with
append_file - Precise text editing using exact string matching (
edit_file) - Move or rename files/directories within the project
- Read‑only access to multiple external reference projects
- Structured logging in both human‑readable and JSON formats
Use cases of MCP File System Server
- Read existing project files for analysis or summarization
- Generate and write new files based on natural language descriptions
- Make targeted edits to fix bugs or update code without rewriting entire files
- Delete temporary or unwanted files from the project directory
- Reference documentation, examples, or shared libraries from other directories
FAQ from MCP File System Server
What runtime dependencies does the MCP File System Server require?
Python 3 and pip are required. The server can be installed from source by cloning the repository and running pip install -e ..
How does the MCP File System Server ensure security?
All file operations are restricted to the main project directory specified with --project-dir. Reference projects are strictly read‑only, and all paths are validated to prevent directory traversal attacks. Gitignore filtering is applied automatically.
How can I integrate the MCP File System Server with Claude Desktop?
Add an entry to claude_desktop_config.json under mcpServers with the command mcp-workspace and appropriate arguments, including the required --project-dir path. Restart Claude Desktop to apply the change.
Can the MCP File System Server access additional read‑only directories?
Yes. Use the --reference-project argument (repeatable) in the format name=/path/to/dir to provide read‑only access to extra codebases, documentation, or configuration files.
Is there a file size limit when reading or editing files?
The server provides a check_file_size tool with a default line limit of 600 lines. This limit can be customized with the --file-size-limit argument.
文件与存储 分类下的更多 MCP 服务器
Mcp Filesystem
gabrielmaialva33A secure Model Context Protocol (MCP) server providing filesystem access within predefined directories
Google Drive MCP Server
hxie-pallasA google drive mcp servers based on Python
PDF Reader MCP Server (@shtse8/pdf-reader-mcp)
shtse8📄 The PDF intelligence layer for AI agents — Agent Document Twin, evidence-first extraction, visual crops, OCR provenance, trust reports, and benchmark-gated releases. MCP server for Claude, Cursor, VS Code, and any MCP client.
PDF Reader MCP Server (@sylphlab/pdf-reader-mcp)
sylphlab📄 The PDF intelligence layer for AI agents — Agent Document Twin, evidence-first extraction, visual crops, OCR provenance, trust reports, and benchmark-gated releases. MCP server for Claude, Cursor, VS Code, and any MCP client.
评论