Secure, sandboxed filesystem access enabling agents to list, read, write, create, move, delete, search files and directories within allowed paths.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install filesystem-mcp或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install filesystem-mcp⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/filesystem-mcp/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: filesystem-mcp description: Official Filesystem MCP Server for secure file operations with configurable access controls. Read, write, create, delete, move, search files and directories. List directory contents, get file info, edit text files, and manage file permissions. Built-in security sandbox prevents unauthorized access. Essential for agents working with local files, project management, log analysis, content generation, and file organization. Use when agents need filesystem access, file manipulation, directory navigation, or content management. ---
> Secure File Operations for AI Agents
Official MCP reference implementation providing safe, sandboxed filesystem access with fine-grained permission controls.
Most agent tasks involve files:
Pure implementation using Node.js built-in modules. No external API dependencies or rate limits.
# Official reference implementation
npm install -g @modelcontextprotocol/server-filesystem
# Or build from source
git clone https://github.com/modelcontextprotocol/servers
cd servers/src/filesystem
npm install
npm run build
Add to your MCP client config:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/yourname/Documents",
"/Users/yourname/Projects"
]
}
}
}
Arguments = allowed directories (one or more paths)
Read-Only Access:
"args": ["--read-only", "/path/to/docs"]
Full Access (default):
"args": ["/path/to/workspace"]
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/dev/projects",
"/Users/dev/workspace"
]
}
}
}
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"--read-only",
"/Users/docs/knowledge-base"
]
}
}
}
list_directory)Agent: "What files are in my Projects folder?"
Agent: "Show contents of /workspace/src"
Returns:
create_directory)Agent: "Create a new folder called 'components'"
Agent: "Make directory /workspace/tests"
move_file)Agent: "Rename old-name.txt to new-name.txt"
Agent: "Move report.pdf to /Documents/Reports/"
read_file)Agent: "Read the contents of config.json"
Agent: "Show me the README.md file"
Supports:
write_file)Agent: "Create a file called notes.txt with meeting notes"
Agent: "Write the generated code to src/index.ts"
edit_file)Agent: "Replace 'version: 1.0' with 'version: 2.0' in package.json"
Agent: "Add a new function to utils.js"
get_file_info)Agent: "When was report.pdf last modified?"
Agent: "What's the size of data.csv?"
Returns:
search_files)Agent: "Find all Python files in the project"
Agent: "Search for files containing 'API_KEY'"
Search by:
delete_file)Agent: "Delete the temporary log files"
Agent: "Remove old-backup.zip"
Safety:
Human: "Create a React component for a login form"
Agent:
1. create_directory("/workspace/components")
2. write_file("/workspace/components/LoginForm.tsx", generated_code)
3. write_file("/workspace/components/LoginForm.test.tsx", test_code)
4. "Created LoginForm component at components/LoginForm.tsx"
Human: "Analyze error logs and summarize issues"
Agent:
1. list_directory("/var/log/app")
2. read_file("/var/log/app/error.log")
3. search_files(pattern="ERROR", path="/var/log/app")
4. generate_summary()
5. write_file("/reports/error-summary.md", summary)
Human: "Organize my documents by type"
Agent:
1. list_directory("/Documents")
2. For each file:
- get_file_info(file)
- Determine file type
- create_directory("/Documents/[type]")
- move_file(file, destination_folder)
Human: "Generate API documentation from code comments"
Agent:
1. search_files(pattern="*.ts", path="/src")
2. For each file:
- read_file(file)
- extract_doc_comments()
3. Generate markdown docs
4. write_file("/docs/API.md", generated_docs)
What Agents CAN Do:
What Agents CANNOT Do:
../)/etc/, /sys/)Allowed: /Users/dev/projects
Agent tries: /Users/dev/projects/src/index.ts → ✅ Allowed
Agent tries: /Users/dev/projects/../secret → ❌ Blocked
Agent tries: /etc/passwd → ❌ Blocked
- Grant only necessary directories - Use --read-only when write not needed
- Don't add / or system directories - Restrict to user workspace
- Review MCP server logs regularly - Monitor for unexpected file access patterns
- Keep credentials, keys in separate directories - Don't include in allowed paths
Agents generate blog posts, reports, documentation and save to organized folders.
Read project files, generate code, create tests, update configurations.
Read CSV/JSON data files, analyze, generate reports and visualizations.
Scan directories, categorize files, move to appropriate folders, cleanup duplicates.
Index markdown files, search documentation, extract information, update wikis.
Parse log files, identify errors, generate summaries, create alerts.
node_modules/)...
安装 Filesystem MCP Server 后,可以对 AI 说这些话来触发它
Help me get started with Filesystem MCP Server
Explains what Filesystem MCP Server does, walks through the setup, and runs a quick demo based on your current project
Use Filesystem MCP Server to secure, sandboxed filesystem access enabling agents to list, read, ...
Invokes Filesystem MCP Server with the right parameters and returns the result directly in the conversation
What can I do with Filesystem MCP Server in my documents & notes workflow?
Lists the top use cases for Filesystem MCP Server, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/filesystem-mcp/ 目录(个人级,所有项目可用),或 .claude/skills/filesystem-mcp/(项目级)。重启 AI 客户端后,用 /filesystem-mcp 主动调用,或让 AI 根据上下文自动发现并使用。
Filesystem MCP Server 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Filesystem MCP Server 可免费安装使用。请查阅仓库了解许可证信息。
Secure, sandboxed filesystem access enabling agents to list, read, write, create, move, delete, search files and directories within allowed paths.
Filesystem MCP Server 属于「Documents & Notes」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my documents & notes tasks using Filesystem MCP Server
Identifies repetitive steps in your workflow and sets up Filesystem MCP Server to handle them automatically