Cover image
Try Now
2025-04-14

模型上下文协议(MCP)服务器,具有工作区中每个文件的资源

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

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

  • 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, and delete tools

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

    Reviews

    2 (1)
    Avatar
    user_hsVBaPsO
    2025-04-16

    I've been using the mcp-filesystem by isaacphi, and it's been a game-changer for managing my file systems. The seamless integration and user-friendly interface make it an essential tool. Highly recommend checking it out! You can find more details at the official GitHub link: https://github.com/isaacphi/mcp-filesystem.