Skip to main content
Glama
shunnnnn-png

synology-chat-hermes-mcp

by shunnnnn-png

synology-chat-hermes-mcp

English · 繁體中文

Ein eingeschränkter FastMCP HTTP-Server, der einen festgelegten Synology NAS SMB-Freigabe für KI-Agenten als Lese-/Schreib-Dateiwerkzeuge bereitstellt – mit strenger Pfadisolierung, Größenbeschränkungen und eingebauter Ablehnung von aktiven Inhalten.

Ursprünglich als Dateikanal für eine familiäre Hermes-Bereitstellung (Steuerungsagent → MCP → SMB3 → NAS) entwickelt. Funktioniert mit jedem MCP-Client (Hermes, Claude usw.).

Warum es das gibt

KI-Agenten mit Dateizugriff sind nur sicher, wenn der Zugriff begrenzt ist. Dieser Server:

  • Isoliert jeden Pfad auf eine festgelegte Freigabe (NAS_SHARE). Pfad-Traversal (.., absolute Pfade, Symlink/Reparse-Point-Escape) wird vor jedem SMB-Aufruf abgelehnt.

  • Lehnt öffentliche WAN-Server abNAS_SERVER muss eine private, link-lokale oder Tailscale (100.64.0.0/10) Literal-IP sein. DNS-Namen und öffentliche IPs werden abgelehnt.

  • Speichert niemals Anmeldedaten — das SMB-Passwort wird beim Start aus einer Docker-Secret-Datei gelesen (NAS_PASSWORD_FILE), niemals aus Umgebungsvariablen oder Code.

  • Blockiert aktive Inhalte — DOCX/XLSX/PDF-Schreiber erstellen nur bereinigte Dokumente; Binär-Uploads werden auf Makros, externe Verknüpfungen und Skripte geprüft; Erweiterungs-/Medientyp-Konflikte werden abgelehnt.

  • Begrenzt alles — Dateigröße, Binärgröße, Dokumentzeichen, Tabellenzellen, Bildpixel, Suchergebnisse haben alle feste Grenzen.

  • Prüft Operationen — jede Änderung wird an ein JSONL-Prüfprotokoll angehängt.

Related MCP server: MCP File System Server

Architektur

Hermes (or any MCP client)
  → HTTP :8000/mcp (FastMCP, streamable HTTP)
    → NasService (validation, limits, audit)
      → SMBBackend (smbprotocol, SMB3, encryption+signing required)
        → Synology NAS share

Werkzeuge

Tool

Beschreibung

health

SMB3-Konnektivitätsprüfung

list_directory

Ein Verzeichnis unterhalb der Freigabe auflisten

search_files

Dateinamen unterhalb eines Pfades durchsuchen

read_file

Eine größenbegrenzte UTF-8-Textdatei lesen

write_file

Atomarer UTF-8-Schreibvorgang (bestehende Dateien geschützt, außer bei overwrite)

write_binary_file

Validierter Base64-Schreibvorgang (TXT/DOCX/XLSX/PDF/PNG/JPEG)

create_document

Sicheres DOCX aus Titel + einfachem/Markdown-ähnlichem Text

create_spreadsheet

Sicheres XLSX (Formeln abgelehnt)

create_pdf

Statisches PDF (keine Skripte/Links/eingebettete Dateien)

read_document

Text aus TXT/MD/CSV/JSON/YAML/DOCX/XLSX/PDF extrahieren

create_directory

Ein Verzeichnis erstellen (Hinweis: jeweils eine Ebene erstellen — parents=True ist unzuverlässig, siehe unten)

move_file

Innerhalb der Freigabe verschieben

get_file_info

Metadaten ohne Inhalt

Bekannte Einschränkung: create_directory prüft das Elternverzeichnis vor makedirs, daher gibt ein mehrstufiger Pfad, dessen erstes Segment nicht existiert, not_found zurück, selbst mit parents=True. Erstellen Sie jeweils eine Ebene.

Schnellstart

