Secure MCP Filesystem Server

A secure Model Context Protocol (MCP) server providing filesystem access within predefined directories
  • typescript

7

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "gabrielmaialva33-mcp-filesystem": {
      "command": "mcp-filesystem",
      "args": [
        "/path/to/allowed/directory"
      ]
    }
  }
}

Secure MCP Filesystem Server provides safe, controlled filesystem access for AI models using the Model Context Protocol. It enforces strict path validation and only exposes predefined directories, allowing you to grant precise access to your data while maintaining security and auditability.

How to use

You connect to the MCP Filesystem Server from your MCP client to access and manage files within allowed directories. Choose one of the supported execution modes to start the server and point the client to the server. You can run the server locally, via NPX, or with Docker, depending on your environment and preferences.

Using local installation

Run the server directly from your development environment to work with a specific directory tree. The following command runs the server and grants access to the directory you specify.

# Start the server for a specific allowed directory
mcp-filesystem /path/to/allowed/directory

Using NPX

If you don’t want a local installation, you can run the server with NPX. This downloads and runs the latest MCP Filesystem Server without a global install.

npx @gabrielmaialva33/mcp-filesystem /path/to/allowed/directory

Using Docker

Docker provides a portable and isolated runtime. You mount your data into the container and run the server inside Docker. Ensure your data directories are accessible from the container.

# Build the image
docker build -t gabrielmaialva33/mcp-filesystem .

# Run with a data directory mounted into the container
docker run -i --rm \
  -v /path/to/data:/projects \
  gabrielmaialva33/mcp-filesystem \
  /projects

Using Docker with a config file

If you prefer to run with a configuration file, mount the config into the container and specify it as an argument.

docker run -i --rm \
  -v /path/to/config.json:/app/config.json \
  -v /path/to/data:/projects \
  gabrielmaialva33/mcp-filesystem \
  --config=/app/config.json

Available security and performance options

Your server can enforce strict file size limits, decide whether symlinks are allowed, and tune caching and logging. Create a configuration file that specifies allowed directories, logging level, and resource limits to fit your security and performance needs.

How to configure your client

Configure your MCP client to connect to the server by specifying a filesystem MCP server entry. You can choose a local stdio command, NPX, or Docker-based setup depending on your deployment.

Available tools

read_file

Read the contents of a file at a given path.

read_multiple_files

Read multiple files in a single operation.

write_file

Create or overwrite a file with specified content.

edit_file

Edit a file with diff preview before applying changes.

create_directory

Create directories recursively.

list_directory

List the contents of a directory.

directory_tree

Get a recursive tree representation of a directory.

move_file

Move or rename a file.

search_files

Search for files matching patterns.

get_file_info

Retrieve metadata for a file or directory.

list_allowed_directories

Show all directories you are allowed to access.

get_metrics

View server performance metrics (v0.3.0+).

execute_command

Execute secure system commands with validation (v0.3.1+).

curl_request

Make HTTP requests to external APIs (coming in v1.2.0).

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational