Synology MCP Server

Synology MCP Server

Enables AI assistants to manage Synology NAS devices with file operations (create, delete, move, search) and Download Station control through secure authentication and session management.

Category
Visit Server

README

šŸ’¾ Synology MCP Server

Synology MCP Server

A Model Context Protocol (MCP) server for Synology NAS devices. Enables AI assistants to manage files and downloads through secure authentication and session management.

🌟 NEW: Unified server supports both Claude/Cursor (stdio) and Xiaozhi (WebSocket) simultaneously!

šŸš€ Quick Start with Docker

1ļøāƒ£ Setup Environment

# Clone repository
git clone https://github.com/atom2ueki/mcp-server-synology.git
cd mcp-server-synology

# Create environment file
cp env.example .env

2ļøāƒ£ Configure .env File

Basic Configuration (Claude/Cursor only):

# Required: Synology NAS connection
SYNOLOGY_URL=http://192.168.1.100:5000
SYNOLOGY_USERNAME=your_username
SYNOLOGY_PASSWORD=your_password

# Optional: Auto-login on startup
AUTO_LOGIN=true
VERIFY_SSL=false

Extended Configuration (Both Claude/Cursor + Xiaozhi):

# Required: Synology NAS connection
SYNOLOGY_URL=http://192.168.1.100:5000
SYNOLOGY_USERNAME=your_username
SYNOLOGY_PASSWORD=your_password

# Optional: Auto-login on startup
AUTO_LOGIN=true
VERIFY_SSL=false

# Enable Xiaozhi support
ENABLE_XIAOZHI=true
XIAOZHI_TOKEN=your_xiaozhi_token_here
XIAOZHI_MCP_ENDPOINT=wss://api.xiaozhi.me/mcp/

3ļøāƒ£ Run with Docker

One simple command supports both modes:

# Claude/Cursor only mode (default if ENABLE_XIAOZHI not set)
docker-compose up -d

# Both Claude/Cursor + Xiaozhi mode (if ENABLE_XIAOZHI=true in .env)
docker-compose up -d

# Build and run
docker-compose up -d --build

4ļøāƒ£ Alternative: Local Python

# Install dependencies
pip install -r requirements.txt

# Run with environment control
python main.py

šŸ”Œ Client Setup

šŸ¤– Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "synology": {
      "command": "docker-compose",
      "args": [
        "-f", "/path/to/your/mcp-server-synology/docker-compose.yml",
        "run", "--rm", "synology-mcp"
      ],
      "cwd": "/path/to/your/mcp-server-synology"
    }
  }
}

ā†—ļø Cursor

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "synology": {
      "command": "docker-compose",
      "args": [
        "-f", "/path/to/your/mcp-server-synology/docker-compose.yml",
        "run", "--rm", "synology-mcp"
      ],
      "cwd": "/path/to/your/mcp-server-synology"
    }
  }
}

šŸ”„ Continue (VS Code Extension)

Add to your Continue configuration (.continue/config.json):

{
  "mcpServers": {
    "synology": {
      "command": "docker-compose",
      "args": [
        "-f", "/path/to/your/mcp-server-synology/docker-compose.yml",
        "run", "--rm", "synology-mcp"
      ],
      "cwd": "/path/to/your/mcp-server-synology"
    }
  }
}

šŸ’» Codeium

For Codeium's MCP support:

{
  "mcpServers": {
    "synology": {
      "command": "docker-compose",
      "args": [
        "-f", "/path/to/your/mcp-server-synology/docker-compose.yml",
        "run", "--rm", "synology-mcp"
      ],
      "cwd": "/path/to/your/mcp-server-synology"
    }
  }
}

šŸ Alternative: Direct Python Execution

If you prefer not to use Docker:

{
  "mcpServers": {
    "synology": {
      "command": "python",
      "args": ["main.py"],
      "cwd": "/path/to/your/mcp-server-synology",
      "env": {
        "SYNOLOGY_URL": "http://192.168.1.100:5000",
        "SYNOLOGY_USERNAME": "your_username",
        "SYNOLOGY_PASSWORD": "your_password",
        "AUTO_LOGIN": "true",
        "ENABLE_XIAOZHI": "false"
      }
    }
  }
}

🌟 Xiaozhi Integration

New unified architecture supports both clients simultaneously!

How It Works

  • ENABLE_XIAOZHI=false (default): Standard MCP server for Claude/Cursor via stdio
  • ENABLE_XIAOZHI=true: Multi-client bridge supporting both:
    • šŸ“” Xiaozhi: WebSocket connection
    • šŸ’» Claude/Cursor: stdio connection

Setup Steps

  1. Add to your .env file:
ENABLE_XIAOZHI=true
XIAOZHI_TOKEN=your_xiaozhi_token_here
  1. Run normally:
# Same command, different behavior based on environment
python main.py
# OR
docker-compose up

Key Features

  • āœ… Zero Configuration Conflicts: One server, multiple clients
  • āœ… Parallel Operation: Both clients can work simultaneously
  • āœ… All Tools Available: Xiaozhi gets access to all Synology MCP tools
  • āœ… Backward Compatible: Existing setups work unchanged
  • āœ… Auto-Reconnection: Handles WebSocket connection drops
  • āœ… Environment Controlled: Simple boolean flag to enable/disable

Startup Messages

Claude/Cursor only mode:

šŸš€ Synology MCP Server
==============================
šŸ“Œ Claude/Cursor only mode (ENABLE_XIAOZHI=false)

Both clients mode:

šŸš€ Synology MCP Server with Xiaozhi Bridge
==================================================
🌟 Supports BOTH Xiaozhi and Claude/Cursor simultaneously!

