
mcp filesystem
Model Context Protocol (MCP) server with a resource for each file in a workspace
Repository Info
About This Server
Model Context Protocol (MCP) server with a resource for each file in a workspace
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
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
.gitignorerules - 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_changedevents - Resource Content Access: Ability to request and render resource content with appropriate MIME types
About
This project uses:
- mark3labs/mcp-go for MCP communication
- fsnotify for file system event monitoring
- go-gitignore for parsing
.gitignorefiles
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
- Resources for each file in workspace
- .gitignore support
- 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, anddeletetools
Quick Start
Clone the repository
git clone https://github.com/isaacphi/mcp-filesystemInstall dependencies
cd mcp-filesystem
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.