unc-filesystem-mcp

BlockSecCA/unc-filesystem-mcp

3.2

If you are the rightful owner of unc-filesystem-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The UNC Filesystem MCP is a server designed to handle filesystem operations with proper support for UNC paths on Windows, addressing specific bugs in the built-in Claude Desktop filesystem server.

Tools
7
Resources
0
Prompts
0

UNC Filesystem MCP

MCP server for filesystem operations with proper UNC path support on Windows.

Why?

The built-in Claude Desktop filesystem server has bugs with network paths:

  • Drive letter resolution is asymmetric: Mapped drives (e.g., Z:) get resolved to their UNC equivalent at config load time, but incoming requests are compared literally. Result: access denied.
  • UNC subdirectory matching fails: Even when \\server\share is in the allowed list, accessing \\server\share\subfolder is rejected.

This server normalizes both sides of the path comparison, so mapped drives and UNC subdirectories work correctly.

Installation

Option 1: MCPB Package (Recommended)

  1. Download unc-filesystem-mcp.mcpb from releases
  2. Double-click to install in Claude Desktop
  3. Use the folder picker to add allowed directories
  4. Restart Claude Desktop

Option 2: Manual Setup

git clone https://github.com/BlockSecCA/unc-filesystem-mcp.git
cd unc-filesystem-mcp
npm install
npm run build

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "unc-fs": {
      "command": "node",
      "args": [
        "C:/path/to/unc-filesystem-mcp/dist/index.js",
        "\\\\server\\share",
        "Z:\\",
        "C:\\Users\\Me\\Documents"
      ]
    }
  }
}

Tools

ToolDescription
read_fileRead file contents with optional head/tail line limits
write_fileCreate or overwrite files
edit_fileReplace unique text in file, returns unified diff
list_directoryList directory contents with [FILE]/[DIR] prefixes
search_filesRecursive glob-based file search
get_file_infoFile/directory metadata (size, dates, permissions)
list_allowed_directoriesShow configured allowed paths

Building from Source

npm install
npm run build          # Compile TypeScript
npm run pack           # Create .mcpb package (requires @anthropic-ai/mcpb)

How It Works

The fix is in path normalization. Both the configured allowed directories and incoming request paths are normalized to the same format before comparison:

  • Backslashes → forward slashes
  • Lowercase for case-insensitive matching
  • UNC paths preserved as-is
  • Local paths resolved to absolute

This ensures Z:\subfolder matches against //server/share/ when Z: is mapped to \\server\share.

License

MIT - Carlos - BlockSecCA