Integrations
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.
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 provides tools for code modification and generation via Large Language Models, allowing users to create, modify, rewrite, and delete files using structured XML instructions.Last updated -12PythonMIT License
- 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 -126TypeScriptMIT License
- -securityAlicense-qualityA custom Model Context Protocol server that gives Claude Desktop and other LLMs access to file system operations and command execution capabilities through standardized tool interfaces.Last updated -22PythonApache 2.0
- -securityAlicense-qualityA 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 -5PythonMIT License