unraid-mcp
An MCP server that enables AI assistants like Claude to manage Unraid servers through natural language. Install it from Community Applications and control your homelab from any MCP-compatible AI client.
README
unraid-mcp
An MCP (Model Context Protocol) server that enables AI assistants like Claude to manage Unraid servers through natural language. Install it once from Community Applications and control your homelab from any MCP-compatible AI client.
Features
61 tools across 8 categories:
| Category | Tools | Description |
|---|---|---|
| Docker | 5 | List, start, stop, restart containers; get logs |
| VMs | 4 | List, start, stop, pause virtual machines |
| Array | 3 | Status, start, stop the storage array |
| Shares | 2 | List and inspect user shares |
| Users | 1 | List user accounts |
| System | 3 | System info, reboot, shutdown |
| Plugins | 2 | List plugins, trigger updates |
| Network | 1 | List network interfaces and stats |
Example interactions:
- "Show me all running Docker containers and their memory usage"
- "Stop the Plex container, wait 10 seconds, then start it again"
- "What's the health of my array disks? Any temperatures I should worry about?"
- "List all VMs and tell me which ones are using the most memory"
Architecture
AI Client (Claude Desktop, etc.)
│ MCP over HTTP (Streamable HTTP transport)
▼
unraid-mcp server ← binary compiled with bun, runs as Unraid plugin
│
├── GraphQL API (port 31337, Unraid 7.2+) ← primary
└── CLI / file parsing ← fallback
GraphQL-first: Unraid 7.2 introduced a GraphQL API on port 31337. All tools use it as the primary backend for reliability and type safety.
CLI fallback: For operations not yet in the GraphQL API, tools fall back to parsing /proc files, running docker CLI commands, or reading Unraid config files directly.
Compiled binary: The server is compiled to a standalone executable with bun compile — no Node.js or npm required on the Unraid host.
Installation
Community Applications (recommended)
- Open Community Applications in your Unraid UI
- Search for "Unraid MCP"
- Click Install
- Go to Settings → Unraid MCP to configure your API key and port
Manual
Download the latest .plg file and install via Plugins → Install Plugin in your Unraid UI.
Configuration
After installation, configure via Settings → Unraid MCP in the Unraid UI:
| Setting | Default | Description |
|---|---|---|
UNRAID_HOST |
localhost |
Unraid host (usually localhost) |
UNRAID_GRAPHQL_PORT |
31337 |
GraphQL API port (Unraid 7.2+) |
UNRAID_API_KEY |
(required) | Generate at Settings → API Keys |
UNRAID_USE_TLS |
false |
Use HTTPS for GraphQL connection |
MCP_SERVER_PORT |
3000 |
Port for the MCP server |
LOG_LEVEL |
info |
Logging verbosity |
Connecting Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"unraid": {
"url": "http://YOUR_UNRAID_IP:3000/mcp"
}
}
}
Replace YOUR_UNRAID_IP with your Unraid server's IP address.
Development
Prerequisites
- Node.js 18+ or Bun
- TypeScript
Setup
git clone https://github.com/lherron/unraid-mcp
cd unraid-mcp
npm install
# Configure environment
cp .env.example .env
# Edit .env with your Unraid connection details
# Start in development mode
npm run dev
Environment variables
UNRAID_HOST=192.168.1.100
UNRAID_GRAPHQL_PORT=31337
UNRAID_API_KEY=your-api-key-here
UNRAID_USE_TLS=false
MCP_SERVER_PORT=3000
LOG_LEVEL=debug
Build
# TypeScript compilation
npm run build
# Compile to standalone binary (requires bun)
npm run compile
# Create Slackware .txz package for Unraid
npm run package
Project structure
src/
index.ts # MCP server entry point
lib/
graphql.ts # GraphQL client
auth.ts # API key auth helpers
config.ts # Config loading from env
tools/
docker/index.ts # Docker management tools
vms/index.ts # VM management tools
array/index.ts # Array management tools
shares/index.ts # Share management tools
users/index.ts # User management tools
system/index.ts # System info tools
plugins/index.ts # Plugin management tools
network/index.ts # Network tools
types/
index.ts # TypeScript type definitions
plugin/
unraid-mcp.plg # Unraid plugin descriptor
settings.php # Settings page for Unraid UI
scripts/
package.sh # Build and package script
Contributing
Contributions welcome! Areas that need work:
- More tools: The Unraid GraphQL API has many more operations — PRs adding tools are very welcome
- CLI fallbacks: Improve fallbacks for Unraid versions below 7.2
- Testing: Integration tests against a real or mocked Unraid API
- Documentation: Better examples and use cases
Adding a new tool
- Find the relevant tool category under
src/tools/ - Add a new
server.tool(...)call following the existing pattern - Define the GraphQL query/mutation as a constant
- Add TypeScript types to
src/types/index.tsif needed - Submit a PR with a description of the tool and the GraphQL operation it uses
Reporting issues
Please open an issue at https://github.com/lherron/unraid-mcp/issues with:
- Your Unraid version
- The tool that failed
- The error message
- Steps to reproduce
License
MIT — see LICENSE
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。