You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# MCP SSH Unraid - Project Instructions
1
+
# MCP SSH SRE - Project Instructions
2
2
3
3
## User Expectations
4
4
@@ -58,4 +58,14 @@ When testing the deployed MCP server, use the MCP tools (e.g., `mcp__unraid-ssh_
58
58
59
59
## Filter System
60
60
61
-
All 79 tools support comprehensive output filtering. Filters are defined in`src/filters.ts` and applied via `...outputFiltersSchema.shape` pattern. When adding new tools, always include filter support.
61
+
All 12 tool modules (with 79+ total actions) support comprehensive output filtering. Filters are defined in`src/filters.ts` and applied via `...outputFiltersSchema.shape` pattern. When adding new tools, always include filter support.
62
+
63
+
## Platform Architecture
64
+
65
+
The server uses a platform abstraction layer:
66
+
- **Core tools** (`src/tools/core/`): 10 modules, always loaded on any Linux system
67
+
- **Platform-specific tools** (`src/platforms/*/`): Loaded based on auto-detection
68
+
- Unraid: 2 modules (array-tools, plugin-tools)
69
+
- Generic Linux: No extra modules (uses core only)
70
+
71
+
Tool loading is handled by `src/tool-loader.ts` based on the detected platform.
Copy file name to clipboardExpand all lines: README.md
+86-87Lines changed: 86 additions & 87 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,21 @@
1
-
# MCP SSH Unraid
1
+
# MCP SSH SRE
2
2
3
-
A Model Context Protocol (MCP) server that provides secure, read-only SSH access to Unraid servers for debugging and monitoring through AI assistants like Claude.
3
+
A Model Context Protocol (MCP) server that provides secure, read-only SSH access to Linux servers for debugging and monitoring through AI assistants like Claude. Supports multiple platforms with auto-detection.
4
+
5
+
## Supported Platforms
6
+
7
+
| Platform | Status | Tools |
8
+
|----------|--------|-------|
9
+
|**Unraid**| Full support | 12 modules (10 core + 2 Unraid-specific) |
10
+
|**Generic Linux**| Full support | 10 core modules |
11
+
|**TrueNAS**| Planned | - |
12
+
|**Proxmox**| Planned | - |
13
+
14
+
The server automatically detects your platform at startup and loads the appropriate tools.
4
15
5
16
## Why Use This?
6
17
7
-
Managing an Unraid server often involves SSH-ing in, running multiple commands, correlating logs, and interpreting system metrics. This MCP server enables AI assistants to do that work for you using natural language.
18
+
Managing a Linux server often involves SSH-ing in, running multiple commands, correlating logs, and interpreting system metrics. This MCP server enables AI assistants to do that work for you using natural language.
8
19
9
20
**Ask questions like:**
10
21
@@ -15,90 +26,58 @@ Managing an Unraid server often involves SSH-ing in, running multiple commands,
15
26
16
27
Instead of manually running `docker logs`, `smartctl`, `docker inspect`, parsing outputs, and correlating information across multiple tools, your AI assistant does it all in seconds.
17
28
18
-
## Why SSH Instead of the Unraid API?
19
-
20
-
Unraid 7.2+ includes a [GraphQL API](https://docs.unraid.net/API/), so you might wonder why this project uses SSH instead. The short answer: **the API has significant gaps** for the kind of deep monitoring and debugging this project provides.
21
-
22
-
### What the Unraid API Cannot Do
23
-
24
-
The Unraid GraphQL API is still evolving and has documented limitations:
Additionally, the API has a [known 32-bit integer overflow](https://github.com/domalab/ha-unraid-connect/issues/8) affecting memory monitoring on systems with >4GB RAM.
42
-
43
-
### What SSH Enables
44
-
45
-
With SSH, this project provides **79 specialized tools** that can:
29
+
## Why SSH Instead of Platform APIs?
46
30
47
-
-**Analyze Docker logs** - Search, filter, and correlate logs across all containers simultaneously
48
-
-**Parse SMART data** - Detailed drive health analysis including temperature trends, error counts, and failure predictions
49
-
-**Monitor everything** - CPU, memory, I/O, network connections, and processes in real-time
50
-
-**Search logs everywhere** - Pattern matching across syslog, Docker logs, and application logs
51
-
-**Debug inter-container networking** - Test connectivity, DNS resolution, and trace routes between containers
52
-
-**Manage VMs** - Full libvirt/virsh access for VM inspection, VNC details, and QEMU logs
53
-
-**Audit security** - Check open ports, failed logins, certificate expiration, and container privileges
31
+
Many platforms have APIs (like Unraid's GraphQL API), but they often have significant gaps for deep monitoring and debugging:
| GraphQL API | 7.2+ only (or Connect plugin) | Yes |
60
-
| SSH | All versions | No |
61
-
62
-
### The Bottom Line
63
-
64
-
The Unraid API is great for basic status checks and container start/stop operations. But for the deep debugging, log analysis, and comprehensive monitoring that AI assistants need to actually diagnose problems, SSH provides unrestricted access to all system tools—on any Unraid version, without rate limiting.
44
+
SSH provides unrestricted access to all system tools on any Linux system, without rate limiting.
65
45
66
46
## Features
67
47
68
-
-**79 specialized tools** for comprehensive Unraid server management through natural language
48
+
-**Auto-detection** - Automatically detects your platform (Unraid, generic Linux) and loads appropriate tools
49
+
-**12 tool modules with 79+ actions** for comprehensive server management through natural language
69
50
-**Dual transport modes** - Run via stdio (local) or HTTP/SSE (network-accessible)
70
51
-**Read-only by design** - Zero risk of accidental system modifications
71
52
-**Docker container management** - Inspect, logs, stats, environment variables, port mappings, network topology, and inter-container communication testing
-**Health diagnostics** - Comprehensive monitoring that aggregates array status, temperatures, disk space, container health, and system resources with automatic issue detection
-**Health diagnostics** - Comprehensive monitoring that aggregates system status, temperatures, disk space, container health, and system resources with automatic issue detection
74
55
-**System monitoring** - Process monitoring, resource usage analysis, disk I/O statistics, network connections, and memory pressure detection
75
56
-**Log analysis** - Search and analyze logs across all containers and system logs simultaneously with pattern detection
76
57
-**VM management** - List, inspect, and monitor virtual machines with VNC connection details and libvirt/QEMU logs
77
58
-**Security auditing** - Port scanning, failed login monitoring, permission audits, and vulnerability scanning
78
59
-**Filesystem operations** - Browse files, search patterns, check permissions, and monitor disk usage with read-only safety
79
-
-**AI-powered insights** - Let Claude correlate data across multiple tools and provide actionable recommendations
80
-
-**Faster troubleshooting** - Diagnose complex issues in seconds instead of manually running multiple commands
docker run -d -p 3000:3000 --env-file .env mcp-ssh-unraid-http
249
+
docker build -f Dockerfile.http -t mcp-ssh-sre.
250
+
docker run -d -p 3000:3000 --env-file .env mcp-ssh-sre
276
251
277
252
# Or use Docker Compose (recommended)
278
253
docker-compose -f docker-compose.http.yml up -d
@@ -286,7 +261,6 @@ In addition to the SSH configuration variables, HTTP mode supports:
286
261
HTTP_PORT=3000 # Port for HTTP server (default: 3000)
287
262
CORS_ORIGIN=*# CORS origin (default: *, allows all origins)
288
263
OAUTH_SERVER_URL=https://mcp.example.com # Public URL for OAuth discovery (REQUIRED for production)
289
-
MOCK_TOKEN=mcp-unraid-access-token # Mock token for testing (optional)
290
264
```
291
265
292
266
> **Important:** When deploying behind a reverse proxy (Traefik, nginx, etc.), you **must** set `OAUTH_SERVER_URL` to your public URL (e.g., `https://mcp.example.com`). This URL is returned in OAuth discovery metadata endpoints. If not set correctly, OAuth clients will fail with a "protected resource does not match" error.
@@ -305,7 +279,7 @@ Add to your MCP client configuration:
305
279
```json
306
280
{
307
281
"mcpServers": {
308
-
"unraid-ssh-http": {
282
+
"ssh-sre": {
309
283
"url": "http://your-server:3000/mcp",
310
284
"transport": "http"
311
285
}
@@ -318,13 +292,38 @@ Or for Claude Desktop with HTTP support:
0 commit comments