šŸ› ļø Available MCP Tools

šŸ” Authentication

  • synology_status - Check authentication status and active sessions
  • synology_login - Authenticate with Synology NAS (conditional)
  • synology_logout - Logout from session (conditional)

šŸ“ File System Operations

  • list_shares - List all available NAS shares
  • list_directory - List directory contents with metadata
    • path (required): Directory path starting with /
  • get_file_info - Get detailed file/directory information
    • path (required): File path starting with /
  • search_files - Search files matching pattern
    • path (required): Search directory
    • pattern (required): Search pattern (e.g., *.pdf)
  • create_file - Create new files with content
    • path (required): Full file path starting with /
    • content (optional): File content (default: empty string)
    • overwrite (optional): Overwrite existing files (default: false)
  • create_directory - Create new directories
    • folder_path (required): Parent directory path starting with /
    • name (required): New directory name
    • force_parent (optional): Create parent directories if needed (default: false)
  • delete - Delete files or directories (auto-detects type)
    • path (required): File/directory path starting with /
  • rename_file - Rename files or directories
    • path (required): Current file path
    • new_name (required): New filename
  • move_file - Move files to new location
    • source_path (required): Source file path
    • destination_path (required): Destination path
    • overwrite (optional): Overwrite existing files

šŸ“„ Download Station Management

  • ds_get_info - Get Download Station information
  • ds_list_tasks - List all download tasks with status
    • offset (optional): Pagination offset
    • limit (optional): Max tasks to return
  • ds_create_task - Create new download task
    • uri (required): Download URL or magnet link
    • destination (optional): Download folder path
  • ds_pause_tasks - Pause download tasks
    • task_ids (required): Array of task IDs
  • ds_resume_tasks - Resume paused tasks
    • task_ids (required): Array of task IDs
  • ds_delete_tasks - Delete download tasks
    • task_ids (required): Array of task IDs
    • force_complete (optional): Force delete completed
  • ds_get_statistics - Get download/upload statistics

āš™ļø Configuration Options

Variable Required Default Description
SYNOLOGY_URL Yes* - NAS base URL (e.g., http://192.168.1.100:5000)
SYNOLOGY_USERNAME Yes* - Username for authentication
SYNOLOGY_PASSWORD Yes* - Password for authentication
AUTO_LOGIN No true Auto-login on server start
VERIFY_SSL No true Verify SSL certificates
DEBUG No false Enable debug logging
ENABLE_XIAOZHI No false Enable Xiaozhi WebSocket bridge
XIAOZHI_TOKEN Xiaozhi only - Authentication token for Xiaozhi
XIAOZHI_MCP_ENDPOINT No wss://api.xiaozhi.me/mcp/ Xiaozhi WebSocket endpoint

*Required for auto-login and default operations

šŸ“– Usage Examples

šŸ“ File Operations

āœ… Creating Files and Directories

File Creation

// List directory
{
  "path": "/volume1/homes"
}

// Search for PDFs
{
  "path": "/volume1/documents", 
  "pattern": "*.pdf"
}

// Create new file
{
  "path": "/volume1/documents/notes.txt",
  "content": "My important notes\nLine 2 of notes",
  "overwrite": false
}

šŸ—‘ļø Deleting Files and Directories

File Deletion

// Delete file or directory (auto-detects type)
{
  "path": "/volume1/temp/old-file.txt"
}

// Move file
{
  "source_path": "/volume1/temp/file.txt",
  "destination_path": "/volume1/archive/file.txt"
}

ā¬‡ļø Download Management

šŸ› ļø Creating a Download Task

Download Sample

// Create download task
{
  "uri": "https://example.com/file.zip",
  "destination": "/volume1/downloads"
}

// Pause tasks
{
  "task_ids": ["dbid_123", "dbid_456"]
}

🦦 Download Results

Download Result

✨ Features

  • āœ… Unified Entry Point - Single main.py supports both stdio and WebSocket clients
  • āœ… Environment Controlled - Switch modes via ENABLE_XIAOZHI environment variable
  • āœ… Multi-Client Support - Simultaneous Claude/Cursor + Xiaozhi access
  • āœ… Secure Authentication - RSA encrypted password transmission
  • āœ… Session Management - Persistent sessions across multiple NAS devices
  • āœ… Complete File Operations - Create, delete, list, search, rename, move files with detailed metadata
  • āœ… Directory Management - Recursive directory operations with safety checks
  • āœ… Download Station - Complete torrent and download management
  • āœ… Docker Support - Easy containerized deployment
  • āœ… Backward Compatible - Existing configurations work unchanged
  • āœ… Error Handling - Comprehensive error reporting and recovery

šŸ—ļø Architecture

File Structure

mcp-server-synology/
ā”œā”€ā”€ main.py                    # šŸŽÆ Unified entry point
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ mcp_server.py         # Standard MCP server
│   ā”œā”€ā”€ multiclient_bridge.py # Multi-client bridge
│   ā”œā”€ā”€ auth/                 # Authentication modules
│   ā”œā”€ā”€ filestation/          # File operations
│   └── downloadstation/      # Download management
ā”œā”€ā”€ docker-compose.yml        # Single service, environment-controlled
ā”œā”€ā”€ Dockerfile
ā”œā”€ā”€ requirements.txt
└── .env                      # Configuration

Mode Selection

  • ENABLE_XIAOZHI=false → main.py → mcp_server.py (stdio only)
  • ENABLE_XIAOZHI=true → main.py → multiclient_bridge.py → mcp_server.py (both clients)

Perfect for any workflow - from simple Claude/Cursor usage to advanced multi-client setups! šŸš€

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured