Filesystem MCP Server
Enhanced FileSystem MCP server
gomcpgo
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 contentsread_multiple_files
: Read multiple files simultaneously
File Writing
write_file
: Create or overwrite files
Directory Operations
create_directory
: Create new directorieslist_directory
: List directory contentslist_allowed_directories
: Show accessible directories
File Management
move_file
: Move or rename files and directoriesget_file_info
: Get file metadatasearch_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
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.
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.

Crawlab MCP Server
Edit File Lines MCP Server
A TypeScript-based MCP server that provides tools for making precise line-based edits to text files within allowed directories.
MCP Excel Reader
Provides efficient handling of large Excel files through automatic chunking and pagination, using MCP to enable seamless file reading and management features such as sheet selection and error handling.

MD Webcrawl MCP
A Python-based MCP server that crawls websites to extract and save content as markdown files, with features for mapping website structure and links.
mcp-server-code-assist
A Model Context Protocol server that provides tools for code modification and generation via Large Language Models, allowing users to create, modify, rewrite, and delete files using structured XML instructions.
mcp-editor
A TypeScript MCP server port of Anthropic's filesystem editing tools, allowing file manipulation via client-approved operations without automated writes to prevent system harm.
Terminal Controller for MCP
An MCP server that enables secure terminal command execution, directory navigation, and file system operations through a standardized interface for LLMs.

Obsidian MCP REST Server
Provides a standardized interface for AI assistants to interact with Obsidian vaults through a local REST API, enabling reading, writing, searching, and managing notes.