You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The server speaks SMB2/SMB3 to a share over the network instead of
reading a mounted path. A cifs mount inside a container needs either a
privileged container or a host bind-mount, so dialling the share
directly keeps the image self-contained.
It exposes six tools: list, search, read, write, move and delete. Every
path is relative to the share root and passes through one cleanPath
choke point, so no request can address anything outside the share.
Search matches names only and never reads file contents, which keeps it
cheap on a share full of large files. Reads refuse binary files and
anything above SMB_READ_MAX_BYTES.
Two switches restrict what the server exposes. SMB_READ_ONLY drops
write, move and delete. SMB_DISABLE_DELETE drops delete, and also makes
write and move refuse to overwrite an existing path, because either
would destroy the previous content.
The tool handlers run against a temporary directory in the specs. Four
integration specs drive a real SMB server and are skipped unless
SMB_TEST_ADDRESS names one; samba/README-test.md starts a disposable
container for them.
Claude-Session: https://claude.ai/code/session_01TCUqUeXa7TJWrifZYPzXyh
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+126Lines changed: 126 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1425,6 +1425,132 @@ mcp:
1425
1425
}
1426
1426
```
1427
1427
1428
+
### 🗄️ Samba Server
1429
+
1430
+
An SMB2/SMB3 server that talks to a Windows or Samba share over the network. It connects to the share directly, so no `mount`, no `cifs-utils` and no privileged container are needed.
1431
+
1432
+
**Features:**
1433
+
- Native SMB2/SMB3 client, no host mount required
1434
+
- Every path is relative to the share root and cannot escape it
1435
+
- Name-based recursive search that never downloads file contents
1436
+
- Reads refuse binary files and anything above a configurable size limit
1437
+
- Two independent safety switches: read-only, and deletion disabled
1438
+
- JSON schema validation for inputs/outputs
1439
+
1440
+
**Tools:**
1441
+
- `list`- List the files and directories directly inside a directory on the share
1442
+
- `search`- Find files and directories by name, matching a glob such as `*.gguf` or plain text as a substring
1443
+
- `read`- Read a text file with line numbers, refusing binary and oversized files
1444
+
- `write`- Write content to a file, creating parent directories as needed
1445
+
- `move`- Move or rename a file or directory within the share
1446
+
- `delete`- Delete a file or directory, recursing only when asked
1447
+
1448
+
**Configuration:**
1449
+
1450
+
| Variable | Default | Description |
1451
+
| --- | --- | --- |
1452
+
| `SMB_HOST` | *required* | SMB server host, optionally with `:port` (default port 445) |
1453
+
| `SMB_SHARE` | *required* | Share name, for example `Data` |
1454
+
| `SMB_USER` | empty | Username; leave empty for a guest or anonymous session |
1455
+
| `SMB_PASSWORD` | empty | Password |
1456
+
| `SMB_DOMAIN` | empty | NTLM domain or workgroup |
1457
+
| `SMB_TIMEOUT` | `30s` | Bounds the connection and every operation |
1458
+
| `SMB_READ_MAX_BYTES` | `1048576` | Largest file `read` will pull over the wire |
1459
+
| `SMB_READ_ONLY` | `false` | When true, only `list`, `search` and `read` are exposed |
1460
+
| `SMB_DISABLE_DELETE` | `false` | When true, `delete` is not exposed, and `write` and `move` refuse to overwrite anything |
1461
+
1462
+
`SMB_DISABLE_DELETE` protects existing data rather than just hiding one tool: with it set, writing over an existing file and moving onto an existing destination are both refused, because either would destroy the previous content.
1463
+
1464
+
**List Input Format:**
1465
+
```json
1466
+
{
1467
+
"path": "models/qwen"
1468
+
}
1469
+
```
1470
+
1471
+
**Search Input Format:**
1472
+
```json
1473
+
{
1474
+
"pattern": "*.gguf",
1475
+
"path": "models",
1476
+
"max_depth": 10,
1477
+
"max_results": 100
1478
+
}
1479
+
```
1480
+
1481
+
Search matches names only, never file contents, so it stays cheap on a share full of large files. It reports `truncated` when it stopped at `max_results`.
1482
+
1483
+
**Read Input Format:**
1484
+
```json
1485
+
{
1486
+
"path": "models/qwen/config.json",
1487
+
"offset": 0,
1488
+
"limit": 50
1489
+
}
1490
+
```
1491
+
1492
+
**Write Input Format:**
1493
+
```json
1494
+
{
1495
+
"path": "notes/todo.txt",
1496
+
"content": "file content here"
1497
+
}
1498
+
```
1499
+
1500
+
**Move Input Format:**
1501
+
```json
1502
+
{
1503
+
"from": "notes/todo.txt",
1504
+
"to": "archive/done.txt",
1505
+
"overwrite": false
1506
+
}
1507
+
```
1508
+
1509
+
**Delete Input Format:**
1510
+
```json
1511
+
{
1512
+
"path": "archive",
1513
+
"recursive": true
1514
+
}
1515
+
```
1516
+
1517
+
**Docker Image:**
1518
+
```bash
1519
+
docker run -i --rm \
1520
+
-e SMB_HOST=192.168.1.10 \
1521
+
-e SMB_SHARE=Data \
1522
+
-e SMB_USER=nasuser \
1523
+
-e SMB_PASSWORD=secret \
1524
+
ghcr.io/mudler/mcps/samba:latest
1525
+
```
1526
+
1527
+
**LocalAI configuration (to add to the model config):**
1528
+
```yaml
1529
+
mcp:
1530
+
stdio: |
1531
+
{
1532
+
"mcpServers": {
1533
+
"samba": {
1534
+
"command": "docker",
1535
+
"env": {
1536
+
"SMB_HOST": "192.168.1.10",
1537
+
"SMB_SHARE": "Data",
1538
+
"SMB_USER": "nasuser",
1539
+
"SMB_PASSWORD": "secret",
1540
+
"SMB_DISABLE_DELETE": "true"
1541
+
},
1542
+
"args": [
1543
+
"run", "-i", "--rm",
1544
+
"-e", "SMB_HOST", "-e", "SMB_SHARE",
1545
+
"-e", "SMB_USER", "-e", "SMB_PASSWORD",
1546
+
"-e", "SMB_DISABLE_DELETE",
1547
+
"ghcr.io/mudler/mcps/samba:master"
1548
+
]
1549
+
}
1550
+
}
1551
+
}
1552
+
```
1553
+
1428
1554
### 🤖 Claude Server
1429
1555
1430
1556
An MCP server for controlling Claude Code CLI sessions asynchronously. Start sessions, monitor progress, retrieve logs, and manage multiple concurrent Claude Code processes. It follows the same pattern as the opencode MCP server but is specifically designed for Claude Code.
0 commit comments