chayan-1906

๐Ÿ—‚๏ธ File System MCP Server

Community chayan-1906
Updated

๐Ÿง ๐Ÿค– MCP-compliant AI agent server in TypeScript ๐Ÿš€ โ€” Extend Claude & others with ๐Ÿ—‚๏ธ full local File System superpowers: read, write, browse, and manage files/folders across macOS, Windows & Linux! Pre-built executables available for easy setup

๐Ÿ—‚๏ธ File System MCP Server

VersionNode.jsTypeScriptExpressLicenseMCP

Production-ready Model Context Protocol (MCP) server providing Claude with complete file system integration includingdirectory management, file operations, Office document creation/editing, and advanced file tree visualization. Pre-builtexecutables available for macOS, Windows, and Linux for easy end-user installation without Node.js dependencies.

โš™๏ธ Quick Start

Option 1: Use Pre-built Package

1. Install Claude Desktop:

Download from https://claude.ai/download

2. Download the Executable:

macOS:๐Ÿ“ฆ Download macOS Executable

Windows:๐Ÿ“ฆ Download Windows Executable

3. Run the Executable:
  • For macOS/Linux users:
    chmod +x file-system
    ./file-system
    
  • For Windows users:Double-click the file, or run via terminal: .\file-system.exe

Note:

  1. No need to run the executable repeatedly
  2. Do NOT delete the executable after running
  3. If you rename, move, or modify the executable, you must run it again (Step 3) to restart it properly
4. ๐ŸŒ Explore Available Tools (Optional)

Visit the homepage to browse all available tools:

  • Homepage: http://localhost:20252/
  • See all 20 File System tools with user-friendly descriptions
  • Great for understanding what the server can do
5. Configure Permissions:

IMPORTANT: Access the permissions manager at http://localhost:20252 to configure file system access:

โš ๏ธ Keep the Application Running: You must keep either:

  • Claude Desktop open (recommended for most users), OR
  • The terminal/command window open where you ran the program (for advanced users)

If you close both Claude Desktop AND the terminal window, the file system server will stop working.

  • Navigate to http://localhost:20252 in your browser
  • Add paths manually using the input field (no file picker available - you need to enter paths manually)
  • Select appropriate permissions (Read Only or Read & Write)
  • Save your configuration
6. (Optional) Stop the Server:

You can stop the server if needed (launching Claude will automatically stop the currently running instance/port)

7. Launch Claude Desktop

Start Claude Desktop application

8. Start Using File Operations:

Claude will now have access to file system operations based on your configured permissions

Important: When prompting Claude, include "use file system tools" in your prompts to ensure the LLM utilizes thefile system MCP tools

Option 2: Build from Source

1. ๐Ÿ“ Clone the repo
git clone https://github.com/chayan-1906/FS-MCP.git
cd FS-MCP
2. ๐Ÿ“ฆ Install dependencies
npm install
3. ๐Ÿงช Run the MCP Server
npm run dev

Or compile and run:

npm run build
npm run bundle
npm run package
4. ๐Ÿ”ง Configure Permissions

Visit http://localhost:20252 to access the permissions manager and configure file system access.

๐Ÿ”’ Permissions Manager

The File System MCP includes a built-in permissions manager accessible at http://localhost:20252.

Key Features:

  • Manual Path Entry: Enter file and folder paths manually in the input field
  • Permission Levels: Choose between Read Only and Read & Write access
  • Real-time Updates: See changes immediately with pending indicators
  • Undo Functionality: Easily undo removed permissions
  • Server Status: Real-time connection status monitoring

Important Notes:

โš ๏ธ No File Picker: The interface does not support file/folder selection via file picker. You must manually enter thecomplete path to files and folders in the input field.

โš ๏ธ Localhost Access Required: You must access the permissions manager through http://localhost:20252 - do notopen the HTML file directly.

Configuration File Location:

macOS/Linux:

~/Library/Application Support/Claude/file_system_config.json

Windows:

%APPDATA%\Claude\file_system_config.json

File Format:

[
  {
    "path": "/path/to/file/or/folder",
    "operation": "read"
  },
  {
    "path": "/another/path",
    "operation": "write"
  }
]

๐Ÿ“– User Guide

Detaileddocumentation: FileSystem MCP User Guide

๐Ÿงฐ Available Tools

