# Filesystem MCP Server — File Operations for AI > Official MCP server for safe filesystem operations. Read, write, search, and manage files and directories with configurable access controls. Essential for any AI coding workflow. ## Install Merge the JSON below into your `.mcp.json`: ## Quick Use ```json { "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"] } } } ``` --- ## Intro The Filesystem MCP Server gives AI tools safe, controlled access to your local files. Read file contents, create new files, edit existing ones, search by name or content, and manage directories — all with configurable path restrictions. **Best for**: Code generation, file management, project scaffolding, content creation **Works with**: Claude Code, Cursor, Gemini CLI --- ## Available Tools | Tool | Description | |------|-------------| | `read_file` | Read complete file contents | | `write_file` | Create or overwrite files | | `edit_file` | Make line-based edits with diffs | | `list_directory` | List files and subdirectories | | `search_files` | Regex search across file contents | | `get_file_info` | Get file metadata (size, dates) | | `create_directory` | Create new directories | | `move_file` | Move or rename files | --- ## Security - Only allows access within explicitly specified directories - Prevents path traversal attacks (no `../` escapes) - Read-only mode available via configuration --- ### FAQ **Q: What is Filesystem MCP Server?** A: Official MCP server for safe filesystem operations. Read, write, search, and manage files and directories with configurable access controls. Essential for any AI coding workflow. **Q: How do I install Filesystem MCP Server?** A: Check the Quick Use section above for step-by-step installation instructions. Most assets can be set up in under 2 minutes. ## Source & Thanks > Created by [Anthropic](https://github.com/modelcontextprotocol). Licensed under MIT. > [modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers) — Official MCP reference servers. --- Source: https://tokrepo.com/en/workflows/3e033d18-7057-487a-a2a7-5d7a228ffb06 Author: MCP Hub