SMB/CIFS Storage
Overview
Section titled “Overview”The SMB storage provider enables file operations against corporate network file shares. Supports SMB 2.x and 3.x with Windows domain authentication.
Prerequisites
Section titled “Prerequisites”- SMB file server (Windows Server, Samba, or NAS device)
- Network access to SMB port (445)
- Valid credentials (username, password, optional domain)
Server Setup
Section titled “Server Setup”- Open Server Manager > File and Storage Services > Shares
- Click Tasks > New Share > SMB Share - Quick
- Configure share name and path
- Set NTFS and share permissions
- Click Create
sudo apt install sambasudo mkdir -p /srv/samba/documentssudo chown nobody:nogroup /srv/samba/documentsEdit /etc/samba/smb.conf:
[documents] path = /srv/samba/documents browseable = yes read only = no create mask = 0644 directory mask = 0755 valid users = @userssudo systemctl restart smbd nmbdMost NAS devices (Synology, QNAP) have built-in SMB support:
- Open the NAS web interface
- Navigate to Shared Folders
- Create a new shared folder
- Enable SMB/CIFS protocol
- Set user permissions
Configuration
Section titled “Configuration”| Parameter | Required | Description |
|---|---|---|
type |
Yes | Must be "smb" |
host |
Yes | SMB server hostname or IP |
share |
Yes | Share name |
username |
No | Username for authentication |
password |
No | Password for authentication |
domain |
No | Windows domain name |
port |
No | SMB port (default: 445) |
basePath |
No | Base path within the share |
timeout |
No | Connection timeout in ms (default: 30000) |
Examples
Section titled “Examples”// Basic{ "type": "smb", "host": "fileserver.corp.local", "share": "documents", "username": "serviceaccount", "password": "your-password"}
// Windows domain auth{ "type": "smb", "host": "fileserver.corp.local", "share": "documents", "domain": "CONTOSO", "username": "serviceaccount", "password": "your-password", "basePath": "/projects/mcp"}Environment Variables
Section titled “Environment Variables”| Variable | Description |
|---|---|
STORAGE_TYPE |
Set to smb |
SMB_HOST |
SMB server hostname |
SMB_SHARE |
Share name |
SMB_USERNAME |
Username |
SMB_PASSWORD |
Password |
SMB_DOMAIN |
Windows domain (optional) |
SMB_PORT |
Port (default: 445) |
Related
Section titled “Related”- Storage Overview - All 7 providers
- Credential Management - Encrypted credential storage