文件系统SSE
STDIO安全文件系统操作的MCP服务器
安全文件系统操作的MCP服务器
Node.js server SSE implementing Model Context Protocol (MCP) for filesystem operations.
Note: The server will only allow operations within directories specified via args.
file://system: File system operations interfaceread_file
path (string)read_multiple_files
paths (string[])write_file
path (string): File locationcontent (string): File contentedit_file
path (string): File to editedits (array): List of edit operations
oldText (string): Text to search for (can be substring)newText (string): Text to replace withdryRun (boolean): Preview changes without applying (default: false)create_directory
path (string)list_directory
path (string)move_file
source (string)destination (string)search_files
path (string): Starting directorypattern (string): Search patternexcludePatterns (string[]): Exclude any patterns. Glob formats are supported.get_file_info
path (string)list_allowed_directories
Note: you can provide sandboxed directories to the server by mounting them to /projects. Adding the ro flag will make the directory readonly by the server.
Note: all directories must be mounted to /projects by default.
docker build -t mcp/filesystem -f Dockerfile .
docker run -i --mount type=bind,src=type=bind,src=/path/to/other/allowed/dir,dst=/projects/other/allowed/dir,ro -p 3001:3001 mcp/filesystem /projects
{ "mcpServers": { "file_system": { "name": "file_system", "baseUrl": "http://ip:3001/sse" } } }
npm install
node .\dist\index.js C:\Users\User\Desktop\project
allowed directories: C:\Users\User\Desktop\project
{ "mcpServers": { "file_system": { "name": "file_system", "baseUrl": "http://127.0.0.1:3001/sse" } } }
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.