You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
# Rust MCP Filesystem
6
6
7
-
Rust MCP Filesystem is a blazingly fast, asynchronous, and lightweight MCP (Model Context Protocol) server designed for efficient handling of various filesystem operations.
7
+
Rust MCP Filesystem is a blazingly fast, asynchronous, and lightweight MCP (Model Context Protocol) server designed for efficient handling of various filesystem operations.
8
8
This project is a pure Rust rewrite of the JavaScript-based `@modelcontextprotocol/server-filesystem`, offering enhanced capabilities, improved performance, and a robust feature set tailored for modern filesystem interactions.
9
9
10
10
🚀 Refer to the [project documentation](https://rust-mcp-stack.github.io/rust-mcp-filesystem) for installation and configuration instructions.
@@ -14,8 +14,9 @@ This project is a pure Rust rewrite of the JavaScript-based `@modelcontextprotoc
14
14
-**⚡ High Performance**: Built in Rust for speed and efficiency, leveraging asynchronous I/O to handle filesystem operations seamlessly.
15
15
-**🔒 Read-Only by Default**: Starts with no write access, ensuring safety until explicitly configured otherwise.
16
16
-**🔍 Advanced Glob Search**: Supports full glob pattern matching allowing precise filtering of files and directories using standard glob syntax.For example, patterns like `*.rs`, `src/**/*.txt`, and `logs/error-???.log` are valid and can be used to match specific file types, recursive directory searches, or patterned filenames.
17
-
-**📁 Nested Directories**: Improved directory creation, allowing the creation of nested directories.
18
-
-**📦 Lightweight**: Standalone with no external dependencies (e.g., no Node.js, Python etc required), compiled to a single binary with a minimal resource footprint, ideal for both lightweight and extensive deployment scenarios.
17
+
-**🔄 MCP Roots support**: enabling clients to dynamically modify the list of allowed directories (disabled by default).
18
+
-**📦 ZIP Archive Support**: Tools to create ZIP archives from files or directories and extract ZIP files with ease.
19
+
-**🪶 Lightweight**: Standalone with no external dependencies (e.g., no Node.js, Python etc required), compiled to a single binary with a minimal resource footprint, ideal for both lightweight and extensive deployment scenarios.
19
20
20
21
#### 👉 Refer to [capabilities](https://rust-mcp-stack.github.io/rust-mcp-filesystem/#/capabilities) for a full list of tools and other capabilities.
Copy file name to clipboardExpand all lines: docs/README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Rust MCP Filesystem
2
2
3
-
Rust MCP Filesystem is a blazingly fast, asynchronous, and lightweight MCP (Model Context Protocol) server designed for efficient handling of various filesystem operations.
3
+
Rust MCP Filesystem is a blazingly fast, asynchronous, and lightweight MCP (Model Context Protocol) server designed for efficient handling of various filesystem operations.
4
4
This project is a pure Rust rewrite of the JavaScript-based **@modelcontextprotocol/server-filesystem**, offering enhanced capabilities, improved performance, and a robust feature set tailored for modern filesystem interactions.
5
5
6
6
Refer to the [quickstart](quickstart.md) guide for installation and configuration instructions.
@@ -9,7 +9,8 @@ Refer to the [quickstart](quickstart.md) guide for installation and configuratio
9
9
10
10
-**⚡ High Performance**: Built in Rust for speed and efficiency, leveraging asynchronous I/O to handle filesystem operations seamlessly.
11
11
-**🔒 Read-Only by Default**: Starts with no write access, ensuring safety until explicitly configured otherwise.
12
-
-**🔍 Advanced Glob Search**: Full glob pattern matching for precise file and directory filtering (e.g., `*.rs`, `src/**/*.txt`, `logs/error-???.log`).
12
+
-**🔍 Advanced Glob Search**: Supports full glob pattern matching allowing precise filtering of files and directories using standard glob syntax.For example, patterns like `*.rs`, `src/**/*.txt`, and `logs/error-???.log` are valid and can be used to match specific file types, recursive directory searches, or patterned filenames.
13
+
-**🔄 MCP Roots support**: enabling clients to dynamically modify the list of allowed directories (disabled by default).
13
14
-**📦 ZIP Archive Support**: Tools to create ZIP archives from files or directories and extract ZIP files with ease.
14
15
-**🪶 Lightweight**: Standalone with no external dependencies (e.g., no Node.js, Python etc required), compiled to a single binary with a minimal resource footprint, ideal for both lightweight and extensive deployment scenarios.
#[command(about = "A lightning-fast, asynchronous, and lightweight MCP server designed for efficient handling of various filesystem operations",
6
+
#[command(about = "A lightning-fast, asynchronous, and lightweight MCP server designed for efficient handling of various filesystem operations",
7
7
long_about = None)]
8
8
pubstructCommandArguments{
9
9
#[arg(
10
10
short = 'w',
11
11
long,
12
-
help = "Enables read/write mode for the app, allowing both reading and writing."
12
+
help = "Enables read/write mode for the app, allowing both reading and writing. Defaults to disabled."
13
13
)]
14
14
puballow_write:bool,
15
15
#[arg(
16
-
help = "List of directories that are permitted for the operation.",
16
+
help = "List of directories that are permitted for the operation. It is required when 'enable-roots' is not provided OR client does not support Roots.",
17
17
long_help = concat!("Provide a space-separated list of directories that are permitted for the operation.\nThis list allows multiple directories to be provided.\n\nExample: ", env!("CARGO_PKG_NAME")," /path/to/dir1 /path/to/dir2 /path/to/dir3"),
18
-
required = true
18
+
required = false
19
19
)]
20
20
puballowed_directories:Vec<String>,
21
+
22
+
#[arg(
23
+
short = 't',
24
+
long,
25
+
help = "Enables dynamic directory access control via Roots from the MCP client side. Defaults to disabled.\nWhen enabled, MCP clients that support Roots can dynamically update the allowed directories.\nAny directories provided by the client will completely replace the initially configured allowed directories on the server."
26
+
)]
27
+
pubenable_roots:bool,
28
+
}
29
+
30
+
implCommandArguments{
31
+
pubfnvalidate(&self) -> Result<(),String>{
32
+
if !self.enable_roots && self.allowed_directories.is_empty(){
33
+
returnErr(format!(
34
+
" <ALLOWED_DIRECTORIES> is required when `--enable-roots` is not provided.\n Run `{} --help` to view the usage instructions.",
0 commit comments