react-dev-mcp
Enables safe, controlled filesystem operations and terminal command execution within allowed directories, with security rules to prevent access to sensitive files.
README
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_filewrite_filecreate_filecreate_directoryrename_filedelete_filelist_directorysearch_textreplace_textrun_terminal_command
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
- Keep this MCP server folder for server code only.
- Put files the AI may edit inside
workspaceorD:\Development\Projects, or add another trusted project folder toallowedDirectories. - Do not put secrets, private keys, tokens, or production
.envfiles in allowed folders. - Connect the server from Claude Desktop, ChatGPT Desktop, or another MCP client.
- Ask the AI to use the tools for file work.
- 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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.