Tool Name Category Description
get-directory-content Directory Lists files and folders within the specified directory
create-directory Directory Creates a new directory at the specified path
delete-directory Directory Deletes a directory
list-allowed-directories Directory Returns the list of allowed directories and their permissions from the configuration
directory-tree Directory Generates a hierarchical tree view of directory structure with customizable depth and filtering options
read-file File Reads file content with line numbers. Supports reading specific line ranges
create-file File Creates a new empty file at the specified path
modify-file File Modifies specific lines in a file using insert, replace, or delete operations
copy-file File Copies a file from the source path to the destination path
delete-file File Deletes a file at the specified path
get-file-directory-info File Retrieves metadata about a file or directory
search-file-directory File Searches for files or directories by name within allowed directories
move-rename-file-directory File Moves or renames a file or directory from the source path to the destination path
create-excel Office Creates an Excel sheet (.xlsx) with specified data and advanced styling
read-excel Office Reads Excel (.xlsx) files and returns data from all sheets
create-presentation Office Creates a PowerPoint presentation (.pptx) with specified slides and content
read-presentation Office Reads PowerPoint (.pptx) files and extracts text content
create-document Office Creates a Word document (.docx) with specified content and formatting
read-document Office Reads Word (.docx) files and extracts text content
run-shell-command System Executes a shell command on the server

๐Ÿ“‹ Changelog

v1.1.0 (2025-09-18)

โœจ New Features
  • Interactive Homepage: Complete tool browser at http://localhost:20252/ showcasing all 20 file system MCP tools
  • Advanced Search & Filtering: Real-time search across tool names and descriptions with category-based filtering
  • Tool Documentation Modals: Click-to-view detailed information for each tool including parameters, examples, anddescriptions
  • Responsive Design: Modern glassmorphism UI with mobile-responsive layout and smooth animations
๐Ÿ”„ Changes
  • Tool Architecture: Enhanced all tool registrations with structured metadata integration using mcp-utils package
  • Route Updates: Renamed /input to /manage-permissions for better semantic clarity and user understanding
  • Parameter Descriptions: Migrated from hardcoded descriptions to dynamic parameter descriptions from toolconfigurations
  • Type Safety: Added comprehensive TypeScript interfaces for Excel, Document, and Presentation data structures
๐Ÿ—๏ธ Technical Improvements
  • Homepage Generation: Created new src/templates/homepageHTML.ts with interactive HTML, CSS, and JavaScript
  • Type Definitions: Added src/types/index.ts with interfaces for TreeNode, TreeResult, ExcelData,PresentationData, and DocumentData
  • Build Process: Unified build script execution across macOS and Windows platforms in package-script.ts
  • Error Handling: Improved error reporting consistency across all tool implementations
๐Ÿ“ฆ Dependencies
  • @modelcontextprotocol/sdk: Updated from ^1.17.4 to ^1.18.0 for latest MCP protocol support
  • mcp-utils: Integrated for enhanced tool categorization and parameter management
๐Ÿงน Code Quality
  • Interface Consolidation: Moved type definitions from individual tool files to centralized src/types/
  • Configuration Management: Unified tool constants with comprehensive metadata including categories and descriptions
  • Package Management: Removed package-lock.json for better cross-platform compatibility
๐Ÿ“Š Statistics
  • Total Tools: 20 comprehensive file system operations organized across 3 categories
  • New Routes: Homepage (/) with searchable tool browser and permissions management (/manage-permissions)
  • UI Components: Interactive modals, search functionality, category filters, and responsive design elements

๐Ÿ”ง Features

  • ๐Ÿ“ Complete File Operations: Read, write, create, delete, copy, move, and rename files
  • ๐Ÿ—‚๏ธ Directory Management: Create, delete, list, and navigate directory structures
  • ๐Ÿ“Š Office Document Support: Create and read Excel, PowerPoint, and Word documents
  • ๐ŸŒณ Advanced Tree Visualization: Hierarchical directory tree with customizable depth and filtering
  • ๐Ÿ”’ Security-First Design: Granular permissions system with read/write access control
  • ๐Ÿ–ฅ๏ธ Web-Based Permissions Manager: User-friendly interface for managing file system access
  • โšก Real-time Updates: Live synchronization and status monitoring
  • ๐Ÿ” Smart Search: Find files and directories by name with flexible matching
  • ๐Ÿ“ Line-by-Line Editing: Precise file modifications without full rewrites
  • ๐Ÿš€ Shell Integration: Execute system commands with proper security measures

