FileSystem Server

FileSystem Server

Local MCP server enabling code-workspace access with selective folder/file permissions.

3
Stars
1
Forks
0
Releases

Overview

FileSystem MCP Server is a local MCP server designed for Visual Studio 2022 that exposes a curated subset of the local filesystem to MCP clients and AI agents. It supports code-workspace style workflows by enabling selective access to project folders and files, while enforcing an allow-list of directories and file extensions. The server provides core capabilities such as directory traversal, reading file contents, and reading binary data. It includes a directory validation feature to verify accessibility of configured directories. The server uses a hybrid configuration model: command-line arguments (MCP) can set allowed_dirs and allowed_extensions directly, and a config.json file can serve as a fallback for debugging; in Visual Studio 2022 debugging, config.json placed next to app.py is automatically used, while in MCP client deployments, config.json is typically placed alongside the .mcp.json file. When both sources are present, command-line arguments take precedence over config.json. The API exposes tools like init(directory, file_path), list_directory(directory, report_progress, batch_size), read_file(file_path), read_file_binary(file_path), list_resources(directory, report_progress, batch_size), and get_resource(path). This setup is intended for local development in VS 2022 or similar environments, with cross-platform path support and clear error handling to aid debugging and testing.

Details

Owner
Oncorporation
Language
Python
License
Apache License 2.0
Updated
2025-12-07

Features

Directory Traversal

List contents of allowed directories

File Reading

Read contents of files with allowed extensions

Directory Validation

Check accessibility of configured directories

Hybrid Configuration

Command-line arguments (MCP) + config.json fallback (debugging)

Visual Studio 2022 Debugging

No-argument startup support

Cross-Platform Path Support

Automatically handles both Windows and Unix path separators

Security

Access restricted to explicitly specified directories and file types

Local Development Focus

Perfect for Visual Studio 2022 and similar environments

Audience

VS2022 developersDebug and run a local MCP server for Visual Studio 2022.
MCP clientsConfigure and use the server in MCP workflows to access resources.
AI agentsProvide selective filesystem access to AI agents.

Tags

Visual Studio 2022MCPfilesystemcode-workspacesecuritycross-platformlocal developmentPythonconfig.jsonmcp.jsondebuggingCLI