Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Secure, sandboxed filesystem access enabling agents to list, read, write, create, move, delete, search files and directories within allowed paths.
Secure, sandboxed filesystem access enabling agents to list, read, write, create, move, delete, search files and directories within allowed paths.
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
Secure File Operations for AI Agents Official MCP reference implementation providing safe, sandboxed filesystem access with fine-grained permission controls.
Sandboxed Access: Agents can only access explicitly allowed directories Permission Controls: Read-only, write, or full access per directory Path Validation: Prevents directory traversal and unauthorized access Audit Trail: All operations logged for security review
Most agent tasks involve files: Reading documentation Writing code files Analyzing logs Generating reports Managing project files Organizing content
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"]
Development Workspace { "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/Users/dev/projects", "/Users/dev/workspace" ] } } } Documentation Access (Read-Only) { "mcpServers": { "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "--read-only", "/Users/docs/knowledge-base" ] } } }
1. List Directory (list_directory) Agent: "What files are in my Projects folder?" Agent: "Show contents of /workspace/src" Returns: File names File types (file, directory, symlink) File sizes Last modified timestamps 2. Create Directory (create_directory) Agent: "Create a new folder called 'components'" Agent: "Make directory /workspace/tests" 3. Move/Rename (move_file) Agent: "Rename old-name.txt to new-name.txt" Agent: "Move report.pdf to /Documents/Reports/"
4. Read File (read_file) Agent: "Read the contents of config.json" Agent: "Show me the README.md file" Supports: Text files (UTF-8) JSON, YAML, XML Markdown, code files Large files (streaming) 5. Write File (write_file) Agent: "Create a file called notes.txt with meeting notes" Agent: "Write the generated code to src/index.ts" 6. Edit File (edit_file) Agent: "Replace 'version: 1.0' with 'version: 2.0' in package.json" Agent: "Add a new function to utils.js" 7. Get File Info (get_file_info) Agent: "When was report.pdf last modified?" Agent: "What's the size of data.csv?" Returns: File size (bytes) Creation time Last modified time Permissions File type
8. Search Files (search_files) Agent: "Find all Python files in the project" Agent: "Search for files containing 'API_KEY'" Search by: File name pattern (glob) File content (regex) File type Date modified 9. Delete File (delete_file) Agent: "Delete the temporary log files" Agent: "Remove old-backup.zip" Safety: Requires confirmation for large files Cannot delete files outside allowed directories Logged for audit
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: β Access explicitly allowed directories β Create/read/write files within allowed paths β List directory contents β Search within allowed paths What Agents CANNOT Do: β Access parent directories (../) β Access system files (/etc/, /sys/) β Follow symlinks outside allowed paths β Execute binaries or scripts β Modify file permissions
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
Principle of Least Privilege Grant only necessary directories Use --read-only when write not needed Never Allow Root Access Don't add / or system directories Restrict to user workspace Audit Agent Actions Review MCP server logs regularly Monitor for unexpected file access patterns Separate Sensitive Data 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.
Streaming for files >10MB Incremental reads supported Memory-efficient processing
Recursive search optimized Glob pattern matching Ignore patterns (e.g., node_modules/)
Safe for parallel file access Atomic write operations File locking where needed
Verify path is in allowed directories Check filesystem permissions Ensure MCP server has read/write access
Confirm directory exists Check for typos in path Verify path format (absolute vs relative)
Can't write in --read-only mode Reconfigure server with write access if needed
MethodSecurityAgent IntegrationSetupFilesystem MCPβ Sandboxedβ Auto-discoveredSimpleDirect FS Accessβ Full systemβ ManualNoneFile Upload/Downloadβ Manual controlβ οΈ LimitedComplexCloud Storage APIβ API-levelβ οΈ Requires SDKComplex
GitHub: https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem MCP Docs: https://modelcontextprotocol.io/ Security Best Practices: https://modelcontextprotocol.io/docs/concepts/security
{ "mcpServers": { "filesystem": { "command": "node", "args": [ "/path/to/filesystem-server/build/index.js", "/workspace", "/documents" ], "env": { "MAX_FILE_SIZE": "10485760", "ENABLE_LOGGING": "true", "LOG_PATH": "/var/log/mcp-filesystem.log" } } } } Safe, secure filesystem access for agents: From code generation to log analysis, Filesystem MCP is the foundation for agent file operations.
Code helpers, APIs, CLIs, browser automation, testing, and developer operations.
Largest current source with strong distribution and engagement signals.