Secure MCP server for sandboxed filesystem operations with document parsing support.
A secure Model Context Protocol (MCP) server that exposes local filesystem operations to AI clients. Built with C# and the official MCP C# SDK.
dotnet tool install -g FieldCure.Mcp.Filesystem
git clone https://github.com/fieldcure/fieldcure-mcp-filesystem.git
cd fieldcure-mcp-filesystem
dotnet build
{
"mcpServers": {
"filesystem": {
"command": "fieldcure-mcp-filesystem",
"args": [
"C:\\Users\\me\\Documents",
"C:\\Projects"
]
}
}
}
{
"servers": {
"filesystem": {
"command": "fieldcure-mcp-filesystem",
"args": [
"${workspaceFolder}"
]
}
}
}
| Tool | Description |
|---|---|
read_file | Read file contents (text as UTF-8, binary as base64) |
read_multiple_files | Read multiple files at once with per-file error handling |
read_file_lines | Read a specific range of lines |
convert_to_markdown | Convert one supported document file into a markdown file on disk |
convert_directory_to_markdown | Batch-convert supported document files in a directory to markdown files |
write_file | Create or overwrite a file with atomic write |
append_file | Append content to end of file with auto-newline |
modify_file | Find and replace text (plain text or regex) |
copy_file | Copy a file or directory recursively |
move_file | Move or rename a file or directory |
delete_file | Delete a file or directory |
| Tool | Description |
|---|---|
list_directory | List contents with type markers, sizes, and dates |
create_directory | Create a directory recursively |
directory_tree | Hierarchical tree view with configurable depth |
| Tool | Description |
|---|---|
search_files | Find files by glob pattern |
search_within_files | Search text content across files with line numbers |
get_file_info | File or directory metadata |
The server supports the MCP roots protocol for runtime directory changes. When the client changes roots:
All paths are validated through IPathValidator before any filesystem operation:
. and .. are normalized via Path.GetFullPath().The markdown conversion tools validate both source and output paths through the same sandbox rules. They write converted markdown directly to disk instead of returning full document text through MCP, which is usually more token-efficient than read_file plus write_file.
src/FieldCure.Mcp.Filesystem/
|- Program.cs
|- Security/
| |- IPathValidator.cs
| \- PathValidator.cs
|- Tools/
| |- FileOperationTools.cs
| |- DirectoryTools.cs
| \- SearchTools.cs
\- Utilities/
|- EncodingDetector.cs
\- FileSize.cs
dotnet build
dotnet test
dotnet pack src/FieldCure.Mcp.Filesystem -c Release
| Supported | Not Yet Supported |
|---|---|
| Text file read/write (UTF-8) | Non-UTF-8 encoding auto-detection |
| Binary file detection + base64 | Streaming for very large files (>100 MB) |
| Atomic writes | File watching / change notifications |
| Glob pattern search | Full-text indexing |
| Regex find-and-replace | Multi-file transactional writes |
| Symlink resolution | Cross-platform symlink creation |
| MCP roots protocol | HTTP transport |
| Document text extraction / markdown conversion for formats supported by DocumentParsers | OCR for scanned documents |
Part of the AssistStudio ecosystem.
This listing does not have a supported local package template. Use the maintainer’s documentation for its hosted endpoint, authentication, and client-specific setup. No install command has been inferred.
io.github.fieldcure/filesystem works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.