Included in development dependencies for code linting within the file system operations.
Included in development dependencies for running tests on the file system operations and analysis capabilities.
Used for visualizing the architecture of the MCP server in documentation.
Included in development dependencies for running the server in watch mode during development.
Used for package management and running scripts for building, testing, and running the server.
Included in development dependencies for code formatting.
Included in development dependencies for TypeScript execution.
Used as the implementation language with type checking for the server.
Filesystem MCP Server
A Model Context Protocol (MCP) server implementation providing file system operations, analysis, and manipulation capabilities through a standardized tool interface.
Architecture
The server is built on the MCP SDK and organized into distinct layers:
Components
- Server Layer: Handles MCP protocol communication and tool dispatch
- Tool Registry: Manages tool registration and execution
- Operations Layer: Implements core functionality
- File System Interface: Provides safe file system access
Installation
- Clone the repository:
- Install dependencies:
- Build the server:
- Configure MCP settings (cline_mcp_settings.json):
Tool Reference
Directory Operations
list_directory
Lists directory contents with metadata.
create_directory
Creates a new directory.
File Operations
read_file
Reads file content with encoding support.
write_file
Writes content to a file.
append_file
Appends content to a file.
Analysis Operations
analyze_text
Analyzes text file properties.
calculate_hash
Calculates file hash using specified algorithm.
find_duplicates
Identifies duplicate files in a directory.
Compression Operations
create_zip
Creates a ZIP archive.
extract_zip
Extracts a ZIP archive.
Error Handling
The server uses standard MCP error codes:
Error responses include:
- Error code
- Human-readable message
- Additional context when available
Example error:
Development
Project Structure
Running Tests
Run the test suite:
Run with coverage:
Development Mode
Run in watch mode:
Code Quality
Lint the codebase:
Type check:
Dependencies
Core dependencies:
- @modelcontextprotocol/sdk: MCP server implementation
- file-type: File type detection
- mime-types: MIME type lookup
- crypto-js: File hashing
- archiver: ZIP creation
- extract-zip: ZIP extraction
- iconv-lite: Text encoding
- chardet: Encoding detection
Development dependencies:
- typescript: Type system
- jest: Testing
- eslint: Linting
- prettier: Formatting
- ts-node: TypeScript execution
- nodemon: Development server
Contributing
- Fork the repository
- Create your feature branch
- Write tests for new features
- Ensure all tests pass
- Submit a pull request
License
MIT
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A Model Context Protocol server that provides file system operations, analysis, and manipulation capabilities through a standardized tool interface.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables enhanced file system operations including reading, writing, copying, moving files with streaming capabilities, directory management, file watching, and change tracking.Last updated -1215TypeScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that provides secure and intelligent interaction with files and filesystems, offering smart context management and token-efficient operations for working with large files and complex directory structures.Last updated -2142PythonMIT License
- AsecurityAlicenseAqualityA server implementing the Model Context Protocol that provides filesystem operations (read/write, directory management, file movement) through a standardized interface with security controls for allowed directories.Last updated -93TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that provides intelligent file reading and semantic search capabilities across multiple document formats with security-first access controls.Last updated -5PythonMIT License