Sign inSign up

lordraw/synology-mcp

By lordraw

Updated 4 months ago

a synology mcp server

Image
0

518

lordraw/synology-mcp repository overview

synology-mcp

Model Context Protocol (MCP) server for Synology NAS.

Expose your Synology DSM to any MCP-compatible AI client (Claude Desktop, Claude Code, or any OpenAI-compatible agent) through a clean set of tools covering File Station, Download Station, Container Manager, Virtual Machine Manager, Task Scheduler, Log Center, Power, Shared Folders, User Management, and more.

PropertyValue
Transportstdio — JSON-RPC 2.0
ProtocolMCP 2024-11-05
AuthDSM session (username + password)
Multi-NASYes — manage multiple devices from a single server
Python≥ 3.11

Quick start

Single NAS via environment variables
docker run -i --rm \
  -e SYNOLOGY_HOST=192.168.1.1 \
  -e SYNOLOGY_PORT=5001 \
  -e SYNOLOGY_HTTPS=true \
  -e SYNOLOGY_VERIFY_SSL=false \
  -e SYNOLOGY_USER=admin \
  -e SYNOLOGY_PASSWORD=secret \
  lordraw/synology-mcp

The -i flag is required — the server communicates over stdin/stdout.

Multiple NAS devices via config file

Create /path/to/nas_config.json:

{
  "home": {
    "host": "192.168.1.1",
    "port": 5001,
    "https": true,
    "verify_ssl": false,
    "user": "admin",
    "password": "secret"
  },
  "backup": {
    "host": "10.0.0.2",
    "port": 5001,
    "https": true,
    "verify_ssl": true,
    "user": "admin",
    "password": "secret2"
  }
}
docker run -i --rm \
  -v /path/to/nas_config.json:/config/nas_config.json:ro \
  -e NAS_CONFIG=/config/nas_config.json \
  lordraw/synology-mcp

When more than one NAS is configured, every tool gains an optional nas parameter ("home", "backup", …). The first entry is the default. Use the list_nas tool to see all available devices.


Connecting to Claude Desktop

Add to claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "synology": {
      "command": "docker",
      "args": ["run", "-i", "--rm",
               "-e", "SYNOLOGY_HOST=192.168.1.1",
               "-e", "SYNOLOGY_PORT=5001",
               "-e", "SYNOLOGY_HTTPS=true",
               "-e", "SYNOLOGY_VERIFY_SSL=false",
               "-e", "SYNOLOGY_USER=admin",
               "-e", "SYNOLOGY_PASSWORD=secret",
               "lordraw/synology-mcp"]
    }
  }
}

Connecting to Claude Code (CLI)

claude mcp add synology -- docker run -i --rm \
  -e SYNOLOGY_HOST=192.168.1.1 \
  -e SYNOLOGY_USER=admin \
  -e SYNOLOGY_PASSWORD=secret \
  lordraw/synology-mcp

Example prompts

File Station
List all shared folders on my NAS.
What files are inside /volume1/photos?
How much space does the /volume1/docker folder use?
Search for all PDF files inside /volume1/Doc.
Create a folder called "archive" inside /volume1/share.
Rename /volume1/share/old-report.pdf to final-report.pdf.
Generate a download link for /volume1/share/presentation.pptx.
Create a public sharing link for /volume1/share/budget.xlsx, 
password-protected and expiring on 2025-12-31.
Download Station
Show me all active download tasks.
Add this magnet link to Download Station: magnet:?xt=urn:btih:...
Pause all running download tasks.
Delete completed download tasks.
System & Storage
What is the current DSM version and model of my NAS?
Show me CPU and RAM usage right now.
How much free space is left on volume1?
List all installed DSM packages.
Container Manager (Docker)
List all running Docker containers.
Show me the logs for the homeassistant container.
Restart the nginx container.
Stop the portainer container.
List all Docker Compose projects and their status.
Virtual Machine Manager
List all virtual machines and their power state.
Power on the ubuntu-server VM.
Take a snapshot of the win11 VM called "before-update".
List all snapshots for the ubuntu-server VM.
Task Scheduler
List all scheduled tasks.
Run the backup-task script immediately.
Disable the cleanup-logs scheduled task.
Show the last execution log of the rsync-task.
Log Center
Show me the last 50 error-level log entries.
Are there any warning or error logs from today?
Show connection logs for the last 24 hours.
Power Management
Reboot the NAS.
Put the NAS drives into hibernation.
What is the auto power-on/off schedule?
User & Group Management
List all local DSM users.
Create a new user called "john" with the email [email protected].
Disable the user account "guest".
List all groups and their members.
Add users alice and bob to the "developers" group.
Multi-NAS
List all configured NAS devices.
Show me the shared folders on my backup NAS.
How much free space is left on the home NAS vs the backup NAS?
Check if there are any error logs on the backup NAS.

Available tools

Multi-NAS

list_nas

File Station

list_shares · list_files · get_file_info · create_folder · rename · delete · search_files · get_download_url · get_folder_size

list_sharing_links · get_sharing_link_info · create_sharing_link · delete_sharing_links · clear_invalid_sharing_links

Download Station

list_tasks · get_task_info · create_task · pause_task · resume_task · delete_task · get_download_station_info · get_download_station_config

System

get_dsm_info · get_storage_info · get_network_info · get_system_utilization · list_packages · list_users · get_quota

Task Scheduler

list_tasks · get_task_output · run_task · set_task_enabled · delete_task

Log Center

get_logs · get_connection_logs · clear_logs

Power

shutdown_nas · reboot_nas · hibernate_nas · get_power_schedule

Container Manager (Docker)

list_containers · get_container · start_container · stop_container · restart_container · get_container_logs · list_images · delete_image · list_projects · set_project_state

Virtual Machine Manager

list_vms · get_vm · poweron_vm · shutdown_vm · poweroff_vm · list_vm_snapshots · create_vm_snapshot · delete_vm_snapshot

Shared Folder Management

list_shared_folders · get_shared_folder · create_shared_folder · delete_shared_folder · get_folder_permissions · set_folder_permissions

User & Group Management

create_user · delete_user · update_user · set_user_enabled · list_groups · create_group · delete_group · set_group_members


Security notes

  • Credentials are passed at runtime via environment variables or a mounted config file — they are never baked into the image.
  • Mount the config file read-only (:ro) to reduce the attack surface.
  • Two-step verification (OTP/TOTP) is not supported.
  • Use a dedicated DSM account with the minimum required permissions rather than the built-in admin account.

Source

github.com/lordraw77/synology-mcp

Tag summary

Content type

Image

Digest

sha256:2055754e6

Size

65.2 MB

Last updated

4 months ago

docker pull lordraw/synology-mcp