← Back to MCP servers

Model Context Protocol

Filesystem MCP Server

Secure file system access with configurable directory permissions for reading, writing, and managing local files.

No auth required

Last reviewed Mar 2, 2026

Install

claude mcp add filesystem --transport stdio -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir
Scope: project

Available tools

ToolDescription
read_fileRead the contents of a file at a given path
write_fileWrite content to a file, creating it if needed
list_directoryList files and subdirectories in a directory
create_directoryCreate a new directory at the specified path
move_fileMove or rename a file or directory
search_filesSearch for files matching a pattern recursively
get_file_infoGet metadata about a file including size and timestamps

What it does

The Filesystem MCP Server provides your AI coding assistant with secure, sandboxed access to your local file system. It enforces strict directory boundaries -- the server only allows operations within the directories you explicitly specify at launch, preventing unauthorized access to sensitive files elsewhere on your machine.

This is a foundational MCP server that many developers install first. It enables AI assistants to read project files for context, write generated code, organize directories, and search through file trees -- all within the safety of a configurable sandbox.

Use cases

  • Give your AI assistant read/write access to a specific project directory for code generation
  • Search through project files to find implementations, configs, or patterns
  • Organize files by creating directories, moving files, and cleaning up project structure
  • Read configuration files, package manifests, and documentation to inform AI responses
  • Write generated code, tests, or documentation directly to your project

Getting started

  1. Decide which directory (or directories) you want to expose to the MCP server. Use absolute paths for reliability.
  2. Replace /path/to/allowed/dir in the install command with your actual directory path. You can specify multiple directories by adding additional path arguments.
  3. The server enforces that all file operations stay within the specified directories. Symlinks that point outside the allowed directories are blocked.
  4. No API keys or authentication are needed -- security is handled entirely through the directory path restrictions you configure at launch.