Filesystem MCP: Documentation
Updated:
Connection
npx -y @modelcontextprotocol/server-filesystem /path/allowed1 /path/allowed2 (stdio). Access is strictly inside the listed directories. Clients that support the Roots protocol can update the allowed folder list dynamically, without command-line arguments.
Tools
read_text_file/read_media_file/read_multiple_files— read text, media (base64) and several files at once.write_file— create or fully overwrite a file.edit_file— pattern-based selective edit without rewriting the whole file.create_directory,list_directory,list_directory_with_sizes,directory_tree— directory operations, including a recursive JSON tree.move_file— move or rename a file/directory.search_files— recursive pattern-based file search.get_file_info— file or directory metadata.list_allowed_directories— show which directories the agent can access right now.
Agent flow
Working with local projects and documents where no full execution environment exists.
Limits
Without arguments and without Roots support in the client, the server won't start — at least one allowed directory must be specified explicitly.