fsext-mcp-server-typescript

by kurtzhi

Not rated
GitHub

Description

Fsext-MCP-Server(Typescript): A full-featured secure MCP server for local file system operations, with built-in image processing, OCR and media tools. Fully compliant with the official MCP specification, delivering standardized request/response schemas, large-file streaming I/O…

About

Fsext-MCP-Server(Typescript): A full-featured secure MCP server for local file system operations, with built-in image processing, OCR and media tools. Fully compliant with the official MCP specification, delivering standardized request/response schemas, large-file streaming I/O, multi-transport remote deployment, and…

Details

Author
kurtzhi
Categories
File Management, AI, Search, Knowledge Base

Global Installation (Recommended for CLI Usage)

Fsext-MCP-Server(Typescript): A full-featured secure MCP server for local file system operations, with built-in image processing, OCR and media tools. Fully compliant with the official MCP specification, delivering standardized request/response schemas, large-file streaming I/O, multi-transport remote deployment, and robust text search & replace workflows for LLM agent integration.

A high-performance, secure, and production-grade Model Context Protocol (MCP) server built with TypeScript, providing comprehensive filesystem operations, advanced text search & replace, image processing, and Tesseract OCR capabilities. Designed for LLM agent integration, it delivers strict input validation, standardized response structures, streaming large-file processing, and multi-transport remote deployment support.

This server fully complies with the official MCP specification, supportingstdiolocal integration,SSElegacy streaming transport, and modernStreamable HTTPbidirectional transport, serving as a universal filesystem tool backend for AI agents and automated workflow systems.

-

Full Filesystem CRUD & Directory Management:Complete file/directory creation, deletion, copy, move, metadata query, and existence verification. Supports recursive full-directory tree replication and safe move operations with conflict protection.

Streaming File I/O for Large Files:Implements segmented text reading, chunked binary streaming reading, text/binary overwriting and appending. Avoids full memory loading, perfectly supporting GB-level large file processing.

Advanced Text Search & In-Place Replace:Directory-wide recursive content search, single/multi-file contextual matching with preview lines, regular expression support, case-insensitive matching, and precise in-file text replacement with change statistics.

Professional Image Processing Suite:Built-in high-performance image resize (aspect ratio lock support), precise crop, and arbitrary-angle rotation based on Sharp, covering mainstream image editing scenarios.

Cross-Platform Tesseract OCR:WASM-first OCR recognition with customizable local Tesseract binary and tessdata paths, supporting multi-language text extraction from images without local engine installation dependency.

Strict Strict Input Validation & Standardized Response:All tool schemas enable strict additional property prohibition, with unified success/error response structures for consistent client parsing and error handling.

Multi-Standard MCP Transports:Natively supports three official MCP transports:stdio(local client),SSE(legacy remote stream),Streamable HTTP(modern bidirectional remote transport).

Full TypeScript Type Safety:Complete type definitions for all tool parameters, response structures, and transport configurations, ensuring runtime stability and development friendliness.

Global Installation (Recommended for CLI Usage)

1. Default Stdio Mode (For Claude Desktop / Cursor / Local MCP Clients)

# Default stdio transport for local agent integration fsext-mcp-server-ts fsext-mcp-server # Short alias fsext-ts fsext
fsext-mcp-server --transport sse --host 0.0.0.0 --port 8000

-

SSE Stream Subscription:http://<host>:<port>/sse

Client Request Channel:http://<host>:<port>/messages

3. Modern Streamable HTTP Transport Mode

fsext-mcp-server --transport http --host 0.0.0.0 --port 8000

Unified Bidirectional Endpoint:http://<host>:<port>/mcp

MCP Client JSON Config (Cursor / Claude Desktop)

{ "mcpServers": { "fsext": { "command": "fsext-mcp-server", "args": [], "env": {} } } }

All MCP tools adopt a consistent top-level response structure for both success and failure scenarios, enabling universal client parsing logic.

{ "res": { "success": boolean, "info": object } }

success: true- Theinfofield carries tool-specific business data.

success: false- All errors (IO failure, invalid params, path error, runtime exception) return fixed error structure:

{ "res": { "success": false, "info": { "code": "ERROR_CODE", "message": "Human-readable detailed error message" } } }

All tools enableadditionalProperties: falsestrict validation to reject illegal input parameters, ensuring invocation safety.

Description: Scan target directory, return filtered absolute path list, support recursive traversal, pure file filtering, and suffix filtering.

-

source_dir(string, required): Target directory path for scanning

recursive(boolean, required): Enable recursive subdirectory scanning

only_files(boolean, required): Return only files, exclude directories

file_extension(string, optional, default=""): Filter files by specified suffix

{ "res": { "success": true, "info": { "paths": ["/absolute/path/file1.txt", "/absolute/path/file2.js"] } } }

Description: Recursively copy full directory tree, support overwriting existing target directories.

-

source_dir(string, required): Source directory path

copy_dest_dir(string, required): Target directory path

overwrite(boolean, optional, default=false): Clean and overwrite existing target directory

{ "res": { "success": true, "info": {} } }

Description: Move entire directory tree, fail fast if target path exists to prevent accidental overwriting.

-

source_dir(string, required): Source directory path

dest_dir(string, required): Target directory path

overwrite(boolean, optional, default=false): Allow overwriting conflicting directory

Success Response: Empty info object with success flag

Description: Create empty or content-filled file, auto-create missing parent directories, support multi-encoding.

-

file_path(string, required): Target file path

content(string, optional, default=""): Initial text content

charset(string, optional, default=utf-8): Encoding enum: utf-8, ucs-2, utf16le, latin1, ascii, base64, hex

Success Response: Empty info object with success flag

Description: Delete single regular file only; reject directory paths to avoid batch deletion risks.

- file_path(string, required): Target file path

Success Response: Empty info object with success flag

Description: Copy single file with complete metadata retention, support overwrite control.

-

source_file_path(string, required): Source file path

dest_file_path(string, required): Target file path

overwrite(boolean, optional, default=false): Overwrite existing target file

Success Response: Empty info object with success flag

Description: Move single file with configurable overwrite behavior.

-

source_file_path(string, required): Source file path

dest_file_path(string, required): Target file path

overwrite(boolean, optional, default=false): Overwrite conflicting file

Success Response: Empty info object with success flag

Description: Obtain full metadata of file/directory, support optional SHA-256 digest calculation.

-

file_path(string, required): Target entry path

calc_digest(boolean, optional, default=false): Calculate SHA-256 hash

{ "res": { "success": true, "info": { "absolute_path": "string", "is_readable": true, "is_writable": true, "size": 1672, "is_regular_file": true, "is_directory": false, "is_symbolic_link": false, "creation_millis": 1782288135574, "last_modified_millis": 1782279393020, "last_access_millis": 1782644004556, "sha256_digest": "calculated-hash-string" } } }

Description: Lightweight existence check for file or directory.

- file_path(string, required): Target path

{ "res": { "success": true, "info": { "exists": true } } }

Description: Read full text content of target file with specified encoding.

-

file_path(string, required): Target file path

charset(string, optional, default=utf-8): Multi encoding support

{ "res": { "success": true, "info": { "content": "full-text-file-content" } } }

Description: Segmented text reading for large files, support skip leading lines and limit read lines.

-

file_path(string, required): Target file path

lines_to_skip(integer, required): Number of leading lines to skip

max_lines_to_read(integer, required): Maximum lines to read

line_separator(string, optional, default="\n"): Line break character

charset(string, optional, default=utf-8): File encoding

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.