
A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

A secure Model Context Protocol server for filesystem operations, offering tools for listing, reading, writing, searching, and editing files within configurable allowed directories.
Filesystem MCP Server is cataloged as an MCP server attributed to colinrozzi. A secure Model Context Protocol server for filesystem operations, offering tools for listing, reading, writing, searching, and editing files within configurable allowed directories. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Filesystem MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Yes; allowed directories can be set at startup or through environment variables and configuration files.
All file and directory paths must be full absolute paths located within a configured allowed directory.
README.md · 1d60d882c097 · 采集于 2026-11-13 12:08:54 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A secure Model Context Protocol (MCP) server implementation for filesystem operations.
The Filesystem MCP Server provides a standardized interface for interacting with the local filesystem through the Model Context Protocol. It allows clients to perform common file operations such as listing directories, reading files, and searching file contents in a secure and controlled manner.
The server provides the following MCP tools:
All operations are constrained to configurable allowed directories for security.
All filesystem operations are constrained to a set of configurable allowed directories. The server validates paths to prevent directory traversal attacks and other security issues. Operations that would access files outside the allowed directories are rejected with appropriate error messages.
All file and directory paths provided to the server must be specified as full absolute paths. These paths must be located within one of the configured allowed directories to be accessible.
Prerequisites:
To build the server:
cargo build --release
# Run with current directory as the allowed directory
./target/release/fs-mcp-server
# Specify allowed directories (comma-separated)
./target/release/fs-mcp-server --allowed-dirs /path/to/dir1,/path/to/dir2
# Use a configuration file listing allowed directories
./target/release/fs-mcp-server --config-file /path/to/config.txt
# Set maximum file size
./target/release/fs-mcp-server --max-file-size 5242880 # 5MB
You can specify allowed directories in a configuration file with one directory per line:
# This is a comment
/path/to/directory1
/path/to/directory2
/another/path
The server can be configured using the following environment variables:
FS_ALLOWED_DIRS: Comma-separated list of allowed directories for filesystem operationsFS_CONFIG_FILE: Path to a configuration file listing allowed directoriesFS_MAX_FILE_SIZE: Maximum file size for read operations (in bytes)FS_REQUEST_TIMEOUT: Request timeout in secondsFS_LOG_LEVEL: Log level (error, warn, info, debug, trace)FS_LOG_FILE: Log file pathExample:
FS_ALLOWED_DIRS=/data,/home/user/docs FS_LOG_LEVEL=debug ./target/release/fs-mcp-server
The server provides the following MCP tools:
Lists files and directories at a specified path.
Parameters:
path: Full path to the directory to list files frompattern: Optional glob pattern to filter files (default: "*")recursive: Whether to list files recursively (default: false)include_hidden: Whether to include hidden files (default: false)metadata: Whether to include file metadata (default: true)Reads file contents with support for different encodings and partial reads.
Parameters:
path: Full path to the file to readencoding: File encoding (utf8, base64, binary) (default: utf8)start_line: Start line for partial read (0-indexed)end_line: End line for partial read (inclusive)max_size: Maximum number of bytes to read (default: 1MB)Searches file contents for matching patterns (grep-like functionality).
Parameters:
root_path: Full path to the root directory to start the search frompattern: Text pattern to search for in filesregex: Whether to treat pattern as regex (default: false)file_pattern: Optional glob pattern to filter which files to search (default: "*")recursive: Whether to search directories recursively (default: true)case_sensitive: Whether the search should be case-sensitive (default: false)max_results: Maximum number of results to return (default: 100)max_file_size: Maximum file size to search (default: 10MB)context_lines: Number of context lines to include (default: 0)timeout_secs: Maximum time to spend searching (default: 30s)Performs partial edits on a file without having to rewrite the entire content.
Parameters:
path: Full path to the file to editoperations: List of edit operations to perform (in order)
type: "replace"find: Text to find (exact match)replace: Text to insert as replacementoccurrence: Which occurrence to replace (0-based, -1 for all) (default: 0)case_sensitive: Whether the search is case-sensitive (default: true)type: "insert"position: Character position to insert at (0-based)content: Text to inserttype: "delete"start: Start character position (0-based, inclusive)end: End character position (0-based, exclusive)type: "replace_lines"start_line: Start line number (0-based, inclusive)end_line: End line number (0-based, inclusive)content: Text to insert as replacementcreate_if_missing: Create the file if it doesn't exist (default: false)backup: Create a backup of the original file before editing (default: false)Example:
{
"path": "/path/to/file.txt",
"operations": [
{
"type": "replace",
"find": "hello",
"replace": "hello world",
"occurrence": 0,
"case_sensitive": true
},
{
"type": "insert",
"position": 100,
"content": "new text at position 100"
},
{
"type": "replace_lines",
"start_line": 5,
"end_line": 7,
"content": "new line 6\nnew line 7\nnew line 8"
}
],
"backup": true
}
Lists all directories that the server has been configured to allow access to.
Parameters:
To use this server with an MCP client:
Example client code (using the Rust MCP client):
use mcp_client::{ClientBuilder, transport::StdioTransport};
use serde_json::json;
#[tokio::main]
async fn main() -> Result<()> {
// Path to the server executable
let server_path = "path/to/fs-mcp-server";
// Create and connect to server
let (transport, mut receiver) = StdioTransport::new(server_path, vec![]);
let client = ClientBuilder::new("fs-client", "0.1.0")
.with_transport(transport)
.build()?;
// Start message handling
let client_for_handler = client.clone();
tokio::spawn(async move {
while let Some(message) = receiver.recv().await {
if let Err(e) = client_for_handler.handle_message(message).await {
eprintln!("Error handling message: {}", e);
}
}
});
// Initialize the client
let init_result = client.initialize().await?;
println!("Connected to: {} v{}", init_result.server_info.name, init_result.server_info.version);
// List all allowed directories
let allowed_dirs_result = client.call_tool("list_allowed_dirs", &json!({})).await?;
println!("Allowed directories: {:?}", allowed_dirs_result);
// List files in a directory
let list_result = client.call_tool("list", &json!({
"path": "/path/to/directory"
})).await?;
// Process result
println!("List result: {:?}", list_result);
// Edit a file by replacing text
let edit_result = client.call_tool("edit", &json!({
"path": "/path/to/file.txt",
"operations": [
{
"type": "replace",
"find": "TODO",
"replace": "DONE",
"occurrence": -1
}
],
"backup": true
})).await?;
// Process result
println!("Edit result: {:?}", edit_result);
// Shutdown
client.shutdown().await?;
Ok(())
}
src/main.rs: Server entry point and initializationsrc/tools/: Tool implementations (list, read, search, edit, etc.)src/utils/: Utility functions (path validation, etc.)To add a new filesystem tool:
src/tools/ for your toolbuild_server() in main.rs# Build for Linux
cargo build --release --target x86_64-unknown-linux-gnu
# Build for macOS
cargo build --release --target x86_64-apple-darwin
# Build for Windows
cargo build --release --target x86_64-pc-windows-msvc
MIT
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Filesystem MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/fs-mcp-server-colinrozzi)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.