cp .env.example .env   # set NAS_SERVER (Tailscale/private IP), NAS_USERNAME
# provide the SMB password as a docker secret:
printf '%s' 'YOUR_SMB_PASSWORD' > ./synology_password
chmod 600 ./synology_password

docker build -t nas-mcp .
docker run -d --name nas-mcp \
  --env-file .env \
  -v "$PWD/synology_password:/run/secrets/synology_password:ro" \
  -v nas-mcp-audit:/var/log/nas-mcp \
  -p 8000:8000 \
  nas-mcp

Gesundheitsprüfung:

curl -X POST http://127.0.0.1:8000/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"health","arguments":{}}}'

Hermes MCP-Konfiguration

mcp_servers:
  nas-mcp:
    type: http
    url: http://nas-mcp:8000/mcp

Tests ausführen

python -m nas_mcp.smoke   # exercises the full tool chain against the live share

Umgebungsreferenz

Variable

Erforderlich

Standard

Hinweise

NAS_SERVER

Nur private/Tailscale-Literal-IP

NAS_SHARE

Fester Freigabename, zur Laufzeit erzwungen

NAS_USERNAME

SMB-Benutzer auf Freigabeebene

NAS_PASSWORD_FILE

/run/secrets/synology_password

Docker-Secret-Pfad

NAS_CONNECT_TIMEOUT_SECONDS

8

NAS_REQUIRE_ENCRYPTION

true

SMB3-Verschlüsselung erforderlich

NAS_REQUIRE_SIGNING

true

SMB3-Signierung erforderlich

NAS_AUDIT_LOG

/var/log/nas-mcp/audit.jsonl

NAS_MAX_FILE_BYTES

1048576

NAS_MAX_BINARY_FILE_BYTES

8388608

NAS_MAX_DOCUMENT_CHARS

100000

NAS_MAX_SPREADSHEET_CELLS

50000

NAS_MAX_DOCUMENT_EXPANDED_BYTES

67108864

NAS_MAX_IMAGE_PIXELS

25000000

NAS_MAX_SEARCH_ENTRIES

5000

NAS_MAX_SEARCH_RESULTS

100

NAS_MCP_HOST / NAS_MCP_PORT

0.0.0.0 / 8000

Sicherheitshinweise

  • Das SMB-Passwort ist das einzige Geheimnis im System und befindet sich nur in der Docker-Secret-Datei. Nichts ist fest codiert, nichts wird im Klartext in .env gespeichert, außer nicht-geheimen Tuning-Werten (und .env wird von git ignoriert).

  • In der Produktion an eine private Schnittstelle binden; :8000 nicht öffentlich zugänglich machen.

  • Der Freigabename und der SMB-Benutzer sind Konfiguration (NAS_SHARE, NAS_USERNAME) – setzen Sie sie pro Bereitstellung; nichts im Code nimmt einen bestimmten Wert an.

Lizenz

MIT

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    C
    maintenance
    Provides a secure, constrained filesystem workspace for LLM agents to manage files, notes, and code artifacts via stdio or remote HTTP. It features granular access controls, including extension whitelisting, storage quotas, and immutable paths for safe automated file operations.
    BSD 3-Clause
  • F
    license
    -
    quality
    C
    maintenance
    A secure, sandboxed file system server that enables reading, writing, searching, and managing files through MCP-compatible AI clients with path traversal protection and size limits.
  • A
    license
    -
    quality
    B
    maintenance
    Exposes local file system operations to AI assistants via Streamable HTTP with security features like auth, path whitelisting, and audit logging.
    2,884
    1
    MIT
  • F
    license
    A
    quality
    B
    maintenance
    MCP server enabling AI agents to manage and monitor Synology NAS via official DSM API, including file operations, system stats, backups, downloads, and camera lists.
    15

View all related MCP servers

Related MCP Connectors

  • OCR, transcription, file extraction, and image generation for AI agents via MCP.

  • File uploads for AI agents. Upload, list, and manage files. No signup required.

  • Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shunnnnn-png/synology-chat-hermes-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server