Golang Filesystem Server
FreeGo 语言实现的安全文件操作,带可配置访问控制。
FreeFree tier
About Golang Filesystem Server
This MCP (Model Context Protocol) server, written in Go, provides secure and configurable access to the local filesystem. It exposes a set of tools for file operations (read, write, copy, move, delete, modify with regex), directory operations (list, create, tree view), search (by filename or content), and file metadata retrieval. Access is restricted to a configurable set of allowed directories, enhancing security. Designed for integration with AI agents and MCP-compatible hosts, it enables automated file management and data retrieval tasks.
Key Features
Secure access with configurable allowed directories
File operations: read, write, copy, move, delete, modify (with regex/string replacement)
Directory operations: list, create, tree view with depth control
Search: find files by name or search within file contents
Metadata retrieval: get file/directory info
Supports recursion, symbolic links, and wildcard patterns
Written in Go, cross-platform and lightweight
Pros & Cons
Pros
- Open source and free to use
- Secure by design with allowed directory restriction
- Comprehensive set of file and directory operations
- Supports regex-based modifications for advanced text manipulation
- Written in Go for performance and portability
- Easy to deploy with Docker support
Cons
- Requires external MCP host to function (not a standalone application)
- Limited to local filesystem; no remote or cloud storage support
- Configuration requires technical knowledge (e.g., allowed directories)
- No graphical interface; CLI/API only
Best For
AI agents requiring controlled access to local filesAutomated file management and content manipulationIntegrating filesystem capabilities into MCP-based workflowsSecure file browsing and editing via AI assistants
FAQ
What is the Model Context Protocol (MCP)?
MCP is a protocol for enabling AI models to interact with external tools and resources. This server implements the filesystem subset of MCP.
Which directories can the server access?
By default, access is restricted to a configurable list of allowed directories to enhance security. Use the list_allowed_directories tool to see them.
Does the server support recursive operations?
Yes, tools like delete_file have a recursive option, and search_files traverses directories recursively. The tree tool also supports depth limits.
Can I use regex in the modify_file tool?
Yes, the modify_file tool supports both plain text and regex patterns for find and replace operations.