- Home
- MCP servers
- Filesystem MCP Ignore Server
Filesystem MCP Ignore Server
- javascript
3
GitHub Stars
javascript
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": {
"cyberhaveninc-filesystem-mcpignore": {
"command": "npx",
"args": [
"-y",
"@cyberhaven/mcpignore-filesystem",
"/Users/<username>/Desktop",
"/path/to/other/allowed/dir"
]
}
}
}You can securely expose a filesystem as an MCP server and control which files a client can access using a .mcpignore file. This server builds on a filesystem MCP foundation and adds per-directory ignore rules so clients can read, write, and navigate only the paths you allow.
How to use
You can run this MCP server locally and connect your MCP client to perform common file operations while respecting ignore rules. The server supports reading and writing files, creating and listing directories, moving items, searching files, and retrieving metadata. Use a per-directory .mcpignore to restrict access based on patterns similar to .gitignore. The ignore rules apply to the list of allowed directories you provide as arguments.
How to install
Prerequisites: Node.js and npm (Node.js 14+ recommended). Ensure you have npm in your PATH.
Install and run using NPX as shown in the example configuration.
{
"mcpServers": {
"mcpignore_filesystem": {
"command": "npx",
"args": [
"-y",
"@cyberhaven/mcpignore-filesystem",
"/Users/<username>/Desktop",
"/path/to/other/allowed/dir"
]
}
}
}
Additional content
Notes:
- Create an .mcpignore file for each directory specified via args. Patterns follow the same rules as .gitignore. Examples include ignoring a single file, ignoring all files of a type, or ignoring an entire directory.
API behavior notes: various file operations are blocked or allowed according to the ignore paths. Directory listing and file name retrieval are allowed for directory_tree and search_files, while most write operations are blocked unless the path is allowed.
Available tools
read_file
Read a file's contents from an allowed path; access is blocked if the path is not permitted by the .mcpignore rules.
read_multiple_files
Read multiple files concurrently from allowed paths, subject to ignore rules.
write_file
Write data to a file at an allowed path within the permitted directory set.
edit_file
Modify an existing file located in an allowed path.
create_directory
Create a new directory within an allowed parent path.
list_directory
List contents of an allowed directory, reflecting ignore restrictions.
directory_tree
Retrieve the structure of allowed directories, returning file names only.
move_file
Move a file or directory to another allowed location, respecting ignore rules.
search_files
Search for files within the permitted areas, obeying ignore patterns.
get_file_info
Get metadata for a file or directory located in an allowed path.
list_allowed_directories
Return the list of directories that are allowed for client access.