Repository navigation
π‘οΈ Safety release. Destructive calls now pass an HMAC-bound confirmation form, every call lands in an append-only audit trail, delete prefers a same-share trash folder, and File Station writes can be confined to chosen folders per NAS or globally. MCP_TOOL_PROFILE turns "monitor only" and "no destructive tools" into real deployment modes. The first multi-arch container image is published to GHCR. Two behaviour changes matter on upgrade β destructive tools require confirmation by default, and writes whose target is a share/volume root are refused β read Backward Compatibility before upgrading.
β¨ Added
- Published multi-arch container image at
ghcr.io/atom2ueki/mcp-server-synology, built forlinux/amd64andlinux/arm64on release tags. Stable releases getX.Y.Z,X.Yandlatest; manual branch builds publishedge. The image carries no credentials β pass them at run time.1.9.0is the first release with an image. (#143) MCP_TOOL_PROFILE(server.tool_profile):full(default),no_destructiveorread_only. Filtering happens at registration, so a withheld tool is absent fromtools/listand cannot be called; a spec cannot exist without annotations, andsynology_login/synology_logoutstay available in every profile so a read-only deployment can still establish a session. (#144)MCP_FILESTATION_WRITE_PATHS(synology.<name>.filestation_write_pathsper NAS): a comma-separated allow-list forcreate_directory,create_file,copy_file,move_file,rename_fileanddelete. Moves check both ends (removing the source is a write); copies check only the destination. Out-of-list targets fail withpath_outside_rootsbefore any NAS call. Empty by default. (#140, #145, #146)password_envper-NAS setting names an environment variable to read the NAS password from whensettings.jsonloads, so a launcher can source it from a secret manager and the file never stores it. An entry that sets bothpasswordandpassword_env, or whose variable is unset or empty, is skipped with a warning. (#138)- Login Portal reverse proxy tools β
synology_reverse_proxy_list,_get,_create,_update,_delete, plussynology_access_control_profile_list. Updates layer the given fields over the stored entry; writes are serialized per NAS because each one reloads nginx, and a timed-out write is reportedoutcome_unknownrather than retried. (#128) - DSM/package update and security posture tools β read-only
synology_update_statusandsynology_security_posture, plus confirm-gatedsynology_dsm_update_download,synology_dsm_update_install(dry-runs DSM's own prechecks withoutconfirm=true),synology_terminal_set,synology_autoblock_set,synology_autoblock_allow_add/_removeandsynology_https_redirect_set. Each setting write changes only the fields asked for, reads back, and reportsoutcome: unknowninstead of retrying a possibly-applied change. (#130) skills/synology-recovery/β a snapshot-restore runbook distilled from a real incident: inventory, snapshot-vs-live diff, missing-only restore withcp --reflink=always, checksum verification, the stale-mount trap, and the rule thatrm -rfmust never touch a mount point. (#142)
π Security
- Per-call audit trail. Every tool call appends one JSON line to
logs/audit.jsonl(configurable): run id, tool, risk tier, masked arguments, outcome, duration and error. Before a destructive call the server writes and flushes an intent record and refuses the call withaudit_unavailableif it cannot; after any call the append is best effort, because the action already happened. Rotation by size;MCP_AUDIT=falsedisables it. (#142) - Destructive tools require confirmation, bound to the exact call. On an MCP
2026-07-28connection the first call returns anInputRequiredResultcarrying a form and an HMAC-signed, single-use, expiringrequestState; only the retry with approval executes. Unsupported clients fail closed.overwrite=trueescalates copy/move/create through the same gate.MCP_CONFIRM=mrtr|off. (#142) - Capability-detected soft delete.
deletemoves the target into<share>/#trash/<date>/first β a same-share move with no extra space β and falls back to a normal delete only when the share cannot host it.MCP_TRASH=auto|always|never,MCP_TRASH_DIRfor an absolute template, placement recorded in the audit trail. Move failures never fall through to a hard delete. (#142) - Container environment values no longer leak.
synology_container_getreturnsenv_keys(variable names only) forConfig.Envandprofile.env_variables; credential-shaped keys are dropped at any depth.get_projectuses the same sanitizer, which now also recognisesenv_variables. (#139) - MCP annotations on every tool, and untrusted output is fenced. 54 read-only, 18 additive and 35 destructive tools (plus the conditional login/logout pair), declared on each tool's
ToolSpec; an omitteddestructiveHintstays destructive. Every successful result is wrapped in a random-id<untrusted-data>block so file names, contents, logs and download names read as data, not instructions; the Xiaozhi bridge applies the same fence and uses MCP wire field names. (#134) deleterefuses a share root. File Station paths are share-relative and directories delete recursively, sodelete("/photos")could remove the whole shared folder. The item's type is read first and a one-segment directory is refused before any delete task starts; a one-segment path whose type cannot be read is refused too. Files inside a share still delete normally, and DSM receives the same normalized path the guard checked. (#136)
π Fixed
- Group membership changes now apply.
synology_add_user_to_group/synology_remove_user_from_groupsentjoin_groups/leave_groups; DSM accepts those with a task id but never applies them, and the #90 read-back then reported "queued, not applied". They now sendjoin_groupandleave_group(singular), both on every call with the unused side as[], matching DSM's own user dialog and the communitysynology-apiclient. Reported on DSM 7.3.2 and 7.4.1. (#147, #151) - A DSM
success: falsenow setsisErrorfor health, NFS, Container Manager and user-management tools. Previously a refusedsynology_delete_useror a failedsynology_set_user_permissionsreached the client flagged as success; the JSON body is preserved on the stdio and HTTP transports. (#135) repositoryis required in the container pull/download/tags schemas. The handlers already read it unconditionally, so a call without it failed with a bareKeyError. (#142)
π§ Changed
- One declaration per tool. Descriptions, JSON schemas, handlers and MCP annotations now live together on a
ToolSpecinsrc/tools/; thetool_safetyname tables,annotations_for()andunclassified()are gone.tools/listreturns the same 107 tools with the same descriptions, schemas and annotations β verified against the old registry β with onlysynology_health_summarymoving to sit with the health tools. A tool cannot be declared without a classification, and an unknown handler fails at registration. - File Station handlers share
_base_url_for/_filestation_for. Write handlers still admit the target before resolving a session, so a refused path is reported before a missing login. - The release image and package version are
1.9.0. The README now points at the pre-built image instead of implying none exists.
π§ Backward Compatibility
Destructive tools no longer execute on the first call. delete, deletes of shares/users/tasks, service stops/restarts, config replacements and other destructive operations return a confirmation form, or confirmation_required for clients without elicitation support. Set MCP_CONFIRM=off to restore the single-call behaviour; the audit trail still records every call.
File Station writes refuse share, volume and filesystem roots. This applies to every write now, not just delete; dot-segments are normalized first. A client that previously asked to write to /photos or /volume1 now gets invalid_write_path. Writes below a share are unaffected, and an empty MCP_FILESTATION_WRITE_PATHS keeps every other path allowed.
Deletes prefer the trash. With the default MCP_TRASH=auto, delete moves the target into <share>/#trash/<date>/ instead of unlinking it; the result reports soft_delete, trash_path and original_path. MCP_TRASH=never restores the old behaviour.
The audit trail is on by default. A path that cannot be written refuses destructive calls with audit_unavailable; point MCP_AUDIT_LOG at a writable location or set MCP_AUDIT=false to run without a trail.
Internal classification names are gone. tool_safety.TOOL_ANNOTATIONS, annotations_for() and unclassified() were removed; annotations now come from each ToolSpec. These were not part of the documented API.
Everything else keeps working. The default profile is still full, the write allow-list is empty, stdio/HTTP/Xiaozhi transports and all existing tools are unchanged, and the container image still contains no credentials.
π New Contributors
- @barbecuesteve made their first contributions in #134, #135 and #136
- @mochlast made their first contribution in #128
- @virtualben89 made their first contribution in #143