save-to-nas-mcp
v2.0.0
Published
MCP server for saving files and folders to a local NAS over NFS
Maintainers
Readme
Save-To-NAS MCP
An MCP server for saving files and folders to a local NAS over NFS. Eliminates repetitive steps when transferring data to NAS storage.
Installation
Via npm
npm install -g save-to-nas-mcpFrom source
git clone https://github.com/danielrosehill/Save-To-NAS-MCP.git
cd Save-To-NAS-MCP
npm installConfiguration
Configure the MCP server with environment variables:
| Variable | Description | Default |
|----------|-------------|---------|
| NAS_IP | IP address of your NAS | 10.0.0.50 |
| NAS_MOUNT_BASE | Local directory for NFS mounts | /mnt/nas |
| NAS_VOLUME_PREFIX | NAS volume path prefix | /volume1 |
| PORT | HTTP server port | 3847 |
Adding to Claude Code / Claude Desktop
This MCP server uses Streamable HTTP transport. Add to your MCP settings:
{
"mcpServers": {
"save-to-nas": {
"type": "http",
"url": "http://localhost:3847/mcp"
}
}
}To run the server:
# If installed globally
NAS_IP=192.168.1.100 save-to-nas-mcp
# Or via npx
NAS_IP=192.168.1.100 npx save-to-nas-mcp
# Or from source
NAS_IP=192.168.1.100 npm startTools
nas
Unified tool for interacting with your Synology NAS. Supports listing available shares and saving files/folders.
Parameters:
| Parameter | Required | Description |
|-----------|----------|-------------|
| action | Yes | "list" to show shares, "save" to copy files |
| source | For save | Path to local file or folder to save |
| share | For save | Name of the NAS share (e.g., "Documents", "AI_Art") |
| destination_subfolder | No | Subfolder within the share to save to |
| filter | No | Filter shares by name (for list action) |
Examples:
List all available NAS shares
→ action: "list"
Save a folder to the Documents share
→ action: "save", source: "/home/user/projects/my-data", share: "Documents"
Save to a subfolder
→ action: "save", source: "./report.pdf", share: "Documents", destination_subfolder: "reports/2024"How It Works
- Discovery: Queries the NAS via
showmount -eto find available NFS exports - Mount Detection: Checks if the target share is already mounted locally
- Smart Mounting: If not mounted, attempts to mount via NFS (requires sudo)
- Transfer: Copies files/folders to the destination, preserving attributes
Requirements
- Linux with NFS client tools (
nfs-commonon Ubuntu/Debian) - Network access to the NAS
- NFS exports configured on your NAS
- Sudo privileges for mounting unmounted shares
License
MIT
