MCP File Forge
A Model Context Protocol server for secure, sandboxed file operations and project scaffolding with built-in search and regex capabilities. It is optimized for Windows environments and features configurable access controls to restrict operations to specific directories.
README
MCP File Forge
A Model Context Protocol (MCP) server for secure file operations and project scaffolding.
Features
- Secure File Operations: Read, write, copy, move, and delete files with sandboxed access controls
- Project Scaffolding: Create projects from templates with variable substitution
- Windows-First: Optimized for Windows paths, permissions, and conventions
- Search Capabilities: Glob patterns and regex content search
- Configurable Security: Define allowed paths, size limits, and read-only modes
Installation
npm install @mcp-tool-shop/file-forge
Quick Start
With Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"file-forge": {
"command": "node",
"args": ["path/to/mcp-file-forge/build/index.js"],
"env": {
"MCP_FILE_FORGE_ALLOWED_PATHS": "C:/Projects,C:/Users/you/Documents"
}
}
}
}
Standalone
npx @mcp-tool-shop/file-forge
Available Tools
File Reading
read_file- Read file contents with encoding and line range optionsread_directory- List directory contents with metadataread_multiple- Batch read multiple files
File Writing
write_file- Write or overwrite file contentscreate_directory- Create directoriescopy_file- Copy files or directoriesmove_file- Move or rename filesdelete_file- Delete files or directories
Search
glob_search- Find files matching glob patternsgrep_search- Search file contents with regex
Metadata
file_stat- Get file statisticsfile_exists- Check if path exists
Scaffolding
scaffold_project- Create project from templatelist_templates- List available templates
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
MCP_FILE_FORGE_ALLOWED_PATHS |
Comma-separated allowed paths | . |
MCP_FILE_FORGE_READ_ONLY |
Disable write operations | false |
MCP_FILE_FORGE_MAX_FILE_SIZE |
Max file size in bytes | 104857600 |
MCP_FILE_FORGE_LOG_LEVEL |
Logging level | info |
Config File
Create mcp-file-forge.json in the working directory:
{
"sandbox": {
"allowed_paths": ["./projects"],
"denied_paths": ["**/secrets/**"],
"max_file_size": 52428800
}
}
Security
- Path sandboxing restricts operations to allowed directories
- Symlink following is disabled by default
- Read-only mode available for safe browsing
- Size limits prevent memory exhaustion
Development
# Install dependencies
npm install
# Build
npm run build
# Development mode (watch)
npm run dev
# Run tests
npm test
License
MIT
Author
mcp-tool-shop
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.
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.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
E2B
Using MCP to run code via e2b.