From 18edebe3c299a82d5c24dae8ceca63941b07bfe7 Mon Sep 17 00:00:00 2001 From: Mahesh Murag Date: Wed, 20 Nov 2024 23:34:00 -0500 Subject: [PATCH] Added README --- src/filesystem/README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/filesystem/README.md b/src/filesystem/README.md index 302fc4c4..7a628356 100644 --- a/src/filesystem/README.md +++ b/src/filesystem/README.md @@ -10,6 +10,8 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio - Search files - Get file metadata +**Note**: The server will only allow operations within directories specified via `args`. + ## API ### Resources @@ -29,7 +31,7 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio - Failed reads won't stop the entire operation - **write_file** - - Create new file or overwrite existing + - Create new file or overwrite existing (exercise caution with this) - Inputs: - `path` (string): File location - `content` (string): File content @@ -70,7 +72,18 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio - Type (file/directory) - Permissions -## Notes +- **list_allowed_directories** + - List all directories the server is allowed to access + - No input required + - Returns: + - Directories that this server can read/write from -- Exercise caution with `write_file`, since it can overwrite an existing file -- File paths can be absolute or relative +## Usage with Claude Desktop +Add this to your `claude_desktop_config.json`: +```json +{ + "mcp-server-filesystem": { + "command": "mcp-server-filesystem", + "args": ["Users/username/Desktop", "Users/username/Desktop", "/path/to/other/allowed/dir"] + } +}