# vulcan-file-ops [Health: Active]

**Category:** 📂 File Systems  
**Repository:** https://github.com/n0zer0d4y/vulcan-file-ops  
**GitHub Stars:** 9  
**npm Downloads (last month):** 377  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/vulcan-file-ops

## Description
A Security-centric MCP Server providing enterprise-grade filesystem powers to AI assistants—read, write, edit, and manage files with comprehensive CVE protection and user-controlled access.. [Explore comprehensive code documentation and architecture details on DeepWiki](https://deepwiki.com/n0zer0d4y/vulcan-file-ops)

## Tools
Capabilities this server exposes over MCP:

- **read_file** — Read files with flexible modes. Supports text and documents (PDF, DOCX, PPTX, XLSX, ODT, ODP, ODS). PDF: Extracts with format metadata (fonts, colors, layout). Modes: full (entire file), head (first N lines), tail (last N lines), range (lines from startLine to endLine, inclusive, 1-indexed). Document files ignore mode parameters and always return full content. Only works within allowed directories.
- **attach_image** — Attach an image file for AI vision analysis. The image will be presented to the AI model as if uploaded directly by the user, enabling the AI to see and describe visual content, read text in images, analyze diagrams, etc. Supports attaching a single image or multiple images at once. Supports PNG, JPEG, GIF and WebP (the formats vision models accept). SVG files are returned as their XML markup text; BMP is not supported (convert to PNG). Note: This requires the MCP client to support vision capabilities. Only works within allowed directories.
- **read_multiple_files** — Batch read multiple files concurrently with per-file mode control. Supports text and documents (PDF, DOCX, PPTX, XLSX, ODT, ODP, ODS). Each file can specify its own read mode: full, head (first N lines), tail (last N lines), or range (arbitrary line range). Document files ignore mode parameters and return full content. Processes files concurrently for performance. Maximum 50 files per operation. Only works within allowed directories.
- **write_file** — Create/replace files. Supports text (UTF-8), PDF, and DOCX with HTML formatting. 

**PDF/DOCX with HTML Formatting:**
- Provide HTML content for rich formatting (headings, bold, italic, colors, tables, lists)
- Supports: <h1>-<h6>, <p>, <div>, <span>, <strong>, <em>, <u>, <table>, <ul>, <ol>
- CSS styling: colors, fonts, alignment, borders, margins, padding
- Example: '<html><body><h1 style="color: #2c3e50;">Title</h1><p>Content</p></body></html>'
- Plain text fallback: If content is not HTML, creates simple formatted document

**Text files:** UTF-8 encoding. **Overwrites without confirmation.**

IMPORTANT - Multi-line Content:
- Use actual newline characters in the content string, NOT escape sequences like \n
- MCP/JSON will handle the encoding automatically
- Incorrect: {"content": "line1\nline2"} - this writes literal \n characters
- Correct: Use actual line breaks in your JSON string value

Only works within allowed directories.
- **edit_file** — Apply precise modifications to text and code files with intelligent matching.

**Single File Editing (mode: 'single'):**
Edit one file with multiple sequential edits using exact, flexible, or fuzzy matching strategies.

**Multi-File Editing (mode: 'multiple'):**
Edit multiple files concurrently in a single operation. Each file can have its own edit configuration.

**Matching Strategies:**
1. Exact: Character-for-character match (fastest, safest)
2. Flexible: Whitespace-insensitive, preserves original indentation
3. Fuzzy: Token-based regex matching for maximum compatibility

**Features:**
- Concurrent processing for multi-file operations
- Per-file matching strategy control
- Dry-run preview mode
- Detailed diff output with statistics
- Atomic operations with rollback capability
- Cross-platform line ending preservation

**Maximum:** 50 files per multi-file operation

**Best Practices:**
- Include 3-5 lines of context before and after the change for reliability
- Add 'instruction' field to describe the purpose of each edit
- Use 'dryRun: true' to preview changes before applying
- For multiple related changes, use array of edits (applied sequentially)
- Set 'expectedOccurrences' to validate replacement count
- Use 'matchingStrategy' to control matching behavior (defaults to 'auto')

**CRITICAL - Multi-line Content:**
- Use actual newline characters in oldText/newText strings, NOT \n escape sequences
- The MCP/JSON layer handles encoding automatically
- Using \n literally will search for/write backslash+n characters (wrong!)

Only works within allowed directories.
- **write_multiple_files** — Write multiple files concurrently. Supports text, PDF, and DOCX with HTML formatting. File type auto-detected by extension. Failed writes for individual files won't stop others. Returns detailed results for each file. 

**PDF/DOCX with HTML:** Provide HTML content for rich formatting. Automatically detects HTML and applies formatting. Plain text creates simple documents.

IMPORTANT - Multi-line Content:
- Use actual newline characters in content strings, NOT \n escape sequences
- Each file's content will be written exactly as provided in the string

Only works within allowed directories.
- **make_directory** — Create single or multiple directories with recursive parent creation (like Unix 'mkdir -p'). Idempotent - won't error if directories exist. Only works within allowed directories.
- **list_directory** — List directory contents with flexible output formats. Replaces the previous list_directory, list_directory_with_sizes, and directory_tree tools. Supports simple listings, detailed views with sizes/timestamps, hierarchical tree display, and structured JSON output. Automatically filters globally configured ignored folders. Only works within allowed directories.
- **move_file** — Relocate or rename files and directories in a single atomic operation. Supports cross-directory moves with simultaneous renaming when needed. Fails safely if the destination path already exists to prevent accidental overwrites. Can also perform simple same-directory renames. Both source and destination must be within allowed directories.
- **get_file_info** — Extract comprehensive metadata and statistics for files or directories. Provides detailed information including size, timestamps (creation and last modification), permissions, and entry type. Perfect for inspecting file properties and attributes without accessing the actual content. Only works within allowed directories.
- **register_directory** — Register a directory for access. This allows the AI to dynamically gain access to directories specified by the human user during conversation. The directory and all its subdirectories will become accessible for all filesystem operations. By default the user must confirm each registration in their MCP client (registration is refused if the client cannot show a confirmation prompt); filesystem roots and the home directory cannot be registered at runtime.

CURRENTLY ACCESSIBLE DIRECTORIES: None. Use this tool to register directories for access.
- **list_allowed_directories** — Display all directories currently accessible to the server. Note that subdirectories within listed paths are implicitly accessible as well. Use this to determine available filesystem scope and plan operations accordingly before attempting file access.

CURRENTLY ACCESSIBLE DIRECTORIES: None. Use this tool to register directories for access.
- **file_operations** — Perform bulk file operations (move, copy, rename) on single or multiple files and directories concurrently. All operations are validated for security before execution. Supports conflict resolution strategies for existing destinations. Maximum 100 files per operation for performance.
- **delete_files** — Delete single or multiple files and directories securely. Supports recursive directory deletion with safety controls. All paths are validated before deletion begins. Operations are processed concurrently for performance. Maximum 100 paths per operation. Only works within allowed directories.
- **glob_files** — Perform recursive pattern-based searches for files and directories. Accepts glob-style patterns matching paths relative to the search root. Use simple patterns like '*.ext' for current directory matches, or '**/*.ext' for deep subdirectory searches. Returns absolute paths to all discovered items. Excellent for locating files when exact paths are unknown. Only searches within allowed directories.
- **grep_files** — Search text patterns within file contents using regex. Returns matching line numbers and context - use with read_file/read_multiple_files to retrieve actual content. Supports: regex patterns, case-insensitive (-i), context lines (-A/-B/-C), file type filters (type: js/py/ts/etc), glob patterns, multiline mode. Output modes: content (lines+context), files_with_matches (paths only), count (match counts). Respects ignored folders. Use head_limit to cap results. Only searches within allowed directories.
- **execute_shell** — Execute shell commands on the host system with security controls. Commands are executed as 'bash -c <command>' on Unix/Mac. 

The tool captures stdout, stderr, exit codes, and signals. Commands exceeding the timeout will be automatically terminated. 

⚠️  SECURITY REQUIREMENTS:
- At least ONE approved directory must be configured before executing any shell commands
- Working directory (workdir parameter or process.cwd()) MUST be within allowed directories
- All file/directory paths in arguments and redirections are validated against allowed directories (symlinks are resolved)
- Every command in a chain must be approved; chain with ';', '&&', '||' or '|' on a single line
- Not allowed: newlines, command substitution, backticks, a lone '&', ( ) { } grouping or script blocks, heredocs, escaped quotes (\" \')
- Commands matching dangerous patterns are blocked unless the server operator allowed them

If no workdir is specified, the server's current working directory will be used and validated.

No pre-approved commands. All commands require user approval before execution.

IMPORTANT: Always provide a clear description of what the command does and why it's needed.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "vulcan-file-ops": {
    "command": "npx",
    "args": ["-y","@n0zer0d4y/vulcan-file-ops"]
  }
}
```

## Documentation

## What vulcan-file-ops does

vulcan-file-ops connects an MCP-compatible AI client to the local filesystem. It exposes tools for reading and writing individual or multiple files, applying pattern-based edits, creating and listing directories, moving and deleting files, retrieving metadata, and searching by filename or content. The server also supports image attachments for AI analysis and can work with PDF, DOCX, PPTX, XLSX, and ODT documents, including HTML-to-document conversion.

The server is intended for local development and document workflows where an AI assistant needs to inspect or modify files. It can support tasks such as refactoring a project, updating documentation, making batch changes, or locating code across a workspace.

## How it works

Operations run through MCP tools exposed to the configured client. File access is limited to directories known to the server. Directories can be supplied at startup with `--approved-folders`, registered during a conversation with `register_directory`, or provided by a client through the MCP Roots protocol. New runtime registrations normally require confirmation through the MCP client.

Every operation is checked against registered directory boundaries. Directory listings can filter common generated or dependency folders, including `node_modules`, `dist`, and `.git`. Search behavior includes optimized traversal and recursion handling. Tool filtering can restrict the server to selected tools or tool groups.

## Setup and configuration

Node.js 20.19 or newer, or Node.js 22.12 or newer, is required. The package can run directly with npx, be installed globally or locally with npm, or be built from a cloned repository. It operates locally and has no external service dependencies.

A typical stdio configuration uses the package through npx:

```json
{
  "mcpServers": {
    "vulcan-file-ops": {
      "command": "npx",
      "args": ["-y", "@n0zer0d4y/vulcan-file-ops"]
    }
  }
}
```

Use `--approved-folders` when starting the process to grant access to specific paths immediately. A source checkout can be built with `npm install` followed by `npm run build`, then started with `node dist/cli.js` and an absolute path. Codex uses its `mcp_servers` TOML configuration rather than the JSON format used by clients such as Claude Desktop and Cursor.

## Tools and capabilities

The API groups its tools into these areas:

- **Reading:** `read_file`, `read_multiple_files`, and `attach_image`; reading can target an entire file, the beginning or end, or selected line ranges.
- **Writing and editing:** `write_file`, `write_multiple_files`, and `edit_file`; edits support patterns, flexible matching, and diff preview.
- **Filesystem management:** `make_directory`, `list_directory`, `move_file`, `file_operations`, `delete_files`, and `get_file_info`.
- **Access control:** `register_directory` and `list_allowed_directories`.
- **Search:** `glob_files` for filename patterns and `grep_files` for content searches.
- **Shell execution:** `execute_shell`, subject to shell command approval controls.

Batch read, write, edit, copy, move, and rename operations can run concurrently. Selective activation lets an administrator expose only particular tools or categories.

## Limitations and notes

The server only operates within directories registered through its access model. Approval and path validation are important when enabling write, delete, or shell capabilities. Local execution requires a compatible Node.js runtime, and client configuration must launch the server through its stdio command. The package is distributed under the MIT license.

_Full upstream README: https://allmcps.com/mcp/vulcan-file-ops/readme_

