High-Performance File System MCP Server

High-Performance File System MCP Server

A secure, Dockerized MCP server enabling AI assistants to perform file and directory CRUD operations like read, write, edit, search, and manage local files via natural language.

Category
访问服务器

README

<div align="center">

📁 High-Performance File System MCP Server

Secure, Dockerized Model Context Protocol (MCP) Server for File & Directory CRUD Operations

MCP Version Docker Node.js License: MIT


Empower your AI assistants (Claude Desktop, Cursor, Codex, Windsurf, Continue.dev) to read, write, edit, search, and manage local files and folders seamlessly via Docker Desktop.

</div>


📑 Table of Contents


✨ Core Capabilities

Feature Tool Name Description
Read File read_file Read text content of any file within mounted folders.
Read Batch read_multiple_files Read multiple files in a single request for fast analysis.
Create / Overwrite write_file Create new files or overwrite existing files safely.
Edit & Patch edit_file Replace target text blocks (single or replaceAll mode).
Delete File delete_file Delete specified files from the filesystem.
Create Folder create_directory Create recursive directory trees (mkdir -p).
List Folder list_directory List folder contents with file size, type, & timestamp metadata.
Delete Folder delete_directory Remove folders recursively or non-recursively.
Move / Rename move_file Move or rename files and directories.
File Metadata get_file_info Inspect file stats (size, creation/modified dates, attributes).
Search Files search_files Search files via glob patterns (**/*.ts, *.json), including hidden dotfiles.

🏗️ How It Works (Architecture)

┌─────────────────────────────────────────────────────────────────┐
│                      AI Client / IDE                            │
│  (Claude Desktop, Cursor, Codex, Windsurf, Continue.dev, etc.)  │
└───────────────────────────────┬─────────────────────────────────┘
                                │ JSON-RPC over Stdio
                                ▼
┌─────────────────────────────────────────────────────────────────┐
│                    Docker Desktop Container                     │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │               Node.js MCP Server Runtime                  │  │
│  │   - Security validation against allowed directories        │  │
│  │   - Full File & Folder CRUD Operations                    │  │
│  └────────────────────────────┬──────────────────────────────┘  │
└───────────────────────────────┼─────────────────────────────────┘
                                │ Volume Mount (-v)
                                ▼
┌─────────────────────────────────────────────────────────────────┐
│                      Host Filesystem                            │
│   (e.g., C:\Users\Username\Desktop  ──>  Mounted as /data)      │
└─────────────────────────────────────────────────────────────────┘

[!SECURITY NOTE] Containerized Isolation: The AI client can only read and modify files in directories explicitly passed to the container via Docker volume mounts (-v). Your rest of system remains isolated.


🚀 Quick Start Guide

1. Clone Repository

git clone https://github.com/SohailShabbir867/file_mcp_server.git
cd file_mcp_server

2. Build Docker Image

Build the container image tagged as file-mcp-server:

docker build -t file-mcp-server .

Verify that the image is ready:

docker images | grep file-mcp-server

📂 Connecting Files & Folders via MCP

Docker volume mounts (-v) control which local folders on your computer are accessible to the AI through the MCP server. Inside the container, mounted paths map to /data.

Scenario A: Access Desktop Folder Only

Mount only your Windows or macOS Desktop folder:

  • Windows: -v "C:\Users\YourName\Desktop:/data"
  • macOS / Linux: -v "/Users/yourname/Desktop:/data"

Scenario B: Access Entire User Directory

Mount your entire User home folder to allow access to Desktop, Documents, Downloads, Projects, etc.:

  • Windows: -v "C:\Users\YourName:/data"
  • macOS / Linux: -v "/Users/yourname:/data"

Scenario C: Access Specific Workspace or Project

Mount a specific project directory:

  • Windows: -v "D:\Projects\MyApp:/data"
  • macOS / Linux: -v "/Users/yourname/Projects/MyApp:/data"

Scenario D: Access Multiple Folders or Drives

You can pass multiple volume mounts to access multiple paths:

docker run -i --rm \
  -v "C:\Users\YourName\Desktop:/data/desktop" \
  -v "D:\Projects:/data/projects" \
  file-mcp-server /data/desktop /data/projects

💻 Client Integration Guides

1. Claude Desktop

Configuration File Location:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Config File Example:

Open claude_desktop_config.json and add the file-server configuration:

{
  "mcpServers": {
    "file-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "C:\\Users\\Sohail Shabbir\\Desktop:/data",
        "file-mcp-server"
      ]
    }
  }
}

[!TIP] Windows Path Formatting: Remember to use double backslashes (\\) in claude_desktop_config.json (e.g. C:\\Users\\YourName\\Desktop:/data). After updating the file, restart Claude Desktop. Look for the hammer icon 🛠️ to confirm tools are loaded!


2. Cursor IDE

  1. Open Cursor Settings (Ctrl + , or Cmd + ,).
  2. Navigate to Features -> MCP Servers.
  3. Click + Add New MCP Server.
  4. Set the following fields:
    • Name: file-server
    • Type: command
    • Command:
      docker run -i --rm -v "C:\Users\Sohail Shabbir\Desktop:/data" file-mcp-server
      
  5. Click Save.

3. Codex / Continue.dev / VS Code

For Continue.dev or VS Code MCP Extensions, add the server to your MCP configuration file (e.g., ~/.continue/config.json or .mcp.json):

{
  "mcpServers": [
    {
      "name": "file-server",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "C:\\Users\\Sohail Shabbir\\Desktop:/data",
        "file-mcp-server"
      ]
    }
  ]
}

4. Windsurf / Cline / Roo Code

In your extension settings (cline_mcp_settings.json or Windsurf MCP settings):

{
  "mcpServers": {
    "file-server": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-v",
        "C:\\Users\\Sohail Shabbir\\Desktop:/data",
        "file-mcp-server"
      ],
      "disabled": false,
      "autoApprove": []
    }
  }
}

🛠️ Tool Reference & Example Prompts

Tool Key Parameters Example Prompt for AI Client
read_file path "Read the content of /data/todo.txt"
read_multiple_files paths: [...] "Compare /data/config.json and /data/config.prod.json"
write_file path, content, overwrite "Create a file /data/notes/ideas.md with my meeting summary"
edit_file path, target, replacement, replaceAll "Replace v1.0.0 with v1.1.0 in /data/package.json"
delete_file path "Delete temp file /data/scratch.log"
create_directory path "Create folder /data/projects/new-app/src"
list_directory path "List all files and folders inside /data"
delete_directory path, recursive "Delete directory /data/old-builds"
move_file source, destination "Rename /data/draft.txt to /data/final.txt"
get_file_info path "Check creation date and size of /data/report.pdf"
search_files directory, pattern "Search for all .ts files inside /data/src"

🔧 Local Development (Without Docker)

To run or debug the server directly using Node.js:

# 1. Install dependencies
npm install

# 2. Build TypeScript source
npm run build

# 3. Start server with allowed base directory
node dist/index.js "C:\Users\Sohail Shabbir\Desktop"

❓ Troubleshooting & FAQ

Q1: docker: command not found or connection error

  • Solution: Ensure Docker Desktop is installed and running in your taskbar.

Q2: Path permission denied inside Claude or Cursor

  • Solution: Check your -v volume mount path. Ensure the directory exists on your computer and your user account has read/write permissions.

Q3: Cannot find files created by AI

  • Solution: Files created inside /data will appear directly inside the mounted folder on your computer (e.g. C:\Users\YourName\Desktop).

📄 License

This project is licensed under the MIT License. Feel free to use, modify, and distribute!

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选