MCP ConfigsMar 29, 2026·1 min read

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.

TO
TokRepo精选 · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

{
  "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

🙏

Source & Thanks

Created by Anthropic. Licensed under MIT. modelcontextprotocol/servers — Official MCP reference servers.

Related Assets