home / mcp / filesystem mcp server
A Model Context Protocol server for accessing your file system.
Configuration
View docs{
"mcpServers": {
"bsmi021-mcp-filesystem-server": {
"command": "node",
"args": [
"path/to/filesystem-server/build/index.js"
]
}
}
}You can run a dedicated MCP server that exposes file system operations, analysis, and manipulation through a unified tool interface. This enables you to query directories, read and write files, analyze text, hash files, find duplicates, and compress or extract data, all via a consistent MCP client workflow.
To use the filesystem MCP server, connect your MCP client to the local or remote stdio-based server and invoke the available tools by name. You can list directory contents, read and write files, analyze text properties, calculate file hashes, identify duplicates, and manage ZIP archives. Combine operations to automate common workflows such as auditing project directories, validating file integrity, or preparing data archives for distribution.
Prerequisites: ensure you have Node.js installed on your machine. You may also need a compatible MCP client to interact with the server.
# 1. Clone the filesystem MCP server repository
git clone <repository-url>
cd filesystem-server
# 2. Install dependencies
npm install
# 3. Build the server
npm run build
# 4. Start or prepare to run via MCP client configuration (see config snippet below)Configure MCP settings to point to the built server index. The following example shows how to register the filesystem server as a stdio MCP endpoint that starts via Node.js and the built entry point.
{
"mcpServers": {
"filesystem": {
"command": "node",
"args": ["path/to/filesystem-server/build/index.js"]
}
}
}Lists directory contents with metadata including name, path, type, size, timestamps, and permissions.
Creates a new directory, with option to create parent directories when recursive is true.
Reads file content with optional encoding support.
Writes content to a file with optional encoding.
Appends content to a file with optional encoding.
Analyzes a text file to produce metrics such as line count, word count, character count, encoding, and mime type.
Calculates a file hash using a specified algorithm (md5, sha1, sha256, sha512).
Finds duplicate files within a directory by grouping files with the same hash and size.
Creates a ZIP archive from a list of files.
Extracts the contents of a ZIP archive to a specified output directory.