Skip to main content

QNAP NAS Server

An MCP server implementation for QNAP NAS devices, providing tools to monitor system status, manage files, and generate reports.

Tools

qnap-connect

Connect to a QNAP NAS and obtain a session ID for subsequent operations.
host
string
required
The QNAP NAS URL including protocol and port
username
string
required
Admin username for authentication
password
string
required
Admin password for authentication
Example:
qnap-connect http://10.1.1.241:8080 admin mypassword
Example with HTTPS:
qnap-connect https://nas.local:443 admin mypassword

qnap-report

Generate a comprehensive Markdown system report for the connected NAS.
No parameters required. Must be connected to a QNAP NAS first using qnap-connect.
Report includes:
  • CPU usage and statistics
  • Memory utilization
  • Disk health and status (powered by toon tables)
  • Volume information and capacity
  • System temperature
  • Network statistics
The report is formatted in Markdown with professional tables, making it perfect for both human reading and AI analysis.
Example:
qnap-report
Sample output structure:
# QNAP System Report

## System Overview
- Model: TS-453A
- Firmware: 5.0.1
- Uptime: 45 days

## CPU & Memory
- CPU Usage: 12%
- Memory: 4.2 GB / 8 GB (52%)

## Disks
| Disk | Model | Capacity | Health | Temp |
|------|-------|----------|--------|------|
| 1    | WD40EFRX | 4 TB | Good | 38°C |

## Volumes
| Volume | Capacity | Used | Free | Status |
|--------|----------|------|------|--------|
| Vol1   | 7.2 TB   | 4.1 TB | 3.1 TB | Normal |

qnap-dir

List the contents of a directory in a professional tabular format.
path
string
required
The directory path to list (e.g., /Public, /homes/admin)
Results are automatically sorted by modification date (newest first).
Example:
qnap-dir /Public
Example - User home directory:
qnap-dir /homes/admin
Example - Shared folder:
qnap-dir /Public/Documents
Sample output:
| Name          | Type | Size     | Modified            |
|---------------|------|----------|---------------------|
| backup.tar.gz | File | 2.4 GB   | 2026-03-02 14:23:10 |
| documents     | Dir  | -        | 2026-03-01 09:15:42 |
| photos        | Dir  | -        | 2026-02-28 18:30:22 |

qnap-file-info

Get detailed information about a specific file.
path
string
required
The directory path containing the file
filename
string
required
The name of the file to inspect
Example:
qnap-file-info /Public backup.tar.gz
Example - Document file:
qnap-file-info /Public/Documents report.pdf
Sample output:
{
  "name": "backup.tar.gz",
  "path": "/Public/backup.tar.gz",
  "size": 2567890123,
  "size_human": "2.4 GB",
  "modified": "2026-03-02T14:23:10Z",
  "created": "2026-03-02T12:00:00Z",
  "type": "file",
  "mime_type": "application/gzip",
  "permissions": "rw-r--r--",
  "owner": "admin"
}

Resources

QNAP system components are exposed as MCP Resources, providing structured JSON data for monitoring.

Disks

URI Format: qnap://[host]:[port]/disk/[disk-id] Access real-time disk health, model, serial number, and temperature. Example:
qnap://10.1.1.241:8080/disk/0
qnap://10.1.1.241:8080/disk/1
qnap://10.1.1.241:8080/disk/2
Sample resource data:
{
  "disk_id": "0",
  "model": "WDC WD40EFRX-68N32N0",
  "serial": "WD-WCC7K1234567",
  "capacity": "4000787030016",
  "health": "GOOD",
  "temperature": "38",
  "smart_status": "PASSED",
  "hours": "12456"
}

Volumes

URI Format: qnap://[host]:[port]/volume/[volume-id] Access detailed storage usage, capacity, and volume status. Example:
qnap://10.1.1.241:8080/volume/0
qnap://10.1.1.241:8080/volume/1
Sample resource data:
{
  "volume_id": "0",
  "label": "DataVol1",
  "total_size": "7999999999999",
  "free_size": "3421234567890",
  "used_percent": "57.2",
  "status": "Ready",
  "filesystem": "ext4",
  "raid_level": "RAID5"
}
These resources allow AI models to monitor NAS health and storage levels without manually calling reporting tools.

Configuration

Environment Variables

QNAP_USER
string
QNAP admin username (required if providing host at startup)
QNAP_PASSWORD
string
QNAP admin password (required if providing host at startup)

Startup Arguments

  1. host (optional): URL of the QNAP NAS (e.g., http://10.1.1.241:8080)
If the host and environment variables are provided, the server attempts to connect automatically at startup.

Usage with Claude Desktop

NPX Installation:
{
  "mcpServers": {
    "qnap": {
      "command": "npx",
      "args": [
        "-y",
        "@marcelo-ochoa/server-qnap",
        "http://10.1.1.241:8080"
      ],
      "env": {
        "QNAP_USER": "admin",
        "QNAP_PASSWORD": "password"
      }
    }
  }
}
Docker Installation:
{
  "mcpServers": {
    "qnap": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "QNAP_USER=admin",
        "-e",
        "QNAP_PASSWORD=password",
        "mochoa/mcp-qnap",
        "http://10.1.1.241:8080"
      ]
    }
  }
}
Arguments and environment variables are optional. You can connect later using qnap-connect.

Use Cases

Storage Monitoring

Monitor storage health and capacity:
# Connect to NAS
qnap-connect http://10.1.1.241:8080 admin password

# Generate comprehensive report
qnap-report

# Check specific volumes using resources
# Access: qnap://10.1.1.241:8080/volume/0

File Management

Browse and inspect files:
# List directory contents
qnap-dir /Public

# Get detailed file information
qnap-file-info /Public backup.tar.gz

# Navigate subdirectories
qnap-dir /Public/Documents

Health Monitoring

Monitor disk health using resources:
# Access disk resources programmatically
# qnap://10.1.1.241:8080/disk/0
# qnap://10.1.1.241:8080/disk/1

# Generate system report for overview
qnap-report
Monitor disk temperatures regularly. Temperatures above 50°C may indicate cooling issues.

Automated Backups Verification

Verify backup files and monitor storage:
# Check backup directory
qnap-dir /Public/Backups

# Verify specific backup file
qnap-file-info /Public/Backups daily_backup_2026-03-03.tar.gz

# Check available space
qnap-report

Build docs developers (and LLMs) love