- Home
- MCP servers
- MCP.FileSystem
MCP.FileSystem
- other
1
GitHub Stars
other
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": {
"jihadkhawaja-mcp.filesystem": {
"command": "dotnet",
"args": [
"run",
"--project",
"MCP.FileSystem"
]
}
}
}You use MCP.FileSystem to perform safe and standardized file system operations from MCP clients. It lets you read, write, move, delete, and search files and directories, manage metadata, and explore directory contents, all through a consistent MCP interface that integrates with your AI workflows.
How to use
Use MCP.FileSystem as a local or remote MCP server to perform common file system tasks from your MCP client. You can read and write files, create directories, list contents, search by name or text, and retrieve file information. All operations return structured JSON responses that include success state, paths, sizes, and any relevant metadata. Start by launching the server locally or via Docker, then connect your MCP client using the provided stdio command.
How to install
Prerequisites are installed on your system before you begin.
# Install prerequisites
- Install the .NET 8.0 SDK or later from the official source
- Ensure you have Docker installed if you plan to deploy via Docker
# Build from source
git clone https://github.com/jihadkhawaja/MCP.FileSystem.git
cd MCP.FileSystem
dotnet build
# Run the server locally
dotnet run --project MCP.FileSystem
# Docker deployment (optional)
docker build -t mcp-filesystem .
docker run -it mcp-filesystem
Configuration and usage within MCP clients
Connect MCP clients using either a local stdio command or a remote HTTP endpoint if you have one configured. The examples below show how to wire up clients like Claude Desktop and VS Code with MCP extensions.
// Claude Desktop configuration
{
"mcpServers": {
"MCP.FileSystem": {
"command": "dotnet",
"args": ["run", "--project", "MCP.FileSystem"]
}
}
}
// VS Code with MCP Extension configuration
"servers": {
"MCP.FileSystem": {
"type": "stdio",
"command": "dotnet",
"args": [
"run",
"--project",
"MCP.FileSystem"
]
}
}
Available tools
ReadFile
Read content from a file and return the contents along with basic metadata such as path and size.
WriteFile
Write content to a file, with an option to overwrite existing content.
AppendToFile
Append content to an existing file without overwriting existing data.
DeleteFile
Remove a file from the file system.
CopyFile
Copy a file from a source path to a destination path, with an optional overwrite.
MoveFile
Move or rename a file to a new location, with an optional overwrite.
CreateDirectory
Create a new directory, creating any required parent directories automatically.
DeleteDirectory
Delete a directory, with an option to perform recursive deletion.
ListDirectory
List the contents of a directory with optional filtering and subdirectory traversal.
SearchFiles
Search for files by name patterns, with optional subdirectory traversal and result limits.
SearchInFiles
Search for text within files across directories, with optional case sensitivity and file filtering.
SearchInFilesRegex
Search using regular expressions to find patterns inside files across directories.
GetFileInfo
Retrieve metadata for a file or directory, such as size, permissions, and timestamps.
PathExists
Check whether a given path exists in the file system.
GetCurrentDirectory
Return the current working directory.
SetCurrentDirectory
Change the current working directory to a new path.
GetDirectorySize
Calculate the total size of a directory including its subdirectories.