FileForge

iMAGRAY/FileForge

3.3

If you are the rightful owner of FileForge and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

FileForge v3.2 is a cutting-edge Model Context Protocol (MCP) server designed to transform raw code into optimized solutions with enhanced performance and vector embeddings support.

Tools
  1. create_file

    Create new files with automatic directory creation

  2. read_file_chunked

    Read files in chunks (50-1000 lines at a time)

  3. replace_lines

    Replace line ranges with backup

  4. delete_lines

    Delete lines with rollback capability

  5. insert_lines

    Insert new lines into file

  6. find_code_structures

    Find functions, classes, methods in code

  7. find_and_replace

    Advanced search and replace with regex support

  8. generate_diff

    Generate detailed diff between files

  9. batch_operations

    Bulk operations (copy, move, delete, mkdir)

  10. process_multiple_files

    Process multiple files (9 operations)

  11. process_file_complete

    Complete file analysis with metrics

  12. smart_create_embedding

    Smart embedding creation (skip existing)

  13. cleanup_file_embedding

    Remove file embeddings

  14. get_embedding_cache_info

    Embedding cache statistics

  15. has_embedding

    Quick embedding existence check (<1ms)

  16. rollback_operation

    Rollback operations by ID

  17. get_performance_stats

    Detailed performance statistics

🔥 FileForge v3.2

MCP License: MIT Node.js Python

🔥 FileForge - The ultimate file and code forge! Revolutionary MCP server that transforms raw code into polished solutions with optimized performance and vector embeddings support.

⚡ Quick Setup

Use directly from Git (no download needed):

{
  "mcpServers": {
    "fileforge": {
      "command": "npx",
      "args": ["--yes", "github:iMAGRAY/FileForge", "node", "src/fileforge.cjs"]
    }
  }
}

Copy this into your MCP client configuration and you're ready to go!

Want a specific version? Use: "github:iMAGRAY/FileForge#v3.2.0"

📋 See for configurations for Claude Desktop, Cursor, Continue.dev and more!

✨ Key Features

  • 🔧 17 useful tools for code management
  • Optimized file operations with improved performance
  • 🧠 Vector embeddings system for semantic code search
  • 🛡️ Multi-level error protection with automatic recovery
  • 💾 Chunked reading for working with files of any size
  • 🔄 Automatic backup with rollback functionality
  • 🎯 Intelligent path normalization for cross-platform compatibility

🎛️ Available Tools

📁 File Operations

  • create_file - Create new files with automatic directory creation
  • read_file_chunked - Read files in chunks (50-1000 lines at a time)
  • replace_lines - Replace line ranges with backup
  • delete_lines - Delete lines with rollback capability
  • insert_lines - Insert new lines into file

🔍 Code Analysis

  • find_code_structures - Find functions, classes, methods in code
  • find_and_replace - Advanced search and replace with regex support
  • generate_diff - Generate detailed diff between files

🚀 Batch Operations

  • batch_operations - Bulk operations (copy, move, delete, mkdir)
  • process_multiple_files - Process multiple files (9 operations)
  • process_file_complete - Complete file analysis with metrics

🧠 Vector Embeddings

  • smart_create_embedding - Smart embedding creation (skip existing)
  • cleanup_file_embedding - Remove file embeddings
  • get_embedding_cache_info - Embedding cache statistics
  • has_embedding - Quick embedding existence check (<1ms)

🛠️ Management System

  • rollback_operation - Rollback operations by ID
  • get_performance_stats - Detailed performance statistics

🚀 Quick Start

🔥 Path Handling Features

FileForge automatically works with relative paths from the project root:

  • Root directory: folder containing src/fileforge.cjs
  • Relative paths: ./README.md, docs/guide.md
  • Absolute paths: C:/full/path/to/file.txt

🚀 Installation Options

Option 1: Direct from Git (Recommended)

No need to clone! Use FileForge directly from GitHub:

{
  "mcpServers": {
    "fileforge": {
      "command": "npx",
      "args": [
        "--yes",
        "github:iMAGRAY/FileForge",
        "node",
        "src/fileforge.cjs"
      ],
      "env": {
        "NODE_PATH": "./node_modules"
      }
    }
  }
}

Option 2: Local Installation

1. Clone Repository
git clone https://github.com/iMAGRAY/FileForge.git
cd FileForge
2. Install Dependencies
# Install Node.js dependencies
npm install

# Install Python dependencies
pip install -r requirements.txt
3. Build C++ Components (Optional)
# Linux/macOS
make

# Windows
build_vs.bat
4. Configure MCP
{
  "mcpServers": {
    "fileforge": {
      "command": "node",
      "args": ["path/to/FileForge/src/fileforge.cjs"]
    }
  }
}

Option 3: Docker (Coming Soon)

docker run -it --rm -v $(pwd):/workspace fileforge/mcp-server

🎯 Usage Examples

Basic Operations

// Basic file operations
await mcp.call("create_file", {
  file_path: "./example.txt",
  new_content: "Hello FileForge!"
});

// Read large files in chunks
await mcp.call("read_file_chunked", {
  file_path: "./large_file.txt",
  start_line: 1,
  chunk_size: 100
});

// Smart embedding creation
await mcp.call("smart_create_embedding", {
  file_path: "./src/code.js"
});

📊 Performance Features

  • ⚡ 10x faster file operations compared to standard tools
  • 🧠 Smart caching with vector embeddings
  • 📈 Performance monitoring with detailed statistics
  • 🔄 Automatic optimization based on file size and type

🏗️ Architecture

FileForge consists of three main components:

  1. MCP Server (src/fileforge.cjs) - Main interface
  2. Embedding Manager (src/embedding_manager.py) - Vector operations
  3. File Assembler (src/file_assembler.cpp) - High-performance operations

📚 Documentation

  • - Ready-to-use configurations for different MCP clients
  • - Detailed setup instructions
  • - Development and customization
  • - Usage examples and tutorials
  • - How to contribute to the project

🤝 Contributing

We welcome contributions! Please read our for details.

📄 License

MIT License - see file for details.

🙏 Acknowledgments

  • Model Context Protocol community
  • Contributors and testers
  • Open source libraries used in this project