
A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

A Node.js Model Context Protocol server for filesystem operations that extends the directory listing tool with an optional recursive mode.
MCP filesystem server with recursive directory listing is cataloged as an MCP server attributed to dazzaji. A Node.js Model Context Protocol server for filesystem operations that extends the directory listing tool with an optional recursive mode. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP filesystem server with recursive directory listing are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
When recursive is true, list_directory traverses subdirectories and lists the entire subtree instead of only the given path's entries.
Yes, the server only operates within directories specified via command-line arguments.
README.md · 59d0e8a27f99 · 采集于 2026-11-13 12:40:37 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
NOTE: This is a feature addition to the original filesystem MCP server.
NOTE: The MCP Inspector does not (yet) work using the following set up guide, but Claude Desktop as host does work.
This is a project to extend the existing Model Context Protocol filesystem server to include Recursive Directory Listing (Inspired by git_log):
Rationale:
If you haven’t already done so, create the project directory and move into it:
mkdir /Users/dazzagreenwood/filesystem
cd /Users/dazzagreenwood/filesystem
If you do not already have a package.json, you can create one:
npm init -y
package.json (if you already have one, just ensure dependencies are correct):
{
"name": "mcp-server-filesystem",
"version": "0.6.2",
"description": "MCP File System Server",
"main": "dist/index.js",
"type": "module",
"bin": {
"mcp-server-filesystem": "dist/index.js"
},
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"test": "node --test test/*.test.js"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^0.6.2",
"diff": "^5.1.0",
"minimatch": "^9.1.2",
"zod": "^3.22.4",
"zod-to-json-schema": "^3.20.7",
"fs-promises": "0.1.2"
},
"devDependencies": {
"@types/node": "^20.11.0",
"typescript": "^5.3.3"
}
}
tsconfig.json:
{
"compilerOptions": {
"target": "es2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"rootDir": "./",
"outDir": "./dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
index.ts (Place this file in /Users/dazzagreenwood/filesystem/index.ts):
#!/usr/bin/env node
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema
} from "@modelcontextprotocol/sdk/types.js";
import fs from "fs/promises";
import path from "path";
import os from "os";
import { z } from "zod";
import { zodToJsonSchema } from "zod-to-json-schema";
import { createTwoFilesPatch } from "diff";
import { minimatch } from "minimatch";
// Enhanced Directory Listing Schema with recursive option
const ListDirectoryArgsSchema = z.object({
path: z.string(),
recursive: z.boolean().optional().default(false),
});
const args = process.argv.slice(2);
if (args.length === 0) {
console.error("Usage: mcp-server-filesystem <allowed-directory> [additional-directories...]");
process.exit(1);
}
function normalizePath(p: string): string {
return path.normalize(p);
}
function expandHome(filepath: string): string {
if (filepath === "~" || filepath.startsWith("~/")) {
return path.join(os.homedir(), filepath.slice(1));
}
return filepath;
}
const allowedDirectories = args.map((dir) =>
normalizePath(path.resolve(expandHome(dir)))
);
// Validate allowed directories
await Promise.all(
allowedDirectories.map(async (dir) => {
try {
const stats = await fs.stat(dir);
if (!stats.isDirectory()) {
console.error(`Error: ${dir} is not a directory`);
process.exit(1);
}
} catch (error) {
console.error(`Error accessing directory ${dir}:`, error);
process.exit(1);
}
}),
);
async function validatePath(requestedPath: string): Promise<string> {
const expandedPath = expandHome(requestedPath);
const absolute = path.isAbsolute(expandedPath)
? path.resolve(expandedPath)
: path.resolve(process.cwd(), expandedPath);
const normalizedRequested = normalizePath(absolute);
const isAllowed = allowedDirectories.some((dir) =>
normalizedRequested.startsWith(dir)
);
if (!isAllowed) {
throw new Error(`Access denied - path outside allowed directories: ${absolute}`);
}
try {
const realPath = await fs.realpath(absolute);
const normalizedReal = normalizePath(realPath);
const isRealPathAllowed = allowedDirectories.some((dir) =>
normalizedReal.startsWith(dir)
);
if (!isRealPathAllowed) {
throw new Error("Access denied - symlink target outside allowed directories");
}
return realPath;
} catch (error) {
const parentDir = path.dirname(absolute);
try {
const realParentPath = await fs.realpath(parentDir);
const normalizedParent = normalizePath(realParentPath);
const isParentAllowed = allowedDirectories.some((dir) =>
normalizedParent.startsWith(dir)
);
if (!isParentAllowed) {
throw new Error("Access denied - parent directory outside allowed directories");
}
return absolute;
} catch {
throw new Error(`Parent directory does not exist: ${parentDir}`);
}
}
}
const ReadFileArgsSchema = z.object({ path: z.string() });
const ReadMultipleFilesArgsSchema = z.object({ paths: z.array(z.string()) });
const WriteFileArgsSchema = z.object({ path: z.string(), content: z.string() });
const EditOperation = z.object({
oldText: z.string().describe("Text to search for - must match exactly"),
newText: z.string().describe("Text to replace with"),
});
const EditFileArgsSchema = z.object({
path: z.string(),
edits: z.array(EditOperation),
dryRun: z.boolean().default(false),
});
const CreateDirectoryArgsSchema = z.object({ path: z.string() });
const DirectoryTreeArgsSchema = z.object({ path: z.string() });
const MoveFileArgsSchema = z.object({ source: z.string(), destination: z.string() });
const SearchFilesArgsSchema = z.object({
path: z.string(),
pattern: z.string(),
excludePatterns: z.array(z.string()).optional().default([]),
});
const GetFileInfoArgsSchema = z.object({ path: z.string() });
interface FileInfo {
size: number;
created: Date;
modified: Date;
accessed: Date;
isDirectory: boolean;
isFile: boolean;
permissions: string;
}
const server = new Server(
{ name: "secure-filesystem-server", version: "0.6.2" },
{ capabilities: { tools: {}, resources: {} } }
);
async function getFileStats(filePath: string): Promise<FileInfo> {
const stats = await fs.stat(filePath);
return {
size: stats.size,
created: stats.birthtime,
modified: stats.mtime,
accessed: stats.atime,
isDirectory: stats.isDirectory(),
isFile: stats.isFile(),
permissions: stats.mode.toString(8).slice(-3),
};
}
function normalizeLineEndings(text: string): string {
return text.replace(/\r\n/g, "\n");
}
function createUnifiedDiff(
originalContent: string,
newContent: string,
filepath: string = "file"
): string {
const normalizedOriginal = normalizeLineEndings(originalContent);
const normalizedNew = normalizeLineEndings(newContent);
return createTwoFilesPatch(
filepath,
filepath,
normalizedOriginal,
normalizedNew,
"original",
"modified"
);
}
async function applyFileEdits(
filePath: string,
edits: Array<{ oldText: string; newText: string }>,
dryRun = false
): Promise<string> {
const content = normalizeLineEndings(await fs.readFile(filePath, "utf-8"));
let modifiedContent = content;
for (const edit of edits) {
const oldText = normalizeLineEndings(edit.oldText);
const newText = normalizeLineEndings(edit.newText);
if (modifiedContent.includes(oldText)) {
modifiedContent = modifiedContent.replace(oldText, newText);
}
}
const diff = createUnifiedDiff(content, modifiedContent, filePath);
if (!dryRun) {
await fs.writeFile(filePath, modifiedContent, "utf-8");
}
return diff;
}
async function* readDirectoryRecursively(dirPath: string): AsyncGenerator<string> {
const entries = await fs.readdir(dirPath, { withFileTypes: true });
for (const entry of entries) {
const fullPath = path.join(dirPath, entry.name);
if (entry.isDirectory()) {
yield `[DIR] ${fullPath}`;
yield* readDirectoryRecursively(fullPath);
} else {
yield `[FILE] ${fullPath}`;
}
}
}
async function listDirectoryRecursive(dirPath: string): Promise<string[]> {
const entries: string[] = [];
for await (const entry of readDirectoryRecursively(dirPath)) {
entries.push(entry);
}
return entries;
}
async function listDirectory(dirPath: string, recursive: boolean): Promise<string[]> {
if (!recursive) {
const entries = await fs.readdir(dirPath, { withFileTypes: true });
return entries.map((entry) =>
entry.isDirectory() ? `[DIR] ${entry.name}` : `[FILE] ${entry.name}`
);
} else {
return await listDirectoryRecursive(dirPath);
}
}
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: "read_file",
description:
"Read the complete contents of a file from the filesystem. Only works within allowed directories.",
inputSchema: zodToJsonSchema(ReadFileArgsSchema),
},
{
name: "read_multiple_files",
description:
"Read contents of multiple files simultaneously. Only works within allowed directories.",
inputSchema: zodToJsonSchema(ReadMultipleFilesArgsSchema),
},
{
name: "write_file",
description:
"Write or overwrite file contents. Only works within allowed directories.",
inputSchema: zodToJsonSchema(WriteFileArgsSchema),
},
{
name: "edit_file",
description:
"Perform line-based edits to a file and return a git-style diff of changes. Only works within allowed directories.",
inputSchema: zodToJsonSchema(EditFileArgsSchema),
},
{
name: "create_directory",
description:
"Create a directory (and parents if needed). Only works within allowed directories.",
inputSchema: zodToJsonSchema(CreateDirectoryArgsSchema),
},
{
name: "list_directory",
description:
"List files and directories in a given path. If recursive=true, lists entire subtree. Only works within allowed directories.",
inputSchema: zodToJsonSchema(ListDirectoryArgsSchema),
},
{
name: "directory_tree",
description:
"Get a recursive listing of all files and directories from a given path. Only works within allowed directories.",
inputSchema: zodToJsonSchema(DirectoryTreeArgsSchema),
},
{
name: "move_file",
description:
"Move or rename a file or directory. Only works within allowed directories.",
inputSchema: zodToJsonSchema(MoveFileArgsSchema),
},
{
name: "search_files",
description:
"Recursively search for files and directories matching a pattern. Not fully implemented. Only works within allowed directories.",
inputSchema: zodToJsonSchema(SearchFilesArgsSchema),
},
{
name: "get_file_info",
description:
"Get metadata about a file or directory. Only works within allowed directories.",
inputSchema: zodToJsonSchema(GetFileInfoArgsSchema),
},
{
name: "list_allowed_directories",
description: "List directories that this server can access.",
inputSchema: { type: "object", properties: {}, required: [] },
},
],
}));
server.setRequestHandler(CallToolRequestSchema, async (request) => {
try {
const { name, arguments: args } = request.params;
switch (name) {
case "read_file": {
const parsed = ReadFileArgsSchema.safeParse(args);
if (!parsed.success) throw new Error(`Invalid arguments: ${parsed.error}`);
const validPath = await validatePath(parsed.data.path);
const content = await fs.readFile(validPath, "utf-8");
return { content: [{ type: "text", text: content }] };
}
case "read_multiple_files": {
const parsed = ReadMultipleFilesArgsSchema.safeParse(args);
if (!parsed.success) throw new Error(`Invalid arguments: ${parsed.error}`);
const results = await Promise.all(
parsed.data.paths.map(async (p) => {
try {
const vp = await validatePath(p);
const c = await fs.readFile(vp, "utf-8");
return `${p}:\n${c}`;
} catch (err) {
return `${p}: Error - ${err instanceof Error ? err.message : String(err)}`;
}
})
);
return { content: [{ type: "text", text: results.join("\n---\n") }] };
}
case "write_file": {
const parsed = WriteFileArgsSchema.safeParse(args);
if (!parsed.success) throw new Error(`Invalid arguments: ${parsed.error}`);
const vp = await validatePath(parsed.data.path);
await fs.writeFile(vp, parsed.data.content, "utf-8");
return { content: [{ type: "text", text: `Wrote to ${parsed.data.path}` }] };
}
case "edit_file": {
const parsed = EditFileArgsSchema.safeParse(args);
if (!parsed.success) throw new Error(`Invalid arguments: ${parsed.error}`);
const vp = await validatePath(parsed.data.path);
const diff = await applyFileEdits(vp, parsed.data.edits, parsed.data.dryRun);
return { content: [{ type: "text", text: diff }] };
}
case "create_directory": {
const parsed = CreateDirectoryArgsSchema.safeParse(args);
if (!parsed.success) throw new Error(`Invalid arguments: ${parsed.error}`);
const vp = await validatePath(parsed.data.path);
await fs.mkdir(vp, { recursive: true });
return { content: [{ type: "text", text: `Created directory ${parsed.data.path}` }] };
}
case "list_directory": {
const parsed = ListDirectoryArgsSchema.safeParse(args);
if (!parsed.success) throw new Error(`Invalid arguments: ${parsed.error}`);
const vp = await validatePath(parsed.data.path);
const entries = await listDirectory(vp, parsed.data.recursive || false);
return { content: [{ type: "text", text: entries.join("\n") }] };
}
case "directory_tree": {
const parsed = DirectoryTreeArgsSchema.safeParse(args);
if (!parsed.success) throw new Error(`Invalid arguments: ${parsed.error}`);
const vp = await validatePath(parsed.data.path);
const entries = await listDirectoryRecursive(vp);
return { content: [{ type: "text", text: entries.join("\n") }] };
}
case "move_file": {
const parsed = MoveFileArgsSchema.safeParse(args);
if (!parsed.success) throw new Error(`Invalid arguments: ${parsed.error}`);
const src = await validatePath(parsed.data.source);
const dst = await validatePath(parsed.data.destination);
await fs.rename(src, dst);
return { content: [{ type: "text", text: `Moved ${parsed.data.source} to ${parsed.data.destination}` }] };
}
case "search_files":
// Not fully implemented. Could be implemented using glob or minimatch logic.
return { content: [{ type: "text", text: "Search not implemented." }] };
case "get_file_info": {
const parsed = GetFileInfoArgsSchema.safeParse(args);
if (!parsed.success) throw new Error(`Invalid arguments: ${parsed.error}`);
const vp = await validatePath(parsed.data.path);
const info = await getFileStats(vp);
const infoText = Object.entries(info)
.map(([k, v]) => `${k}: ${v}`)
.join("\n");
return { content: [{ type: "text", text: infoText }] };
}
case "list_allowed_directories":
return { content: [{ type: "text", text: allowedDirectories.join("\n") }] };
default:
return { content: [{ type: "text", text: `Unknown tool: ${name}` }], isError: true };
}
} catch (error) {
const msg = error instanceof Error ? error.message : String(error);
return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true };
}
});
async function runServer() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error("Secure File System MCP Server running on stdio");
}
runServer().catch((error) => {
console.error("Fatal error running server:", error);
process.exit(1);
});
Make sure you are in the /Users/dazzagreenwood/filesystem directory, then run:
npm install @modelcontextprotocol/sdk zod zod-to-json-schema diff minimatch fs-promises
npm run build
This will create /Users/dazzagreenwood/filesystem/dist/index.js.
claude_desktop_config.jsonUse the absolute path to node and your compiled index.js. For example:
{
"mcpServers": {
"filesystem": {
"command": "/usr/local/bin/node",
"args": [
"/Users/dazzagreenwood/filesystem/dist/index.js",
"/Users/dazzagreenwood/mcp-hello/module1/files"
]
}
}
}
Note:
/usr/local/bin/node with the actual path from which node if different./Users/dazzagreenwood/mcp-hello/module1/files with a directory you want to allow./list_directory path: "/Users/dazzagreenwood/mcp-hello/module1/files" to test listing./list_directory path: "/Users/dazzagreenwood/mcp-hello/module1/files" recursive: true./directory_tree path: "/Users/dazzagreenwood/mcp-hello/module1/files" to see the tree output.If everything is set up correctly, you should see the desired file and directory listings. If any issue arises, check the terminal output for error messages and confirm that all paths and configurations match your local system.
"search_files" tool is not implemented and the current message says "Search not implemented. Could be implemented using glob or minimatch logic." - The correct message is simply "Search not implemented." as that is more accurate.fs-promises: While not an issue, the fs-promises package can be removed from dependencies as it's not needed.Here are instructions to incorporate MCP Inspector and Claude Desktop testing.
Testing with Claude Desktop:
Start Claude Desktop: Ensure Claude Desktop is running.
Use the list_directory tool: Type the following in the Claude chat:
/list_directory path: "/Users/dazzagreenwood/mcp-hello/module1/files"
This should output the files and directories at the specified path. Note that you must use double quotes around the path.
Test Recursive Listing: To test the recursive functionality, use:
/list_directory path: "/Users/dazzagreenwood/mcp-hello/module1/files" recursive: true
This should output the entire directory tree, including subdirectories.
Test the directory_tree tool: Use the following to see the directory tree output:
/directory_tree path: "/Users/dazzagreenwood/mcp-hello/module1/files"
Test other tools: You can test other tools like read_file, write_file, etc. using similar patterns, as long as those files exist in the allowed directories.
Testing with MCP Inspector:
/Users/dazzagreenwood/mcp-hello/module1/files with your allowed directory and make sure you use absolute path references to both the allowed directory and the command:npx @modelcontextprotocol/inspector uvx node "/Users/dazzagreenwood/filesystem/dist/index.js" "/Users/dazzagreenwood/mcp-hello/module1/files"
NOTE: The next commands are hold-overs and I am not sure about them:
npx @modelcontextprotocol/inspector uvx /usr/local/bin/node /Users/dazzagreenwood/filesystem/dist/index.js "/Users/dazzagreenwood/mcp-hello/module1/files"
If the executable is in your path you can run the server with
npx @modelcontextprotocol/inspector uvx mcp-server-filesystem "/Users/dazzagreenwood/mcp-hello/module1/files"
http://localhost:9001).list_directory Tool: Select the list_directory tool in the tools list.{
"path": "/Users/dazzagreenwood/mcp-hello/module1/files"
}
{
"path": "/Users/dazzagreenwood/mcp-hello/module1/files",
"recursive": true
}
directory_tree Tool: Select the directory_tree tool in the tools list.json { "path": "/Users/dazzagreenwood/mcp-hello/module1/files" } Final Recommendations:
search_files Message: Change "Search not implemented. Could be implemented using glob or minimatch logic." to "Search not implemented.""fs-promises": "0.1.2" from the dependencies in package.json.Here's a step-by-step guide on how to use the MCP Inspector to validate the functionality of your filesystem server:
Make sure you've built the server first by running the npm run build command in the filesystem server folder. Then launch the inspector:
npx @modelcontextprotocol/inspector uvx node "/Users/dazzagreenwood/filesystem/dist/index.js" "/Users/dazzagreenwood/mcp-hello/module1/files"
(Replace the paths with where your files are located)
After a short delay, the inspector will provide a localhost address in your terminal, which usually looks like this: http://localhost:5173/?proxyPort=3000. Open this URL in your browser.
If the server connects successfully, a green dot appears, and the content area of the Inspector loads, and any server errors show up in the console area in the bottom of the left panel. If there's a connection error, a red dot appears, along with an error message in the bottom part of the left hand sidebar.
read_fileread_multiple_fileswrite_fileedit_filecreate_directorylist_directorydirectory_treemove_filesearch_filesget_file_infolist_allowed_directories- **read_file:**
- In the input field, enter the full path for a file (e.g., `"/Users/dazzagreenwood/mcp-hello/module1/files/test.txt"`) in the path text box, but make sure it's a valid path inside the directory given when starting the server.
- Click "Run Tool".
- Inspect the output in the "Response" section, where you should see the content of the file.
- **write_file:**
- In the input field, enter the path where you want to create a file (e.g., `"/Users/dazzagreenwood/mcp-hello/module1/files/testfile.txt"`) and set a content (e.g., `"hello world"`).
- Click "Run Tool."
- Check your file system to confirm the new file and its content.
- **edit_file:**
- In the input field, enter the path where you want to edit a file (e.g., `"/Users/dazzagreenwood/mcp-hello/module1/files/test.txt"`).
- Add an `edits` JSON list and specify the content to replace
```json
{
"path": "/Users/dazzagreenwood/mcp-hello/module1/files/test.txt",
"edits": [
{
"oldText": "test",
"newText": "test-edited"
}
],
"dryRun": false
}
```
- Click "Run Tool".
- Check your file system to confirm the file and its content has changed.
- **list_directory:**
- In the input field for `path`, enter an absolute directory path (e.g., `"/Users/dazzagreenwood/mcp-hello/module1/files"`).
- Click "Run Tool."
- Verify that the "Response" section contains file and directory listings.
- Check results when using `"recursive": true`.
- **directory_tree:**
- In the input field for path, enter an absolute directory path (e.g., `"/Users/dazzagreenwood/mcp-hello/module1/files"`).
- Click "Run Tool."
- Verify that the "Response" section contains file and directory tree structure as text output.
- **move_file:**
- In the input field for source enter an absolute file path (e.g., `"/Users/dazzagreenwood/mcp-hello/module1/files/testfile.txt"`) in "source" field.
- In the input field for destination enter another absolute file path (e.g., `"/Users/dazzagreenwood/mcp-hello/module1/files/testfile2.txt"`)
- Click "Run Tool."
- Verify that the file has been moved/renamed and the old file does not exist in its original path.
- **get_file_info:**
- In the input field for path, enter an absolute file path (e.g., `"/Users/dazzagreenwood/mcp-hello/module1/files/testfile.txt"`) or folder path.
- Click "Run Tool."
- Verify that the "Response" section contains the information including size, access time, modified time, type, and permissions of the target file or directory.
- **list_allowed_directories:**
- No input is required.
- Click "Run Tool."
- Verify that the "Response" section contains the list of directories specified when the server was started.
console.log to log output for debugging.~/Library/Logs/Claude/mcp*.log files.Purpose: Prompts are a way for servers to provide structured instructions to the LLM through clients.
Inspector: In the inspector's Prompts tab, you can:
MCP Behavior: In MCP, prompts are user-controlled. They are for the end user to invoke or select within a UI, and to review the content and arguments. They are not for the language model to choose.
Purpose: Resources are a way for servers to expose data to clients and LLMs.
Inspector: In the inspector's Resources tab, you can:
MCP Behavior: In MCP, resources are application-controlled. They are for the host client applications to use in ways it sees fit, and they are not intended to be requested by the LLM directly.
Why no resources in the Filesystem Server?
You noted that the filesystem server shows no resources in the Inspector, while it does expose tools. This is expected since:
list_allowed_directories tool is present for this purpose, although this is not a resource.memory server which has a fixed memo://insights resource. They are read dynamically using the read_file tool, when required.Purpose: Sampling allows a server to request the client to perform LLM operations on its behalf. It is important for agents and agentic behaviour.
Inspector: In the inspector's Sampling tab, you can:
MCP Behavior: In MCP, sampling is a model-controlled primitive, which allows server processes to request the client to make requests to an LLM. Critically, the user has full control over the execution of the sampling operation, and can choose whether or not to allow the action. This preserves a human-in-the-loop, which is important for security and trust.
What is Sampling For?
Node.js server implementing Model Context Protocol (MCP) for filesystem operations. New phase 1 for MCP Hello.
Note: The server will only allow operations within directories specified via args.
file://system: File system operations interfaceread_file
path (string)read_multiple_files
paths (string[])write_file
path (string): File locationcontent (string): File contentedit_file
path (string): File to editedits (array): List of edit operations
oldText (string): Text to search for (can be substring)newText (string): Text to replace withdryRun (boolean): Preview changes without applying (default: false)options (object): Optional formatting settings
preserveIndentation (boolean): Keep existing indentation (default: true)normalizeWhitespace (boolean): Normalize spaces while preserving structure (default: true)partialMatch (boolean): Enable fuzzy matching (default: true)create_directory
path (string)list_directory
path (string)move_file
source (string)destination (string)search_files
path (string): Starting directorypattern (string): Search patternexcludePatterns (string[]): Exclude any patterns. Glob formats are supported.get_file_info
path (string)list_allowed_directories
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/path/to/other/allowed/dir"
]
}
}
}
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP filesystem server with recursive directory listing from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mcp-client-server-dazzaji)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.