j0hanz Filesystem MCP Server

Read, search, compare and patch files within allowed directories using j0hanz’s filesystem MCP server, with an optional read-only mode.

Local serverstdioTypeScriptMIT

What is the j0hanz Filesystem MCP Server?

This filesystem MCP server gives an assistant file operations inside explicitly allowed directories. The project documents content search, file comparisons, patching and ordinary read and write operations. It is a distinct implementation from the Model Context Protocol reference filesystem server.

Begin with a small workspace

Choose a project folder and ask the assistant to find a specific setting or compare two files. Check the returned paths and excerpts before expanding the task. A focused starting directory makes it easier to tell whether the search found the right file.

Configure the access roots

The package is @j0hanz/filesystem-mcp and requires Node.js 24 or later. The maintainer documents stdio and an optional Streamable HTTP mode. Its read-only flag removes mutating tools; sensitive filename patterns are also denied by default. These are documented controls, rather than evidence that every possible file is safe to expose.

Review edits as artifacts

When enabling edits, inspect the resulting diff and run the checks appropriate to the project. Keep a requested search separate from permission to change a file. Batch operations can simplify a multi-file task, but the intended paths and final content still need to be clear.

Explore file and storage MCP servers for cloud-drive alternatives.

Project setup and tool reference.

How to install the j0hanz Filesystem MCP Server

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@j0hanz/filesystem-mcp@2.7.3",
        "--read-only",
        "/path/to/project"
      ]
    }
  }
}

Replace /path/to/project with the directory to expose. The version matches the registry snapshot; check the maintainer before upgrading.

Configuration

Node.js 24 or later for the npm package. Configure the directories the server is allowed to access.

VariableDescriptionRequired
FS_ALLOWED_DIRSAllowed directories; ':'-separated on Unix, ';'-separated on Windows. Alternative to positional arguments.Optional

Example prompts to try

  • “Find the configuration for the API base URL inside the allowed project folder and show the relevant lines.”
  • “Compare these two files and describe their differences without editing them.”

Frequently asked questions

Secure filesystem MCP server for reading, writing, searching, diffing, and patching files. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.