MCP File Forge
MCP File Forge is a sandboxed MCP server that gives AI agents secure, policy-controlled file system operations and project scaffolding across 17 tools in five categories.
Reading
Read a single file (with encoding, line range, and size limits)
List directory contents (with recursion, depth limits, hidden files, and glob filtering)
Batch-read multiple files with configurable error handling
Writing & Management
Write/overwrite files (with auto-parent-creation and backup options)
Create directories (recursively)
Copy, move/rename, or delete files and directories
Search
Find files by glob pattern
Search file contents via regex (
grep_search) with context lines and case sensitivityFind files containing a specific literal string
Metadata
Get file/directory statistics (size, timestamps, type)
Check existence and type at a given path
Calculate disk usage for a directory
Compare two files or directories
Scaffolding
Create a new project from a named template with variable substitution
List available templates, optionally filtered by category
Security: All operations are sandboxed to explicitly allowed directories, with path traversal and symlink protection, denied path patterns, configurable read-only mode, and file size/recursion depth limits. It is cross-platform with configuration via environment variables, config files, or Claude Desktop integration.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP File Forge scaffold a new project from the web-app template in C:/Projects/my-app"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
At a Glance
MCP File Forge is a Model Context Protocol (MCP) server that gives AI agents sandboxed, policy-controlled access to the local file system. It ships 17 tools across five categories:
Category | Tools | Description |
Reading |
| Read files and directory listings |
Writing |
| Create, modify, copy, move, and delete |
Search |
| Find files by name pattern or content |
Metadata |
| Inspect size, timestamps, existence |
Scaffolding |
| Create projects from templates with variable substitution |
Key properties:
Sandboxed -- operations are restricted to explicitly allowed directories.
Read-only mode -- flip one env var to disable all write tools.
Symlink-safe -- symlink following is off by default to prevent sandbox escapes.
Windows-first -- designed for Windows paths and conventions, works everywhere.
Template engine --
{{var}}/${var}substitution plus path-level__var__renaming.
Installation
npm install -g @mcptoolshop/file-forgeOr run directly with npx:
npx @mcptoolshop/file-forgeClaude Desktop Configuration
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"file-forge": {
"command": "npx",
"args": ["-y", "@mcptoolshop/file-forge"],
"env": {
"MCP_FILE_FORGE_ALLOWED_PATHS": "C:/Projects,C:/Users/you/Documents"
}
}
}
}If you installed globally you can point directly at the binary:
{
"mcpServers": {
"file-forge": {
"command": "mcp-file-forge",
"env": {
"MCP_FILE_FORGE_ALLOWED_PATHS": "C:/Projects"
}
}
}
}Tool Reference
Reading
Tool | Description | Key Parameters |
| Read file contents |
|
| List directory entries |
|
| Batch-read multiple files |
|
Writing
Tool | Description | Key Parameters |
| Write or overwrite a file |
|
| Create a directory |
|
| Copy a file or directory |
|
| Move or rename |
|
| Delete a file or directory |
|
Search
Tool | Description | Key Parameters |
| Find files by glob pattern |
|
| Search file contents with regex |
|
| Literal text search (no regex) |
|
Metadata
Tool | Description | Key Parameters |
| File/directory statistics |
|
| Check existence and type |
|
| Directory size breakdown |
|
| Compare two paths |
|
Scaffolding
Tool | Description | Key Parameters |
| Create project from template |
|
| List available templates |
|
Full parameter documentation, examples, and error codes are in the HANDBOOK.md.
Environment Variables
Variable | Description | Default |
| Comma-separated list of allowed root directories |
|
| Comma-separated denied path glob patterns |
|
| Disable all write operations |
|
| Maximum file size in bytes |
|
| Maximum recursion depth |
|
| Allow following symlinks outside sandbox |
|
| Comma-separated template directories |
|
| Log verbosity ( |
|
| Path to a log file (in addition to stderr) | none |
Config File
Create mcp-file-forge.json (or .mcp-file-forge.json) in or above your working directory:
{
"sandbox": {
"allowed_paths": ["C:/Projects", "C:/Users/you/Documents"],
"denied_paths": ["**/secrets/**", "**/.env"],
"follow_symlinks": false,
"max_file_size": 52428800,
"max_depth": 20
},
"templates": {
"paths": ["./templates", "~/.mcp-file-forge/templates"]
},
"logging": {
"level": "info",
"file": "./logs/mcp-file-forge.log"
},
"read_only": false
}Configuration priority (highest wins):
Environment variables
Config file
Built-in defaults
Security
MCP File Forge enforces several layers of protection to keep AI agents from reaching outside their designated workspace:
Path sandboxing -- every path is resolved to an absolute path and checked against the
allowed_pathslist before any I/O occurs.Denied paths -- glob patterns that are blocked even within allowed directories (e.g.
**/secrets/**).Symlink protection -- symlinks are not followed by default; if a symlink target resolves outside the sandbox, the operation is denied.
Path traversal detection --
..sequences that would escape the sandbox are rejected.Size limits -- files larger than
max_file_sizeare refused to prevent memory exhaustion.Depth limits -- recursive operations are capped at
max_depthlevels.Read-only mode -- set
MCP_FILE_FORGE_READ_ONLY=trueto disablewrite_file,create_directory,copy_file,move_file,delete_file, andscaffold_project.Null-byte rejection -- paths containing
\0are refused.Windows long-path guard -- paths exceeding 32,767 characters are refused.
Documentation
Document | Description |
Deep-dive: security model, tool reference, templates, architecture, FAQ | |
Release history (Keep a Changelog format) | |
Internal planning and research notes |
Development
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
# Run tests
npm test
# Lint
npm run lintSecurity & Data Scope
MCP File Forge is an MCP server providing sandboxed file operations for AI agents.
Data accessed: Files within explicitly allowed directories only. Config files, template directories
Data NOT accessed: No cloud sync. No telemetry. No analytics. No data outside sandbox
Network: stdio transport by default — no network listeners, no egress. HTTP mode available via
PORTenv var for remote deploymentNo telemetry is collected or sent
Full policy: SECURITY.md
Scorecard
Category | Score |
A. Security | 10/10 |
B. Error Handling | 10/10 |
C. Operator Docs | 10/10 |
D. Shipping Hygiene | 10/10 |
E. Identity (soft) | 10/10 |
Overall | 50/50 |
License
Available Tools
17 toolscompare_filesC
Compare two files or directories
Inputs: path1 (required), path2 (required).
copy_fileC
Copy a file or directory
Inputs: source (required), destination (required), overwrite, recursive.
create_directoryC
Create a directory
Inputs: path (required), recursive.
delete_fileC
Delete a file or directory
Inputs: path (required), recursive, force.
file_existsC
Check if a file or directory exists
Inputs: path (required), type.
file_statC
Get file or directory statistics
Inputs: path (required).
find_by_contentC
Find files containing specific text
Inputs: text (required), path, file_pattern, max_results.
get_disk_usageC
Get disk usage for a directory
Inputs: path (required), max_depth.
glob_searchC
Find files matching a glob pattern
Inputs: pattern (required), base_path, max_results, include_dirs.
grep_searchC
Search file contents with regex
Inputs: pattern (required), path, glob, case_sensitive, +2 more.
list_templatesC
List available project templates
Inputs: category.
move_fileC
Move or rename a file or directory
Inputs: source (required), destination (required), overwrite.
read_directoryC
List contents of a directory
Inputs: path (required), recursive, max_depth, include_hidden, +1 more.
read_fileC
Read the contents of a file
Inputs: path (required), encoding, start_line, end_line, +1 more.
read_multipleC
Read multiple files at once
Inputs: paths (required), encoding, fail_on_error.
scaffold_projectC
Create a project from a template
Inputs: template (required), destination (required), variables, overwrite.
write_fileC
Write content to a file
Inputs: path (required), content (required), encoding, create_dirs, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool has a clearly distinct purpose with no significant overlap. For example, compare_files, copy_file, move_file, and delete_file all handle different file operations, while search tools like find_by_content, glob_search, and grep_search target different search methods. The descriptions reinforce these distinctions, making tool selection unambiguous.
All tool names follow a consistent snake_case pattern with clear verb_noun structures, such as read_file, write_file, create_directory, and delete_file. This uniformity makes the toolset predictable and easy to navigate, with no deviations in naming conventions across the 17 tools.
With 17 tools, the count is slightly high but reasonable for a file management server, covering a broad range of operations from basic CRUD to advanced searches and project scaffolding. It avoids being overwhelming while providing comprehensive functionality, though it edges toward the upper limit of typical scoping.
The toolset offers complete coverage for file and directory management, including creation, reading, updating, deletion, searching, and templating. It supports both basic operations (e.g., read_file, write_file) and advanced workflows (e.g., scaffold_project, compare_files), with no apparent gaps that would hinder agent performance in this domain.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
A Model Context Protocol server for Wix AI tools
The OpenZeppelin Cairo Contracts MCP server generates secure smart contracts in the Cairo language for Starknet environments based on OpenZeppelin templates. It brings OpenZeppelin's proven security and style rules directly into AI-driven development workflows to create safe, production-ready contracts. Key capabilities include providing templates for ERC-20, ERC-721, ERC-1155, Multisig, Governor, and Vesting contracts.