Filesystem MCP
Server:
user-filesystem/filesystem
Default file I/O channel. Prefer MCP across environments; fall back to host-native tools (Cursor Read/Write/StrReplace) when unavailable.
Tools
| Tool | Purpose |
|---|---|
read_text_file | Read text (preferred) |
read_file | Read file (supports head/tail) |
read_multiple_files | Batch read |
read_media_file | Read media |
write_file | Write (must read first to check existence) |
edit_file | Precise edit on existing file |
move_file | Move/rename |
list_directory | List directory |
list_directory_with_sizes | List with sizes |
list_allowed_directories | View whitelist roots |
directory_tree | Directory tree |
search_files | Search by filename/path pattern |
get_file_info | File metadata |
create_directory | Create directory |
Read/Write Policy
Read
read_text_file(preferred) orread_file- If path uncertain →
list_allowed_directoriesfirst - One MCP failure → fall back to host Read with one-line reason
Write
- Must
read_text_fileto check existence first - Not exists →
write_fileto create - Exists and not full overwrite →
edit_file - Forbidden:
write_fileoverwrite without existence check
Search
| Need | Prefer |
|---|---|
| Symbols / call chains / impact | Codegraph |
| Exact string / i18n key | Host Grep |
| Filename / path pattern | search_files |
| Directory structure | directory_tree |
Whitelist
list_allowed_directories roots must cover the workspace root.
| Scenario | Recommended root |
|---|---|
| Frontend repo only | …/AOPS/ui |
| Monorepo | …/AOPS |
Not recommended: only …/ui/src — breaks reads of .cursor/rules, package.json, etc.
See Host Setup.
Examples
text
Read package.json at project roottext
Change "Hello, World!" to "Hello, MCP!" in hello.py