Skip to main content
Glama
react-dev-mcp

react-dev-mcp

by muneeb3778

Safe Filesystem MCP Server

This MCP server gives AI clients a small, controlled set of filesystem tools. It is designed to work only inside folders you explicitly allow.

Tools

  • read_file

  • write_file

  • create_file

  • create_directory

  • rename_file

  • delete_file

  • list_directory

  • search_text

  • replace_text

  • run_terminal_command

Related MCP server: ABSD DevOps MCP Server

Project Layout

react-dev-mcp/
  config/settings.js    # allowed folders, blocked secret names, terminal rules
  services/             # file, search, and terminal operations
  tools/                # MCP tool registration modules
  utils/                # security, logging, and response helpers
  logs/server.log       # audit log created when tools run
  workspace/            # default folder the AI can access
  server.js             # MCP server entry point
  package.json

Security Rules

The important file is config/settings.js.

workspace.allowedDirectories controls what the AI can read, write, rename, delete, and search. By default, this server allows its own workspace folder and D:\Development\Projects.

workspace.blockedNames blocks sensitive names such as .env, .npmrc, and SSH key files even if they are inside an allowed folder.

run_terminal_command has extra safeguards:

  • runs without a shell, so operators like ;, &, |, <, >, and backticks are rejected

  • only runs commands listed in terminal.allowedCommands

  • runs only inside an allowed folder

  • has a timeout and output limit

  • receives a small environment instead of your full terminal environment

The terminal allowlist includes common React and React Native commands such as git, node, npm, npx, yarn, pnpm, bun, expo, adb, and gradlew. These are powerful because project scripts can run code, so keep client approval enabled for terminal use.

Every tool call is logged to logs/server.log. File contents and replacement text are not written to the log; large/sensitive text inputs are recorded as byte counts.

No MCP server can make a bad AI client trustworthy. The secure pattern is: expose only the project folder you want worked on, keep secrets outside allowed folders, review edits before running them, and keep terminal commands allowlisted.

Install

npm install

Run

npm start

Claude Desktop Setup

Add this to Claude Desktop's MCP config, then restart Claude Desktop.

{
  "mcpServers": {
    "safe-filesystem": {
      "command": "node",
      "args": [
        "D:\\Development\\MCP\\react-dev-mcp\\server.js"
      ]
    }
  }
}

ChatGPT Desktop Or Other MCP Clients

Use the same idea in any MCP client:

  • command: node

  • argument: D:\Development\MCP\react-dev-mcp\server.js

  • transport: stdio

If the client supports per-tool approval, keep approval turned on for write, delete, rename, replace, and terminal tools.

How To Work Safely

  1. Keep this MCP server folder for server code only.

  2. Put files the AI may edit inside workspace or D:\Development\Projects, or add another trusted project folder to allowedDirectories.

  3. Do not put secrets, private keys, tokens, or production .env files in allowed folders.

  4. Connect the server from Claude Desktop, ChatGPT Desktop, or another MCP client.

  5. Ask the AI to use the tools for file work.

  6. Review diffs before running code, committing, or deploying.

Flow

AI client
  -> asks for an MCP tool
  -> this server validates path, text size, blocked names, and command rules
  -> file or terminal action runs only if validation passes
  -> result returns to the AI client

The AI client does not automatically get your full computer through this server. It only gets the tools listed above, and every tool checks the configured safety rules.

Available Tools

10 tools
create_directoryC

Create a directory inside an allowed folder.

Inputs: path (required).

create_fileB

Create a new UTF-8 text file. Fails if the file already exists.

Inputs: path (required), content.

delete_fileC

Delete a file or directory inside an allowed folder.

Inputs: path (required).

list_directoryC

List files and folders inside an allowed folder.

Inputs: path.

read_fileC

Read a UTF-8 text file from an allowed folder.

Inputs: path (required).

rename_fileC

Rename or move a file or directory inside allowed folders.

Inputs: newPath (required), oldPath (required).

replace_textC

Replace text inside one allowed UTF-8 text file.

Inputs: path (required), search (required), replace (required), caseSensitive.

run_terminal_commandB

Run one allowlisted command inside an allowed folder without a shell.

Inputs: command (required), cwd.

search_textC

Search UTF-8 text files for a string inside an allowed file or folder.

Inputs: query (required), path, caseSensitive.

write_fileC

Replace the full content of a UTF-8 text file.

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

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool targets a distinct file operation: read vs write vs create vs rename vs delete are all clearly separated. search_text and replace_text differ clearly (searching vs modifying content), and run_terminal_command stands apart as the only shell-execution tool. No two tools appear to do the same thing.

    Naming Consistency5/5

    All tools follow a consistent verb_noun snake_case pattern: read_file, write_file, create_file, create_directory, rename_file, delete_file, list_directory, search_text, replace_text, run_terminal_command. The pattern is perfectly uniform with no deviations.

    Tool Count5/5

    Ten tools is right in the sweet spot for a filesystem/development server. Each tool covers a distinct file, directory, text, or command operation without redundancy, and the count feels neither thin nor bloated for the stated purpose.

    Completeness4/5

    The file/directory CRUD lifecycle is well covered: create, read, write, update (replace_text), rename, delete, and list. Minor gaps exist—such as no append_text or copy_file operation—but agents can compose the existing tools (read + write) to fill most gaps, so no dead ends are present.

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Enables secure filesystem operations with directory sandboxing and optional read-only mode. Supports file reading/writing, directory management, file searching, and text operations while restricting access to specified directories.
      12
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables secure local filesystem operations and interactive terminal sessions for AI assistants. Provides 12 tools for file management, directory operations, code searching, and running interactive REPLs with security protections.
      32 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides secure, sandboxed file system access for AI assistants to read, write, and manage project files with controlled command execution capabilities, all confined to a designated workspace directory.
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to execute terminal commands on a host machine with configurable, granular permission controls and safety protections. It features multiple security modes, including allowlists and manual approval, to ensure safe command execution within specified directories.
      6
      Apache 2.0