๐Ÿ› ๏ธ Architecture

The server is structured with:

  • Tools: Individual file system operation handlers
  • Controllers: Business logic for file operations and web interface
  • Routes: API endpoints and web routes
  • Utils: Helper functions, security checks, and path resolution
  • Config: Environment and configuration management
  • Public: Web-based permissions manager interface

๐Ÿ” File System Coverage

This MCP server provides comprehensive file system operations including:

  • File and directory CRUD operations
  • Advanced tree visualization and navigation
  • Office document creation and manipulation
  • Metadata extraction and file information
  • Search and filtering capabilities
  • Shell command execution
  • Permissions management and security

๐Ÿ‘จโ€๐Ÿ’ป Tech Stack

  • ๐ŸŸฆ TypeScript โ€“ Type-safe application development
  • ๐Ÿ“ File System APIs โ€“ Native file system integration
  • ๐Ÿง  MCP SDK โ€“ Model Context Protocol server framework
  • โœ… Zod โ€“ Schema-based input validation
  • ๐Ÿ“Š ExcelJS โ€“ Excel file manipulation
  • ๐Ÿ“„ Docx โ€“ Word document creation
  • ๐ŸŽฅ PptxGenJS โ€“ PowerPoint presentation generation
  • ๐Ÿš€ Express.js โ€“ Web server framework for permissions manager
  • ๐ŸŽจ CORS โ€“ Cross-origin resource sharing

๐Ÿ” Security Features

  • Path Validation: Prevents directory traversal attacks
  • Permission Boundaries: Restricts access to explicitly allowed paths
  • Operation Validation: Validates read/write permissions for each operation
  • Safe Path Resolution: Resolves and validates all file paths
  • Error Isolation: Prevents sensitive information leakage through errors
  • Configuration Protection: Secures permissions configuration file

๐Ÿš€ Performance Optimizations

  • Efficient Tree Generation: Optimized directory traversal algorithms
  • Memory Management: Streaming for large file operations
  • Caching: Smart caching for frequently accessed directory structures
  • Async Operations: Non-blocking file system operations
  • Error Recovery: Graceful handling of file system errors

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/add-pdf-support or git checkout -b fix/permission-validation)
  3. Commit your changes (git commit -m 'Add PDF file support' orgit commit -m 'Fix permission validation for nested paths')
  4. Push to the branch (git push origin feature/add-pdf-support)
  5. Open a Pull Request

๐Ÿ‘จโ€๐Ÿ’ป Author

Padmanabha Das

๐ŸŒŸ Show Your Support

If this project helped you, please give it a โญ๏ธ!

๐Ÿ“ฑ Connect With Me

LinkedInGitHub

๐Ÿ’ก Need More Features?

If you need additional file system tools or features that aren't currently available, please let me know! I'm happy toextend the functionality based on your requirements.

๐Ÿ”— License

ISC

Made with โค๏ธ by Padmanabha Das

โญ Star this repo if you found it helpful!

Note: This server requires proper file system permissions configuration. Please ensure you have configured allowed paths before running file operations.

MCP Server ยท Populars

MCP Server ยท New

    1ch1n

    MyChatArchive

    Local-first AI memory archive. Import ChatGPT, Claude, and Grok exports, generate semantic embeddings, and search via MCP server. Zero cloud, zero cost.

    Community 1ch1n
    butterbase-ai

    butterbase

    Open-source backend-as-a-service. Postgres, auth, storage, functions, AI gateway, MCP.

    Community butterbase-ai
    GoPlusSecurity

    GoPlus AgentGuard

    Security guard for AI agents โ€” blocks malicious skills, prevents data leaks, protects secrets. 24 detection rules, runtime action evaluation, trust registry.

    Community GoPlusSecurity
    respawn-llc

    tool-filter-mcp

    MCP proxy server that filters tools from upstream MCP servers via regex-based deny list

    Community respawn-llc
    Kaelio

    ktx-ai-data-agents-context

    ktx is an executable context layer for data and analytics agents ๐Ÿ™ Allow Claude Code, Codex, and any AI agent to query data accurately through MCP with skills, memory and a semantic layer

    Community Kaelio