Filesystem Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Filesystem Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
<!-- mcp-name: io.github.Oncorporation/filesystem-server -->
Local MCP server for Visual Studio 2022+ that provides code-workspace functionality by giving AI agents selective access to project folders and files
This MCP server is optimized for:
\) and Unix (/) path separatorspip install vs-filesystem-mcp-server uv sync.mcp.jsoninit() tool firstThe easiest way to get started! Create a config.json file:
For MCP server usage:
config.json in the same folder as your .mcp.json file (usually C:\Users\YourUsername\)For debugging from source (Visual Studio 2022+):
config.json in the same directory as app.py (D:/Projects/filesystem_server/){
"allowed_dirs": [
"C:/Users/YourUsername/Documents/projects",
"D:/projects",
"D:/Webs"
],
"allowed_extensions": [
".py", ".js", ".ts", ".json", ".md", ".txt",
".yml", ".yaml", ".toml", ".cfg", ".ini", ".cs",
".css", ".scss", ".htm", ".html", ".xml", ".xaml"
],
"allow_write": false
}Note: Set"allow_write": trueto enablewrite_fileandwrite_file_binarytools.
#### MCP Configuration (Installed via pip)
Add this to your .mcp.json file (usually C:\Users\YourUsername\ in VS 2022+):
{
"servers": {
"filesystem-server": {
"command": "vs-filesystem-mcp-server"
}
}
}Note: When installed via pip, the command is just vs-filesystem-mcp-server - no path to app.py needed!
#### MCP Configuration (Running from Source)
If you're developing and running from source code:
{
"servers": {
"filesystem-server": {
"command": "python",
"args": [
"/absolute/path/to/your/project/filesystem_server/app.py"
],
"cwd": "/absolute/path/to/your/project/filesystem_server"
}
}
}Benefits:
Usage:
# For debugging in Visual Studio 2022:
python app.py # Uses config.json from same directory as app.py
# For MCP server usage:
# The MCP client automatically finds config.json in the .mcp.json directoryImportant Location Notes:
config.json goes next to app.pyconfig.json goes next to .mcp.jsonBest for production MCP client configurations where you want everything in one place:
#### When Installed via pip
{
"servers": {
"filesystem-server": {
"command": "vs-filesystem-mcp-server",
"args": [
"--allowed-dirs", "D:/projects", "D:/Webs",
"--allowed-extensions", ".py", ".js", ".ts", ".json", ".md", ".txt"
]
}
}
}#### When Running from Source
python app.py --allowed-dirs "D:/projects" "D:/Webs" --allowed-extensions ".py" ".js" ".md"
# With write access enabled:
python app.py --allowed-dirs "D:/projects" "D:/Webs" --allowed-extensions ".py" ".js" ".md" --allow-write trueMCP Client Configuration (.mcp.json):
{
"servers": {
"filesystem-server": {
"command": "python",
"args": [
"/absolute/path/to/your/project/filesystem_server/app.py",
"--allowed-dirs", "D:/projects", "D:/Webs",
"--allowed-extensions", ".py", ".js", ".ts", ".json", ".md", ".txt"
],
"cwd": "/absolute/path/to/your/project/filesystem_server"
}
}
}Benefits:
The server automatically uses command-line arguments first, then falls back to config.json if no arguments provided.
How it works:
Benefits:
# With command line arguments (MCP clients):
python app.py --allowed-dirs "D:/projects" "D:/Webs" --allowed-extensions ".py" ".js" ".md"
# Using config.json fallback (Visual Studio 2022+ debugging):
python app.py
# Show MCP configuration help:
python app.py --help-mcpinit(directory, file_path) - Validates accessibility of configured directories and can optionally list a directory and/or read a filedirectory (optional): Directory path to list contents (can be None)file_path (optional): File path to read content (can be None){ "message": "OK", "isError": false, ... } if all directories accessiblelist_directory(directory, report_progress=True, batch_size=100) - Lists files and subdirectories in a given directory, with optional progress reportingdirectory: The absolute or relative path to the directory (supports both / and \\ separators)report_progress (optional): If True, returns progress information and batch details (default: True)batch_size (optional): Number of items to process before reporting progress (default: 100)report_progress is Falsereport_progress is True"error" and "error_message" keysread_file(file_path) - Reads the content of a specified file as textread_file_binary(file_path) - Reads the content of a specified file as base64-encoded binary{ "content_base64": <base64 string>, "encoding": "base64", "error": False } on successlist_resources(directory=None, report_progress=True, batch_size=100) - Lists all resources (files and directories) in a directory (or all allowed directories) in MCP resource formatdirectory (optional): Directory to start from (defaults to all allowed_dirs)report_progress (optional): If True, returns progress information and batches (default: True)batch_size (optional): Number of resources per progress batch (default: 100)report_progress is Falsereport_progress is True {
"id": "D:/projects/example.txt",
"type": "file",
"name": "example.txt",
"path": "D:/projects/example.txt",
"metadata": {
"size": 1234,
"modified": "2025-08-18T12:34:56Z"
},
"actions": ["read", "read_binary", "write", "write_binary"]
}get_resource(path) - Gets metadata and actions for a specific file or directorypath: Absolute or relative path to the resourcewrite_file(file_path, content) - Writes text content to a specified file (requires `--allow-write`)file_path: Path to write to (must be within allowed dirs)content: Text string to writeValueError if write access is disabled, path not allowed, extension not allowed, or IO error--allow-write flag or "allow_write": true in config.jsonwrite_file_binary(file_path, content_base64) - Writes binary content from base64 to file (requires `--allow-write`)file_path: Path to write to (must be within allowed dirs)content_base64: Base64-encoded binary data{"success": true, "bytes_written": int, "error": false} or error dict--allow-write flag or "allow_write": true in config.jsonPerfect debugging experience:
Debugging setup:
config.json exists (already created for you)Below are step-by-step examples showing how to call the FileSystem MCP Server from within Visual Studio 2022. These screenshots demonstrate the process using the alias "fss" for the server, which is simply a shorter name for "filesystem-server". You can customize this alias in your .mcp.json file—the actual name is up to you.
Note: All images are located in the images/ subfolder.Step 1: Example of calling the tool in Visual Studio 2022
In this example, the MCP client is configured to use "fss" as the server name. This is just an alias for convenience.
Step 2: Example of viewing the server response in Visual Studio 2022
The server responds with the results of your request, such as the output from the read_file() tool.
Note: - The"fss"alias is used here for brevity. You can use any name you prefer in your.mcp.jsonconfiguration. - To change the server name, simply update the key in your.mcp.jsonfile from"filesystem-server"to any other name you like.
For more details on configuring your MCP client, see the Configuration Options section above.
You can easily edit your mcp.json configuration file directly from Visual Studio using the GitHub Copilot Chat interface. Follow these steps:
mcp.json file will open for editing.How to edit mcp.json using GitHub Copilot Chat
This allows you to quickly update your MCP server configuration without leaving the IDE.
--allowed-dirs or config.json can be accessed--allowed-extensions or config.json can be read or writtenwrite_file and write_file_binary require --allow-write flag or "allow_write": true in config.jsonThe server provides detailed error messages for:
init() tool)New Error Handling for list_directory():
list_directory() function now returns errors as part of the result list instead of raising exceptions["error", "detailed_error_message"]Your original config had a missing comma after "D:/Webs". The corrected version above fixes this.
python app.py --help # Show help
python app.py --help-mcp # Show MCP configuration examples
python app.py --allowed-dirs DIR1 DIR2 # Set allowed directories
python app.py --allowed-extensions EXT1 EXT2 # Set allowed extensions
python app.py --allow-write true # Enable write tools (disabled by default)
python app.py --allow-write false # Explicitly disable write tools
python app.py --config custom.json # Use custom config file
python app.py # Use config.json fallback (debugging)The filesystem server automatically normalizes paths to handle different operating system conventions:
{
"allowed_dirs": [
"D:\\projects", // Windows-style backslashes
"F:/sd/wipes", // Unix-style forward slashes
"C:\\Users\\Me\\Docs" // Mixed formats work too
]
}"F:\sd\wipes" (Windows natural format)"F:/sd/wipes" (Python-friendly format)# All of these work identically:
list_directory("F:\\sd\\wipes") # Windows format
list_directory("F:/sd/wipes") # Unix format
list_directory("F:\\sd/wipes") # Mixed formatF:\sd\wipesF:/sd/wipesFor more advanced, platform-specific, or legacy MCP client configuration examples (including both "servers" and "mcpServers" formats), see the mcp_configuration_examples.json file in this repository.
This file includes:
"mcpServers" formatRefer to it if you need more flexibility or are working with a non-standard MCP client.
<a href="https://www.buymeacoffee.com/Surn" target="_blank"><img src="images/buymeacoffee-oncorp-275.png" alt="Buy Me A Coffee" style="height: auto !important;width: 275px !important;" ></a>
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.