Filesystem MCP Server

Filesystem MCP Server

Enhanced FileSystem MCP server

gomcpgo

File Systems
Visit Server

README

Filesystem MCP Server

A secure Model Context Protocol (MCP) server that provides filesystem operations with controlled access to specified directories.

Features

  • Directory access controlled via environment variables
  • File operations within allowed directories only
  • Thread-safe caching of allowed directories
  • Proper handling of paths with spaces

Installation

go get github.com/gomcpgo/filesys

Configuration

Set allowed directories using the environment variable:

export MCP_ALLOWED_DIRS="/path1,/path2,/path with spaces/dir3"

Tools

File Reading

  • read_file: Read single file contents
  • read_multiple_files: Read multiple files simultaneously

File Writing

  • write_file: Create or overwrite files

Directory Operations

  • create_directory: Create new directories
  • list_directory: List directory contents
  • list_allowed_directories: Show accessible directories

File Management

  • move_file: Move or rename files and directories
  • get_file_info: Get file metadata
  • search_files: Search files recursively with pattern matching

Usage with Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "/path/to/filesys",
      "env": {
        "MCP_ALLOWED_DIRS": "/path1,/path2,/path with spaces/dir3"
      }
    }
  }
}

Tool Examples

Reading a File

{
    "name": "read_file",
    "arguments": {
        "path": "/allowed/path/file.txt"
    }
}

Listing Directory

{
    "name": "list_directory",
    "arguments": {
        "path": "/allowed/path"
    }
}

Security

  • All operations restricted to allowed directories
  • Path traversal prevention
  • Permission validation before operations
  • Proper error handling and logging

Building

go build -o bin/filesys cmd/main.go

License

MIT License

Contributing

Pull requests welcome. Please ensure:

  • Tests pass
  • New features include documentation
  • Code follows project style

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
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
EverArt Forge MCP Server

EverArt Forge MCP Server

An advanced MCP server for Cline that leverages EverArt's AI models to generate vector and raster images, supporting flexible storage, multiple formats, and robust image generation capabilities.

Local
JavaScript
Google Drive MCP Server

Google Drive MCP Server

Integrates with Google Drive to enable listing, searching, and reading files, plus reading and writing to Google Sheets.

Local
TypeScript