Skip to main content
Glama
AdvancedFileSystem MCP Server

AdvancedFileSystem MCP Server

README.md
# AdvancedFileSystem MCP Server

A sandboxed file-management MCP server for Claude Desktop.

## Tools

| Tool | Description |
|------|-------------|
| `list_files(subdir)` | List files & folders |
| `read_file(file_path)` | Read text content |
| `write_file(file_path, content)` | Create or overwrite a file |
| `delete_file(file_path)` | Delete a file |
| `search_files(keyword, extension)` | Search by keyword across files |

## Run locally (with uv)

```bash
uv sync
uv run python main.py
```

## Run with Docker

```bash
docker build -t filesystem-mcp .
docker run --rm -i -v /your/local/sandbox:/app/sandbox filesystem-mcp
```

> `-i` is required — MCP uses stdio transport (stdin/stdout).

## Connect to Claude Desktop

Edit `claude_desktop_config.json`:

### Option A — Local (uv)

```json
{
  "mcpServers": {
    "filesystem": {
      "command": "uv",
      "args": ["run", "python", "main.py"],
      "cwd": "/absolute/path/to/this/project",
      "env": {
        "SANDBOX_DIR": "/absolute/path/to/sandbox"
      }
    }
  }
}
```

### Option B — Docker

```json
{
  "mcpServers": {
    "filesystem": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-v", "/your/sandbox:/app/sandbox",
        "filesystem-mcp"
      ]
    }
  }
}
```

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `SANDBOX_DIR` | `/app/sandbox` | Root directory for the sandbox |