Provides tools for monitoring Docker containers and networks on an Unraid server, including listing containers and accessing detailed information about specific containers.
Interfaces with Unraid's GraphQL API to facilitate all server interactions, handling authentication and providing consistent error reporting.
Allows querying information about the Plex media server container running on Unraid, mentioned as an example use case for container-specific details.
Enables interaction with an Unraid server through its GraphQL API, offering system monitoring, array status, Docker container management, VM management, disk information, notification management, share management, user management, and plugin monitoring capabilities.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Unraid MCP Serverlist all my Docker containers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π Unraid MCP Server
A powerful MCP (Model Context Protocol) server that provides comprehensive tools to interact with an Unraid server's GraphQL API.
β¨ Features
π§ 10 Tools, 90 Actions: Complete Unraid management through MCP protocol
ποΈ Modular Architecture: Clean, maintainable, and extensible codebase
β‘ High Performance: Async/concurrent operations with optimized timeouts
π Real-time Data: WebSocket subscriptions for live log streaming
π Health Monitoring: Comprehensive system diagnostics and status
π³ Docker Ready: Full containerization support with Docker Compose
π Secure: Proper SSL/TLS configuration and API key management
π Rich Logging: Structured logging with rotation and multiple levels
Related MCP server: Model Control Plane (MCP) Server
π Table of Contents
π― Claude Code Plugin
The easiest way to use Unraid MCP is through the Claude Code marketplace:
# Add the marketplace
/plugin marketplace add jmagar/unraid-mcp
# Install the Unraid skill
/plugin install unraid @unraid-mcpThis provides instant access to Unraid monitoring and management through Claude Code with:
10 MCP tools exposing 83 actions via the consolidated action pattern
10 slash commands for quick CLI-style access (
commands/)Real-time system metrics and health monitoring
Docker container and VM lifecycle management
Disk health monitoring and storage management
See
π Quick Start
Prerequisites
Docker and Docker Compose (recommended)
OR Python 3.12+ with uv for development
Unraid server with GraphQL API enabled
1. Clone Repository
git clone https://github.com/jmagar/unraid-mcp
cd unraid-mcp2. Configure Environment
cp .env.example .env
# Edit .env with your Unraid API details3. Deploy with Docker (Recommended)
# Start with Docker Compose
docker compose up -d
# View logs
docker compose logs -f unraid-mcpOR 3. Run for Development
# Install dependencies
uv sync
# Run development server
uv run unraid-mcp-serverπ Plugin Structure
This repository is a Claude Code plugin. Key components:
unraid-mcp/ # ${CLAUDE_PLUGIN_ROOT}
βββ .claude-plugin/
β βββ marketplace.json # Marketplace catalog
β βββ plugin.json # Plugin manifest
βββ commands/ # 10 custom slash commands
βββ unraid_mcp/ # MCP server Python package
βββ skills/unraid/ # Skill and documentation
βββ pyproject.toml # Dependencies and entry points
βββ scripts/ # Validation and helper scriptsMCP Server: 10 tools with 76 actions via GraphQL API
Slash Commands: 10 commands in
commands/for quick CLI-style accessSkill:
/unraidskill for monitoring and queriesEntry Point:
unraid-mcp-serverdefined in pyproject.toml
π¦ Installation
π³ Docker Deployment (Recommended)
The easiest way to run the Unraid MCP Server is with Docker:
# Clone repository
git clone https://github.com/jmagar/unraid-mcp
cd unraid-mcp
# Set required environment variables
export UNRAID_API_URL="http://your-unraid-server/graphql"
export UNRAID_API_KEY="your_api_key_here"
# Deploy with Docker Compose
docker compose up -d
# View logs
docker compose logs -f unraid-mcpManual Docker Build
# Build and run manually
docker build -t unraid-mcp-server .
docker run -d --name unraid-mcp \
--restart unless-stopped \
-p 6970:6970 \
-e UNRAID_API_URL="http://your-unraid-server/graphql" \
-e UNRAID_API_KEY="your_api_key_here" \
unraid-mcp-serverπ§ Development Installation
For development and testing:
# Clone repository
git clone https://github.com/jmagar/unraid-mcp
cd unraid-mcp
# Install dependencies with uv
uv sync
# Install development dependencies
uv sync --group dev
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Run development server
uv run unraid-mcp-serverβοΈ Configuration
Environment Variables
Create .env file in the project root:
# Core API Configuration (Required)
UNRAID_API_URL=https://your-unraid-server-url/graphql
UNRAID_API_KEY=your_unraid_api_key
# MCP Server Settings
UNRAID_MCP_TRANSPORT=streamable-http # streamable-http (recommended), sse (deprecated), stdio
UNRAID_MCP_HOST=0.0.0.0
UNRAID_MCP_PORT=6970
# Logging Configuration
UNRAID_MCP_LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR
UNRAID_MCP_LOG_FILE=unraid-mcp.log
# SSL/TLS Configuration
UNRAID_VERIFY_SSL=true # true, false, or path to CA bundle
# Optional: Log Stream Configuration
# UNRAID_AUTOSTART_LOG_PATH=/var/log/syslog # Path for log streaming resourceTransport Options
Transport | Description | Use Case |
| HTTP-based (recommended) | Most compatible, best performance |
| Server-Sent Events (deprecated) | Legacy support only |
| Standard I/O | Direct integration scenarios |
π οΈ Available Tools & Resources
Each tool uses a consolidated action parameter to expose multiple operations, reducing context window usage. Destructive actions require confirm=True.
Tool Categories (10 Tools, 76 Actions)
Tool | Actions | Description |
| 19 | overview, array, network, registration, connect, variables, metrics, services, display, config, online, owner, settings, server, servers, flash, ups_devices, ups_device, ups_config |
| 5 | parity_start, parity_pause, parity_resume, parity_cancel, parity_status |
| 6 | shares, disks, disk_details, unassigned, log_files, logs |
| 15 | list, details, start, stop, restart, pause, unpause, remove, update, update_all, logs, networks, network_details, port_conflicts, check_updates |
| 9 | list, details, start, stop, pause, resume, force_stop, reboot, reset |
| 9 | overview, list, warnings, create, archive, unread, delete, delete_archived, archive_all |
| 4 | list_remotes, config_form, create_remote, delete_remote |
| 1 | me |
| 5 | list, get, create, update, delete |
| 3 | check, test_connection, diagnose |
MCP Resources (Real-time Data)
unraid://logs/stream- Live log streaming from/var/log/syslogwith WebSocket subscriptions
Note: MCP Resources provide real-time data streams that can be accessed via MCP clients. The log stream resource automatically connects to your Unraid system logs and provides live updates.
π¬ Custom Slash Commands
The project includes 10 custom slash commands in commands/ for quick access to Unraid operations:
Available Commands
Command | Actions | Quick Access |
| 19 | System information, metrics, configuration |
| 5 | Parity check management |
| 6 | Shares, disks, logs |
| 15 | Container management and monitoring |
| 9 | Virtual machine lifecycle |
| 9 | Alert management |
| 4 | Cloud storage remotes |
| 1 | Current user query |
| 5 | API key management |
| 3 | System health checks |
Example Usage
# System monitoring
/info overview
/health check
/storage shares
# Container management
/docker list
/docker start plex
/docker logs nginx
# VM operations
/vm list
/vm start windows-10
# Notifications
/notifications warnings
/notifications archive_all
# User management
/users list
/keys create "Automation Key" "For CI/CD"Command Features
Each slash command provides:
Comprehensive documentation of all available actions
Argument hints for required parameters
Safety warnings for destructive operations (β οΈ)
Usage examples for common scenarios
Action categorization (Query, Lifecycle, Management, Destructive)
Run any command without arguments to see full documentation, or type /help to list all available commands.
π§ Development
Project Structure
unraid-mcp/
βββ unraid_mcp/ # Main package
β βββ main.py # Entry point
β βββ config/ # Configuration management
β β βββ settings.py # Environment & settings
β β βββ logging.py # Logging setup
β βββ core/ # Core infrastructure
β β βββ client.py # GraphQL client
β β βββ exceptions.py # Custom exceptions
β β βββ types.py # Shared data types
β βββ subscriptions/ # Real-time subscriptions
β β βββ manager.py # WebSocket management
β β βββ resources.py # MCP resources
β β βββ diagnostics.py # Diagnostic tools
β βββ tools/ # MCP tool categories (10 tools, 76 actions)
β β βββ info.py # System information (19 actions)
β β βββ array.py # Parity checks (5 actions)
β β βββ storage.py # Storage & monitoring (6 actions)
β β βββ docker.py # Container management (15 actions)
β β βββ virtualization.py # VM management (9 actions)
β β βββ notifications.py # Notification management (9 actions)
β β βββ rclone.py # Cloud storage (4 actions)
β β βββ users.py # Current user query (1 action)
β β βββ keys.py # API key management (5 actions)
β β βββ health.py # Health checks (3 actions)
β βββ server.py # FastMCP server setup
βββ logs/ # Log files (auto-created)
βββ docker-compose.yml # Docker Compose deploymentCode Quality Commands
# Lint and format code
uv run ruff check unraid_mcp/
uv run ruff format unraid_mcp/
# Type checking
uv run ty check unraid_mcp/
# Run tests
uv run pytestAPI Schema Docs Automation
# Regenerate complete GraphQL schema reference from live introspection
set -a; source .env; set +a
uv run python scripts/generate_unraid_api_reference.pyThis updates docs/UNRAID_API_COMPLETE_REFERENCE.md with all operations, directives, and types visible to your API key.
Optional cron example (daily at 03:15):
15 3 * * * cd /path/to/unraid-mcp && /usr/bin/env bash -lc 'set -a; source .env; set +a; uv run python scripts/generate_unraid_api_reference.py && git add docs/UNRAID_API_COMPLETE_REFERENCE.md && git commit -m "docs: refresh unraid graphql schema"'Development Workflow
# Start development server
uv run unraid-mcp-server
# Or run via module directly
uv run -m unraid_mcp.mainποΈ Architecture
Core Principles
Modular Design: Separate concerns across focused modules
Async First: All operations are non-blocking and concurrent-safe
Error Resilience: Comprehensive error handling with graceful degradation
Configuration Driven: Environment-based configuration with validation
Observability: Structured logging and health monitoring
Key Components
Component | Purpose |
FastMCP Server | MCP protocol implementation and tool registration |
GraphQL Client | Async HTTP client with timeout management |
Subscription Manager | WebSocket connections for real-time data |
Tool Modules | Domain-specific business logic (Docker, VMs, etc.) |
Configuration System | Environment loading and validation |
Logging Framework | Structured logging with file rotation |
π Troubleshooting
Common Issues
π₯ Port Already in Use
# Kill existing process on port 6970, then restart
lsof -ti :6970 | xargs kill -9 2>/dev/null; uv run unraid-mcp-serverπ§ Connection Refused
# Check Unraid API configuration
curl -k "${UNRAID_API_URL}" -H "X-API-Key: ${UNRAID_API_KEY}"π Import Errors
# Reinstall dependencies
uv sync --reinstallπ Debug Mode
# Enable debug logging
export UNRAID_MCP_LOG_LEVEL=DEBUG
uv run unraid-mcp-serverHealth Check
# Use the built-in health check tool via MCP client
# or check logs at: logs/unraid-mcp.logπ License
This project is licensed under the MIT License - see the LICENSE file for details.
π€ Contributing
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureRun tests:
uv run pytestCommit changes:
git commit -m 'Add amazing feature'Push to branch:
git push origin feature/amazing-featureOpen a Pull Request
π Support
π Documentation: Check inline code documentation
π Issues: GitHub Issues
π¬ Discussions: Use GitHub Discussions for questions
Built with β€οΈ for the Unraid community