MCP Server for filesystem operations - file reading, writing, directory management, search capabilities, and comprehensive file handling
Find a file
Jonas Hanisch d4e909be4b
All checks were successful
Publish Package / publish (push) Successful in 25s
Merge develop → main: Release v2.0.0
Complete refactor with comprehensive improvements:

 New Features:
- Path validation and sandboxed operations
- File size limits (configurable, default 10MB)
- Glob pattern support for advanced file filtering
- Regex search with file type filtering

🏗️ Architecture:
- Modular structure (types, handlers, tool-definitions, filesystem-service)
- 100% TypeScript type safety
- Complete JSDoc documentation
- index.ts: 241 → 52 lines (78% reduction)

🧪 Testing:
- 19 comprehensive unit tests
- Full test coverage with Vitest

📦 Dependencies:
- MCP SDK upgraded to 1.20.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 12:09:24 +02:00
.forgejo/workflows fix: use direct authentication token in CI workflow (v1.0.5) 2025-10-07 17:10:15 +02:00
src Refactor: Complete v2.0.0 refactor with modular architecture 2025-10-10 12:09:16 +02:00
.gitignore fix: registry configuration for scope-based installation (v1.0.1) 2025-10-07 12:34:01 +02:00
CHANGELOG.md Refactor: Complete v2.0.0 refactor with modular architecture 2025-10-10 12:09:16 +02:00
package-lock.json Refactor: Complete v2.0.0 refactor with modular architecture 2025-10-10 12:09:16 +02:00
package.json Refactor: Complete v2.0.0 refactor with modular architecture 2025-10-10 12:09:16 +02:00
README.md Refactor: Complete v2.0.0 refactor with modular architecture 2025-10-10 12:09:16 +02:00
tsconfig.json Initial implementation of filesystem-mcp 2025-10-07 10:48:19 +02:00
vitest.config.ts Refactor: Complete v2.0.0 refactor with modular architecture 2025-10-10 12:09:16 +02:00

📁 filesystem-mcp

Version CI Status License NPM

MCP Server for secure filesystem operations.

🆕 What's New in v2.0.0

Complete Refactor with Enhanced Architecture

  • 🏗️ Modular Structure: Split into focused modules (types, tool-definitions, handlers, service) - 78% code reduction in index.ts
  • 🔒 100% Type Safety: Eliminated all any types with proper TypeScript interfaces
  • 📚 Complete Documentation: Full JSDoc coverage for all public APIs
  • 🧪 Comprehensive Testing: 19 unit tests with 100% pass rate
  • 📦 Updated Dependencies: MCP SDK upgraded from 0.5.0 → 1.20.0
  • 🔐 Enhanced Security: Path validation, sandboxed operations, file size limits
  • 🎯 Glob Patterns: Advanced file filtering with glob pattern support

See CHANGELOG.md for complete details.

Features

Core Operations

  • 📖 read_file - Read file contents
  • ✍️ write_file - Write file contents
  • 📋 list_files - List files in directory
  • 🔍 search_files - Search in files
  • 🗂️ create_directory - Create directory
  • 🗑️ delete_file - Delete file
  • 📊 get_file_info - Get file metadata

Security

  • Path traversal prevention
  • Sandboxed operations
  • Configurable allowed directories
  • File size limits

Installation

npm install
npm run build

Usage

npm start

Configuration

Set environment variables:

  • ALLOWED_PATHS - Comma-separated list of allowed base paths
  • MAX_FILE_SIZE - Maximum file size in bytes (default: 10MB)

License

MIT