# FileSystem MCP Server [Health: Active]

**Category:** 📂 File Systems  
**Repository:** https://github.com/Oncorporation/filesystem_server  
**GitHub Stars:** 5  
**Views:** 7  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/filesystem-mcp-server

## Description
Secure filesystem access for AI agents with configurable directory and file type restrictions

## Tools
Capabilities this server exposes over MCP:

- **init** — 
    Initialize and verify accessibility of allowed directories.
    Optionally list a directory and/or read a file if parameters are provided.
    
    Args:
        directory: Optional directory path to list contents
        file_path: Optional file path to read content
    
    Returns:
        A dictionary containing:
        - message: Status message ("OK" if all directories accessible, error description if not)
        - isError: Boolean indicating if there was an error
        - details: Additional information about directory accessibility
        - directory_contents: Optional list of directory contents if directory parameter provided
        - file_content: Optional file content if file_path parameter provided
    
- **list_directory** — 
    List files and subdirectories in the given directory with optional progress reporting.
    
    Args:
        directory: The absolute or relative path to the directory (supports both / and \ separators).
        report_progress: Whether to include progress information in the response.
        batch_size: Number of items to process before reporting progress (default: 100).
    
    Returns:
        If report_progress is False: A list of file and directory names in the directory.
        If report_progress is True: A dictionary containing:
            - contents: List of file and directory names
            - progress_info: Dictionary with progress details
            - total_items: Total number of items found
            - processing_time: Time taken to process the directory
        
        If an error occurs, returns a dictionary with "error" and "error_message" keys.
    
- **read_file** — 
    Read the content of a file.
    
    Args:
        file_path: The absolute or relative path to the file (supports both / and \ separators).
    
    Returns:
        The text content of the file.
    
    Raises:
        ValueError: If the file is not allowed, does not exist, or has a disallowed extension.
    
- **list_resources** — 
    List all resources (files and directories) in the specified directory (or all allowed_dirs if not specified) in MCP resource format.
    Supports progress reporting for large workspaces.
    Args:
        directory: Directory to start from (optional, defaults to all allowed_dirs)
        report_progress: If True, returns progress info and batches
        batch_size: Number of resources per progress batch
    Returns:
        If report_progress is False: List of all resource objects
        If report_progress is True: Dict with contents, progress_info, total_items, processing_time
    
- **get_resource** — 
    Get metadata and actions for a specific file or directory at the given path.
    Returns a resource object or an error if not found or not allowed.
    
- **read_file_binary** — 
    Read the content of a file as base64-encoded bytes.
    Returns a dict with 'content_base64' (base64 string) or an error.
    
- **write_file** — 
    Write text content to a file.

    Args:
        file_path: The absolute or relative path to the file (supports both / and \ separators).
        content: The text content to write.

    Raises:
        ValueError: If the file is not allowed, parent directory issues, disallowed extension, or write fails.
    
- **write_file_binary** — 
    Write binary content to a file from base64-encoded string.
    Returns a dict with success status or error.

    Args:
        file_path: The absolute or relative path to the file (supports both / and \ separators).
        content_base64: Base64-encoded binary content.

    Returns:
        {"success": true, "bytes_written": int, "encoding": "base64", "error": false} on success
        {"error": true, "error_message": str} on failure
    

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "filesystem-mcp-server": {
    "command": "uvx",
    "args": ["vs-filesystem-mcp-server"]
  }
}
```

## Documentation

## What FileSystem MCP Server does

FileSystem MCP Server MCP server exposes selected local directories and files to an AI agent through MCP. It is intended for Visual Studio 2022+ workflows, local development, and individual project folders that do not use `.code-workspace` files. Access is limited by an allowlist of directories and permitted file extensions.

The server can inspect directory contents, read approved files, validate configured paths, and optionally write text or binary content. Writing is disabled unless explicitly enabled, so a read-only setup is the default. This makes the server suitable when an agent needs project context without unrestricted access to the host filesystem.

## How it works

At startup, the server loads its allowed directories and extensions from command-line arguments when they are provided. If no arguments are present, it reads `config.json`. This hybrid behavior supports one configuration for an MCP client and another convenient fallback for local debugging. Command-line values override the configuration file.

Call `init` first to check that configured directories are accessible. It can also list a directory or read a file during that validation request. Successful initialization reports an OK result and the configuration source; failures include error details for inaccessible directories.

Paths may be absolute or relative, and both Windows backslashes and Unix-style forward slashes are supported. File operations remain constrained to the configured directories and extensions.

## Setup and configuration

Install the packaged server with Python 3.10 or newer:

```bash
pip install vs-filesystem-mcp-server
```

For source development, clone the repository and run `uv sync`. An MCP client can launch the installed `vs-filesystem-mcp-server` command. When running from source, configure Python with the absolute path to `app.py` and set the working directory to the project directory.

A `config.json` file contains `allowed_dirs`, `allowed_extensions`, and `allow_write`. For MCP use, place it beside `.mcp.json`; for Visual Studio debugging, place it beside `app.py`. Alternatively, pass `--allowed-dirs` and `--allowed-extensions` in the MCP command configuration. Enable writes with `--allow-write true` or `"allow_write": true`.

## Tools and capabilities

FileSystem MCP Server MCP server provides these documented operations:

- `init`: Validates configured directories and can optionally list a directory or read a file.
- `list_directory`: Lists files and subdirectories, with optional progress reporting and batching.
- File reading: Reads content from files whose paths and extensions are allowed.
- `write_file`: Writes text to a permitted path when write access is enabled.
- `write_file_binary`: Writes Base64-encoded binary data when write access is enabled.

Directory and file parameters accept absolute or relative paths. Write paths must remain within an allowed directory. The available file types are determined by the configured extension list, such as Python, JavaScript, TypeScript, JSON, Markdown, C#, CSS, HTML, XML, and XAML files.

## Limitations and notes

The server is local rather than a remote storage or collaboration service. It only exposes directories explicitly configured by the operator, and file access is further restricted by allowed extensions. Write operations are opt-in and disabled by default.

The README focuses on Visual Studio 2022+ and similar local development environments. It does not describe support for multi-root workspaces, remote filesystems, or client-specific features beyond MCP configuration and Visual Studio debugging. Ensure paths and permissions are valid, then use `init` before relying on other operations.

_Full upstream README: https://allmcps.com/mcp/filesystem-mcp-server/readme_

