The MCP Filesystem Server is an official MCP reference server that exposes selected local files and directories as resources and tools to MCP-compatible AI clients.
- Repository:
modelcontextprotocol/servers (official reference servers)
- Common package:
@modelcontextprotocol/server-filesystem
- Status: Official reference server (educational/reference use; evaluate for production)
- Read files from allowed directories
- List directory contents
- Search or inspect project files
- Write or modify files (optional, implementation-dependent)
- Code assistant access to a project workspace
- Documentation lookup from local markdown repositories
- Controlled automation over configuration files
npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/files
The allowed path argument is required to constrain file access.
- Restrict access to explicit directories only
- Prefer read-only mode by default
- Avoid exposing home directories or secrets paths