synology-chat-hermes-mcp
synology-chat-hermes-mcp
制約付き FastMCP HTTP サーバーです。固定された Synology NAS の SMB 共有を AI エージェントに読み書き可能なファイルツールとして公開します。パスの厳格な隔離、サイズ制限、アクティブコンテンツの拒否が組み込まれています。
当初はファミリー向け Hermes デプロイメント(制御エージェント → MCP → SMB3 → NAS)のファイルチャネルとして構築されました。任意の MCP クライアント(Hermes、Claude など)で動作します。
存在理由
ファイルアクセスを持つ AI エージェントは、そのアクセス範囲が制限されている場合にのみ安全です。このサーバーは以下の機能を備えています:
すべてのパスを隔離 — 1つの固定共有(
NAS_SHARE)に制限します。パストラバーサル(..、絶対パス、シンボリックリンク/リパースポイントのエスケープ)は、SMB 呼び出しの前に拒否されます。公開 WAN サーバーを拒否 —
NAS_SERVERはプライベート、リンクローカル、または Tailscale(100.64.0.0/10)の固定 IP アドレスである必要があります。DNS 名やパブリック IP は拒否されます。認証情報を保存しない — SMB パスワードは起動時に Docker シークレットファイル(
NAS_PASSWORD_FILE)から読み取られ、環境変数やコードには一切保存されません。アクティブコンテンツをブロック — DOCX/XLSX/PDF ライターはサニタイズされたドキュメントのみを生成します。バイナリアップロードはマクロ、外部リレーションシップ、スクリプトをスキャンし、拡張子とメディアタイプの不一致は拒否されます。
すべてを制限 — ファイルサイズ、バイナリサイズ、ドキュメント文字数、スプレッドシートセル数、画像ピクセル数、検索結果すべてにハードリミットが設定されています。
操作を監査 — すべての変更操作は JSONL 形式の監査ログに追記されます。
Related MCP server: MCP File System Server
アーキテクチャ
Hermes (or any MCP client)
→ HTTP :8000/mcp (FastMCP, streamable HTTP)
→ NasService (validation, limits, audit)
→ SMBBackend (smbprotocol, SMB3, encryption+signing required)
→ Synology NAS shareツール
ツール | 説明 |
| SMB3 接続確認 |
| 共有以下のディレクトリを一覧表示 |
| パス以下のファイル名を検索 |
| サイズ制限付きの UTF-8 テキストファイルを読み取り |
| アトミックな UTF-8 書き込み(既存ファイルは |
| 検証済み base64 書き込み(TXT/DOCX/XLSX/PDF/PNG/JPEG) |
| タイトル + プレーン/Markdown 風テキストから安全な DOCX を作成 |
| 安全な XLSX を作成(数式は拒否) |
| 静的 PDF を作成(スクリプト/リンク/埋め込みファイルなし) |
| TXT/MD/CSV/JSON/YAML/DOCX/XLSX/PDF からテキストを抽出 |
| ディレクトリを作成(注意:一度に1階層ずつ作成してください — |
| 共有内でファイルを移動 |
| コンテンツなしのメタデータ |
既知の制限事項: create_directory は makedirs の前に親ディレクトリを検証するため、最初のセグメントが存在しないマルチレベルのパスでは、parents=True を指定しても not_found が返されます。一度に1階層ずつ作成してください。
クイックスタート
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ヘルスチェック:
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 設定
mcp_servers:
nas-mcp:
type: http
url: http://nas-mcp:8000/mcpテストの実行
python -m nas_mcp.smoke # exercises the full tool chain against the live share環境変数リファレンス
変数 | 必須 | デフォルト値 | 備考 |
| ✅ | — | プライベート/Tailscale 固定 IP のみ |
| ✅ | — | 固定共有名、実行時に強制 |
| ✅ | — | 共有レベルの SMB ユーザー |
|
| Docker シークレットのパス | |
|
| ||
|
| SMB3 暗号化必須 | |
|
| SMB3 署名必須 | |
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
| ||
|
|
セキュリティに関する注意事項
SMB パスワードはシステム内で唯一の機密情報であり、Docker シークレットファイルにのみ存在します。ハードコードは一切なく、非機密のチューニング値を除き
.envに平文で保存されることもありません(.envは git 管理対象外です)。本番環境ではプライベートインターフェースにバインドしてください。
:8000を公開しないでください。共有名と SMB ユーザーは設定値(
NAS_SHARE、NAS_USERNAME)です。デプロイメントごとに設定してください。コード内で特定の値を想定することはありません。
ライセンス
MIT
This server cannot be installed
Maintenance
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
- Alicense-qualityCmaintenanceProvides 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
- Flicense-qualityCmaintenanceA 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.
- Alicense-qualityBmaintenanceExposes local file system operations to AI assistants via Streamable HTTP with security features like auth, path whitelisting, and audit logging.2,8841MIT
- FlicenseAqualityBmaintenanceMCP 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
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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