MCPIgnore Filesytem

MCPIgnore Filesytem

Data security focused filesystem MCP server with .mcpignore support for access control.

3
Stars
2
Forks
2
Releases

Overview

This Node.js-based MCP server extends the standard Filesystem MCP Server to add per-directory ignore rules via `.mcpignore`. It enables you to control which files MCP Clients can access by patterns, modeled after `.gitignore`. You specify base directories to expose via `args`, and create an `.mcpignore` file in each directory to define which files and subdirectories should be hidden from clients. The server supports common filesystem operations like reading and writing files, and creating, listing, or deleting directories, while enforcing the ignore rules. Certain operations are blocked by default unless permitted by the ignore configuration: read_file, read_multiple_files, write_file, edit_file, create_directory, list_directory, and move_file are blocked; directory_tree is allowed (but only to retrieve file names); search_files is allowed (again, limited to retrieving names); get_file_info is blocked. A note explains that an `.mcpignore` should exist for each directory provided in `args`. Patterns in `.mcpignore` follow the same syntax as `.gitignore`, with examples such as ignoring specific files, extensions, and entire directories. The project references the Filesystem MCP Server API Spec and provides an NPX-based usage example for deployment. It also includes client config guidance for Claude, Cline, and Cursor.

Details

Owner
CyberhavenInc
Language
JavaScript
License
MIT License
Updated
2025-12-07

Features

Access control via `.mcpignore`

Control MCP client's access to the filesystem using per-directory ignore rules defined in `.mcpignore`.

Read/write files

Support for reading and writing files within the allowed filesystem.

Create/list/delete directories

Ability to create, list, and delete directories under access control.

Move files/directories

Support moving files and directories while enforcing ignore rules.

Search files

Provide search functionality within the allowed filesystem (limited to file names as per ignore constraints).

Get file metadata

Retrieve metadata for files within the allowed scope.

Per-directory `.mcpignore` configuration

Require an `.mcpignore` file for each directory specified via `args` to define access rules.

Tags

filesystemmcpignoredata-securityaccess-controlgitignore-patternsnodejsmcp