Align documentation and Docker configuration with current implementation

- Fix README.md: Make Docker deployment recommended, remove duplicate installation section
- Fix Dockerfile: Copy correct source files (unraid_mcp/, uv.lock, README.md) instead of non-existent unraid_mcp_server.py
- Update docker-compose.yml: Enable build configuration and use .env instead of .env.local
- Add missing environment variables to .env.example and .env: UNRAID_AUTO_START_SUBSCRIPTIONS, UNRAID_MAX_RECONNECT_ATTEMPTS
- Fix CLAUDE.md: Correct environment hierarchy documentation (../env.local → ../.env.local)
- Remove unused unraid-schema.json file

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jacob Magar
2025-08-13 06:53:56 -04:00
parent 493a376640
commit 4ef65eb5e1
6 changed files with 85 additions and 71 deletions

View File

@@ -24,8 +24,14 @@ UNRAID_MCP_LOG_FILE=unraid-mcp.log # Log file name (saved to logs/ directory)
# Set to a file path to use a custom CA bundle
UNRAID_VERIFY_SSL=true
# Optional: Subscription Auto-start Log Path
# ------------------------------------------
# Custom log file path for subscription auto-start diagnostics
# Real-time Subscription Configuration
# ------------------------------------
# Enable automatic subscription startup (true/false)
UNRAID_AUTO_START_SUBSCRIPTIONS=true
# Maximum WebSocket reconnection attempts (numeric)
UNRAID_MAX_RECONNECT_ATTEMPTS=10
# Optional: Custom log file path for subscription auto-start diagnostics
# Defaults to standard log if not specified
# UNRAID_AUTOSTART_LOG_PATH=/custom/path/to/autostart.log

View File

@@ -98,7 +98,7 @@ docker-compose down
### Environment Variable Hierarchy
The server loads environment variables from multiple locations in order:
1. `/app/.env.local` (container mount)
2. `../env.local` (project root)
2. `../.env.local` (project root)
3. `../.env` (project root)
4. `.env` (local directory)

View File

@@ -7,12 +7,16 @@ WORKDIR /app
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
# Copy the project files
# Copy dependency files
COPY pyproject.toml .
COPY unraid_mcp_server.py .
COPY uv.lock .
COPY README.md .
# Install dependencies
RUN uv sync --frozen --no-dev
# Copy the source code
COPY unraid_mcp/ ./unraid_mcp/
# Install dependencies and the package
RUN uv sync --frozen
# Make port UNRAID_MCP_PORT available to the world outside this container
# Defaulting to 6970, but can be overridden by environment variable

117
README.md
View File

@@ -25,7 +25,6 @@
- [Installation](#-installation)
- [Configuration](#-configuration)
- [Available Tools & Resources](#-available-tools--resources)
- [Docker Deployment](#-docker-deployment)
- [Development](#-development)
- [Architecture](#-architecture)
- [Troubleshooting](#-troubleshooting)
@@ -35,51 +34,94 @@
## 🚀 Quick Start
### Prerequisites
- Python 3.10+
- [uv](https://github.com/astral-sh/uv) package manager
- Docker and Docker Compose (recommended)
- OR Python 3.10+ with [uv](https://github.com/astral-sh/uv) for development
- Unraid server with GraphQL API enabled
### 1. Installation
### 1. Clone Repository
```bash
git clone https://github.com/jmagar/unraid-mcp
cd unraid-mcp
uv sync
```
### 2. Configuration
### 2. Configure Environment
```bash
cp .env.example .env
# Edit .env with your Unraid details
# Edit .env with your Unraid API details
```
### 3. Run
### 3. Deploy with Docker (Recommended)
```bash
# Using uv script (recommended)
uv run unraid-mcp-server
# Start with Docker Compose
docker compose up -d
# Using development script (with hot reload)
# View logs
docker compose logs -f unraid-mcp
```
### OR 3. Run for Development
```bash
# Install dependencies
uv sync
# Run development server
./dev.sh
# Using module syntax
uv run -m unraid_mcp.main
```
---
## 📦 Installation
### Using uv (Recommended)
### 🐳 Docker Deployment (Recommended)
The easiest way to run the Unraid MCP Server is with Docker:
```bash
# Install dependencies
# Clone and configure
git clone https://github.com/jmagar/unraid-mcp
cd unraid-mcp
cp .env.example .env
# Edit .env with your Unraid API details
# Deploy with Docker Compose
docker compose up -d
# View logs
docker compose logs -f unraid-mcp
```
#### Manual Docker Build
```bash
# Build and run manually
docker build -t unraid-mcp-server .
docker run -d --name unraid-mcp \
--restart unless-stopped \
-p 6970:6970 \
--env-file .env \
unraid-mcp-server
```
### 🔧 Development Installation
For development and testing:
```bash
# 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
```
### Manual Installation
```bash
pip install -r requirements.txt # If you have a requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Run development server
./dev.sh
```
---
@@ -170,41 +212,6 @@ UNRAID_VERIFY_SSL=true # true, false, or path to CA bundle
---
## 🐳 Docker Deployment
### Using Docker Compose (Recommended)
1. **Prepare Environment**
```bash
cp .env.example .env.local
# Edit .env.local with your settings
```
2. **Start Services**
```bash
docker compose up -d
```
3. **View Logs**
```bash
docker compose logs -f unraid-mcp
```
### Manual Docker
```bash
# Build image
docker build -t unraid-mcp-server .
# Run container
docker run -d --name unraid-mcp \
--restart unless-stopped \
-p 6970:6970 \
--env-file .env.local \
unraid-mcp-server
```
---
## 🔧 Development

View File

@@ -1,10 +1,8 @@
services:
unraid-mcp:
image: unraid-mcp-server # Assumes you've built this image locally using 'docker build -t unraid-mcp-server .'
# Or, to build automatically if the image doesn't exist:
# build:
# context: .
# dockerfile: Dockerfile
build:
context: .
dockerfile: Dockerfile
container_name: unraid-mcp
restart: unless-stopped
ports:
@@ -12,7 +10,7 @@ services:
# Change the host port (left side) if 6970 is already in use on your host
- "6970:6970"
env_file:
- .env.local # Loads environment variables from .env.local in the same directory as this docker-compose.yml
# Optional: If you want to mount a specific directory for logs (ensure UNRAID_MCP_LOG_FILE in .env.local points within this mount)
- .env # Loads environment variables from .env in the same directory as this docker-compose.yml
# Optional: If you want to mount a specific directory for logs (ensure UNRAID_MCP_LOG_FILE in .env points within this mount)
# volumes:
# - ./logs:/app/logs # Example: maps ./logs on host to /app/logs in container

File diff suppressed because one or more lines are too long