mcpField
F
Filesystem MCP Server

Filesystem MCP Server

Local
github.com/jayessdeeseaFiles & Storage0Updated 83w ago

About Filesystem MCP Server

Filesystem MCP Server exposes file and directory information and file contents to MCP clients. It provides metadata and content resources, a directory-listing tool, and uses Spring Framework for dependency injection.

Key features

  1. 01Retrieve file and directory metadata
  2. 02Read text and binary file contents
  3. 03Detect MIME types from extensions
  4. 04List directory files
  5. 05Use Spring dependency injection

Use cases

  1. 01Inspect file and directory details
  2. 02Read files through an MCP client
  3. 03List files in a directory

MCP support

It exposes file metadata and content as MCP resources, and provides a `list_files` tool for directory listings.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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 directory
  • file://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

Architecture

The server uses a layered architecture:

  1. Configuration Layer: Spring configuration classes for dependency injection
  2. Service Layer: Core services for file system operations
  3. Resource Layer: MCP resources for exposing file system functionality
  4. 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.