Filesystem MCP Server
jayessdeesea
README
Filesystem MCP Server
An MCP server that provides resources for accessing file metadata and content.
Overview
The Filesystem MCP Server is a Model Context Protocol (MCP) server that provides resources for accessing file metadata and content. It allows clients to retrieve information about files and directories, as well as read the content of files.
Features
- Get metadata for files and directories (name, path, size, timestamps, permissions, etc.)
- Read the content of text and binary files
- Automatic MIME type detection based on file extension
- Comprehensive logging
- Dependency injection using Spring Framework for better maintainability and testability
Resources
The server provides the following resources:
file://metadata/{path}
- Get metadata for a file or directoryfile://content/{path}
- Get content of a file
For more information, see the resources documentation.
Tools
The server provides the following tools:
list_files
- List files in a directory
For more information, see the tools documentation.
Building and Running
Prerequisites
- Java 17 or higher
- Maven
- Spring Framework (automatically managed by Maven)
Building
mvn clean package
This will create an executable JAR file in the target
directory.
Running
java -jar target/filesystem-mcp-1.0-SNAPSHOT-jar-with-dependencies.jar
Documentation
- Resources
- Tools
- Prompts
- Spring Integration
- Spring Best Practices
- Dagger2 to Spring Migration
- Dagger2 Best Practices (for reference)
Architecture
The server uses a layered architecture:
- Configuration Layer: Spring configuration classes for dependency injection
- Service Layer: Core services for file system operations
- Resource Layer: MCP resources for exposing file system functionality
- Utility Layer: Utility classes for common operations
Dependency Injection
The server uses Spring Framework for dependency injection, which provides:
- Constructor injection for better testability
- Lifecycle management with
@PostConstruct
and@PreDestroy
- Configuration classes for explicit bean definitions
- Component scanning for automatic bean discovery
License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommended Servers
Excel MCP Server
A Model Context Protocol server that enables AI assistants to read from and write to Microsoft Excel files, supporting formats like xlsx, xlsm, xltx, and xltm.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Crawlab MCP Server
Edit File Lines MCP Server
A TypeScript-based MCP server that provides tools for making precise line-based edits to text files within allowed directories.
MCP Excel Reader
Provides efficient handling of large Excel files through automatic chunking and pagination, using MCP to enable seamless file reading and management features such as sheet selection and error handling.

MD Webcrawl MCP
A Python-based MCP server that crawls websites to extract and save content as markdown files, with features for mapping website structure and links.
mcp-server-code-assist
A 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.
mcp-editor
A TypeScript MCP server port of Anthropic's filesystem editing tools, allowing file manipulation via client-approved operations without automated writes to prevent system harm.
Terminal Controller for MCP
An MCP server that enables secure terminal command execution, directory navigation, and file system operations through a standardized interface for LLMs.

Obsidian MCP REST Server
Provides a standardized interface for AI assistants to interact with Obsidian vaults through a local REST API, enabling reading, writing, searching, and managing notes.