MCP Filesystem

MCP Filesystem

Model Context Protocol (MCP) server with a resource for each file in a workspace

isaacphi

File Systems
Visit Server

README

MCP Filesystem

A Model Context Protocol (MCP) server that exposes resources for each file in a working directory and sends change notifications.

Status

⚠️ Pre-beta Quality ⚠️

"It works on my machine". Issues are welcome ❤️

Features

  • Resources: Creates one MCP resource for each file in your workspace
  • Gitignore Support: Respects .gitignore rules
  • Change Notification: Detects file changes, additions, and deletions
  • MIME Type Detection and Encoding Handling: Identifies file types and handles various text encodings

Setup

Install Go: Follow instructions at https://golang.org/doc/install

Fetch or update this server:

go install github.com/isaacphi/mcp-filesystem@latest

Add the following to your client configuration (located at ~/Library/Application Support/Claude/claude_desktop_config.json for Claude Desktop):

{
  "mcpServers": {
    "filesystem": {
      "command": "mcp-filesystem",
      "args": ["--workspace", "/path/to/your/repository"]
    }
  }
}

Replace /path/to/your/repository with the absolute path to your project directory.

Usage

Your client will be able to access and reference all non-ignored files in your repository as MCP resources. Each file is registered as a separate resource with appropriate MIME type detection.

Client Requirements

Your client needs to support the following MCP features:

Resource Listing: The ability to list and access resources exposed by the server Change Notifications: Support for receiving notifications/resources/list_changed events Resource Content Access: Ability to request and render resource content with appropriate MIME types

About

This project uses:

Development

Clone the repository:

git clone https://github.com/isaacphi/mcp-filesystem.git
cd mcp-filesystem

Install dependencies:

go mod download

Build:

go build

Configure you client to use your local build:

{
  "mcpServers": {
    "filesystem": {
      "command": "/full/path/to/your/mcp-filesystem/mcp-filesystem",
      "args": ["--workspace", "/path/to/repository"],
      "env": {
        "DEBUG": "1"
      }
    }
  }
}

Feedback

Please submit issues with as many details as you can.

Set the DEBUG environment variable to enable verbose logging:

"env": {
  "DEBUG": "1"
}

Features on my radar

  • [x] Resources for each file in workspace
  • [x] .gitignore support
  • [x] Change notifications
  • [ ] Standardize MCP protocol use to work with more clients (Claude Desktop)
  • [ ] Configurable support for line numbers
  • [ ] Resource update subscriptions
  • [ ] Additional ignore patterns (beyond .gitignore)
  • [ ] Debounced notifications for high-volume file changes
  • [ ] info, create, edit, and delete tools

Recommended Servers

Claude Code MCP

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.

Featured
Local
JavaScript
Excel MCP Server

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.

Featured
Local
Go
Crawlab MCP Server

Crawlab MCP Server

Official
Python
Edit File Lines 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.

Local
TypeScript
MCP Excel Reader

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.

Local
JavaScript
Filesystem MCP Server

Filesystem MCP Server

A Model Context Protocol server that provides file system operations, analysis, and manipulation capabilities through a standardized tool interface.

Local
TypeScript
WASM MCP Server

WASM MCP Server

This server enables running a Model Context Protocol in a web browser with functionalities including arithmetic operations and session-based key-value storage.

Local
TypeScript
Markdownify MCP Server

Markdownify MCP Server

Converts various file types and web content to Markdown format. It provides a set of tools to transform PDFs, images, audio files, web pages, and more into easily readable and shareable Markdown text.

Local
TypeScript
Project Content Server

Project Content Server

An MCP server that provides access to project files and their contents, allowing users to retrieve file data from specified project directories with error handling and configuration options.

Local
TypeScript
Markdown Downloader

Markdown Downloader

An MCP server that enables users to download webpages as markdown files using r.jina.ai service, with features for configurable download directories and automatic date-stamped filenames.

Local
JavaScript