Filesystem Operations β Read, Write, Search & Manage Files
Give your AI agent direct access to your local file system. Read, write, create, move, search, and manage files and directories with natural language commands β safely sandboxed to allowed paths.
Why This Skill Matters
The Filesystem skill is the most fundamental MCP server in the OpenClaw ecosystem. Without it, your agent can't read config files, write reports, organize downloads, or manage project structures. It's the backbone of nearly every automation workflow.
- Read Any File: Parse configuration files, logs, CSVs, markdown, and code. The agent understands file content and can answer questions about it.
- Write & Edit: Create new files, append to logs, update config values, write reports β all through conversation.
- Directory Operations: Create folder structures, move/rename files, list directory trees recursively.
- Search: Find files by name, extension, or content across your entire allowed directory tree.
Security Model
The Filesystem MCP uses a strict allowlist model. You specify exactly which directories the agent can access β everything else is blocked. This prevents accidental access to system files, SSH keys, or other sensitive data.
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y", "@modelcontextprotocol/server-filesystem",
"/Users/you/Documents",
"/Users/you/Projects"
]
}
}The paths listed in args are the only directories the agent can access. Add or remove paths to control scope.
Top Use Cases
- "Read my project's README.md and suggest improvements for clarity and SEO."
- "Find all .env files in my projects directory and check if any contain hardcoded API keys."
- "Organize my Downloads folder: move PDFs to Documents/PDFs, images to Pictures, and delete files older than 30 days."
- "Create a new project structure with src/, tests/, docs/ folders and a basic package.json."
- "Watch my ~/logs/ folder and alert me when any log file contains 'ERROR' or 'CRITICAL'."
Available Tools
| Tool | Description |
|---|---|
| read_file | Read complete file contents |
| write_file | Create or overwrite a file |
| edit_file | Make targeted edits to existing files |
| list_directory | List all files and subdirectories |
| search_files | Recursively search by name pattern |
| move_file | Move or rename files/directories |
| get_file_info | Get metadata (size, modified, permissions) |