Skip to main content
Glama
Filesystem MCP

Filesystem MCP

by domdomegg

filesystem-mcp

MCP server for filesystem operations - read, create, and edit files.

Use Cases

Save email attachments: "Download all PDFs from my accountant's emails this month" → searches Gmail for matching emails, extracts attachments, and saves them to a local folder.

Update config files: "Change the API endpoint from staging to production in my config" → finds the config file, replaces the URL, and shows you the diff.

Generate reports: "Create a summary of today's calendar events" → reads your calendar, formats a markdown report, and saves it to your notes folder.

Code refactoring: "Rename the function getData to fetchUserData in src/api.ts" → reads the file, makes the precise replacement, and confirms the change.

Backup before changes: "Save a copy of my .zshrc before I modify it" → reads the current file and writes a timestamped backup.

Related MCP server: LocalFS MCP Server

Setup

Follow the instructions on install-mcp, which generates the right config for your MCP client (Claude Code, Claude Desktop, Cursor, Cline, VS Code, and more).

Tools

Tool

Description

view

Read file contents or list directory (with line numbers)

create

Create or overwrite a file

str_replace

Replace an exact string in a file

insert

Insert text at a specific line

Contributing

Pull requests are welcomed on GitHub! To get started:

  1. Install Git and Node.js

  2. Clone the repository

  3. Install dependencies with npm install

  4. Run npm run test to run tests

  5. Build with npm run build

Releases

Versions follow the semantic versioning spec.

To release:

  1. Use npm version <major | minor | patch> to bump the version

  2. Run git push --follow-tags to push with tags

  3. Wait for GitHub Actions to publish to the NPM registry.

Available Tools

4 tools
createCreateA
Destructive

Create or overwrite a file with the specified content.

  • Creates parent directories if they don't exist

  • Overwrites existing files without warning

  • Use absolute paths

Inputs: path (required), content (required).

insertInsertA
Destructive

Insert text at a specific line in a file.

  • insert_line = 0: Insert at the beginning

  • insert_line = N: Insert after line N

  • insert_line = -1: Insert at the end

  • insert_text should typically end with a newline

  • Use absolute paths

Inputs: path (required), insert_line (required), insert_text (required).

str_replaceString ReplaceA
Destructive

Replace an exact string in a file.

  • old_str must match exactly and be unique in the file

  • If old_str appears 0 times or more than once, the operation fails

  • If new_str is omitted, old_str is deleted

  • Use absolute paths

Inputs: path (required), old_str (required), new_str.

viewViewA
Read-only

View file contents or list directory.

For files:

  • Returns content with line numbers (format: " N\t")

  • Use view_range to read specific lines [start, end] (1-indexed, inclusive)

  • Large files are truncated at 16000 characters

For directories:

  • Lists contents with type indicator (/ for directories)

  • Shows 2 levels deep by default

  • Ignores hidden files and node_modules

Inputs: path (required), view_range.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool has a distinct primary operation: view reads or lists, create writes whole files, str_replace edits exact strings, and insert adds text at a line. str_replace and insert both modify existing files, but their descriptions clearly distinguish their use cases.

    Naming Consistency4/5

    Three tools use simple lowercase verbs (view, create, insert) while one uses a compound snake_case name (str_replace). The set is readable and mostly consistent, with only that minor deviation from a uniform verb pattern.

    Tool Count4/5

    Four tools form a lean but reasonable core for basic file read/write/edit operations. However, the set omits common filesystem actions like delete, move, or search, making it slightly under-scoped for the domain.

    Completeness3/5

    Core create/read/update coverage exists through view, create, str_replace, and insert. There is no delete, rename/move, copy, or search operation, leaving notable gaps for standard filesystem workflows.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables comprehensive file operations including reading, writing, searching, and editing files with advanced features like regex-based replacements, line-specific modifications, and directory-wide search capabilities. Provides 8 robust tools for safe file manipulation with content verification and detailed error handling.
      8
      9 npm
      2
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides sandboxed access to local filesystem operations including directory and file management, content search with glob and regex patterns, and binary file support with configurable safety limits.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI clients to manage and manipulate text files in a secured local directory through tools like list, read, write, delete, create directory, and move.
      7
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Enables localized file system operations such as listing, reading, editing, creating, deleting, and searching files, scoped to the directory where the server is invoked.
      6
      -