winhelm-mcp 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +96 -0
- package/LICENSE +21 -0
- package/README.md +646 -0
- package/dist/config/config-manager.d.ts +50 -0
- package/dist/config/config-manager.d.ts.map +1 -0
- package/dist/config/config-manager.js +300 -0
- package/dist/config/config-manager.js.map +1 -0
- package/dist/config/default-config.d.ts +4 -0
- package/dist/config/default-config.d.ts.map +1 -0
- package/dist/config/default-config.js +48 -0
- package/dist/config/default-config.js.map +1 -0
- package/dist/config/profiles.d.ts +16 -0
- package/dist/config/profiles.d.ts.map +1 -0
- package/dist/config/profiles.js +208 -0
- package/dist/config/profiles.js.map +1 -0
- package/dist/engine/filesystem.d.ts +52 -0
- package/dist/engine/filesystem.d.ts.map +1 -0
- package/dist/engine/filesystem.js +499 -0
- package/dist/engine/filesystem.js.map +1 -0
- package/dist/engine/http-client.d.ts +10 -0
- package/dist/engine/http-client.d.ts.map +1 -0
- package/dist/engine/http-client.js +93 -0
- package/dist/engine/http-client.js.map +1 -0
- package/dist/engine/pdf-generator.d.ts +15 -0
- package/dist/engine/pdf-generator.d.ts.map +1 -0
- package/dist/engine/pdf-generator.js +325 -0
- package/dist/engine/pdf-generator.js.map +1 -0
- package/dist/engine/powershell-runner.d.ts +23 -0
- package/dist/engine/powershell-runner.d.ts.map +1 -0
- package/dist/engine/powershell-runner.js +148 -0
- package/dist/engine/powershell-runner.js.map +1 -0
- package/dist/engine/ripgrep.d.ts +20 -0
- package/dist/engine/ripgrep.d.ts.map +1 -0
- package/dist/engine/ripgrep.js +173 -0
- package/dist/engine/ripgrep.js.map +1 -0
- package/dist/engine/system.d.ts +67 -0
- package/dist/engine/system.d.ts.map +1 -0
- package/dist/engine/system.js +558 -0
- package/dist/engine/system.js.map +1 -0
- package/dist/engine/task-manager.d.ts +66 -0
- package/dist/engine/task-manager.d.ts.map +1 -0
- package/dist/engine/task-manager.js +203 -0
- package/dist/engine/task-manager.js.map +1 -0
- package/dist/gateway/dashboard-html.d.ts +7 -0
- package/dist/gateway/dashboard-html.d.ts.map +1 -0
- package/dist/gateway/dashboard-html.js +624 -0
- package/dist/gateway/dashboard-html.js.map +1 -0
- package/dist/gateway/preview-html.d.ts +5 -0
- package/dist/gateway/preview-html.d.ts.map +1 -0
- package/dist/gateway/preview-html.js +351 -0
- package/dist/gateway/preview-html.js.map +1 -0
- package/dist/gateway/rate-limiter.d.ts +8 -0
- package/dist/gateway/rate-limiter.d.ts.map +1 -0
- package/dist/gateway/rate-limiter.js +51 -0
- package/dist/gateway/rate-limiter.js.map +1 -0
- package/dist/gateway/server.d.ts +18 -0
- package/dist/gateway/server.d.ts.map +1 -0
- package/dist/gateway/server.js +337 -0
- package/dist/gateway/server.js.map +1 -0
- package/dist/gateway/sse-gateway.d.ts +43 -0
- package/dist/gateway/sse-gateway.d.ts.map +1 -0
- package/dist/gateway/sse-gateway.js +161 -0
- package/dist/gateway/sse-gateway.js.map +1 -0
- package/dist/gateway/streamable-gateway.d.ts +39 -0
- package/dist/gateway/streamable-gateway.d.ts.map +1 -0
- package/dist/gateway/streamable-gateway.js +176 -0
- package/dist/gateway/streamable-gateway.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +164 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/desktop-tools.d.ts +3 -0
- package/dist/tools/desktop-tools.d.ts.map +1 -0
- package/dist/tools/desktop-tools.js +280 -0
- package/dist/tools/desktop-tools.js.map +1 -0
- package/dist/tools/file-tools.d.ts +3 -0
- package/dist/tools/file-tools.d.ts.map +1 -0
- package/dist/tools/file-tools.js +433 -0
- package/dist/tools/file-tools.js.map +1 -0
- package/dist/tools/index.d.ts +12 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +16 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/network-tools.d.ts +3 -0
- package/dist/tools/network-tools.d.ts.map +1 -0
- package/dist/tools/network-tools.js +108 -0
- package/dist/tools/network-tools.js.map +1 -0
- package/dist/tools/registry.d.ts +50 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +54 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/terminal-tools.d.ts +3 -0
- package/dist/tools/terminal-tools.d.ts.map +1 -0
- package/dist/tools/terminal-tools.js +152 -0
- package/dist/tools/terminal-tools.js.map +1 -0
- package/dist/tools/tool-wrapper.d.ts +7 -0
- package/dist/tools/tool-wrapper.d.ts.map +1 -0
- package/dist/tools/tool-wrapper.js +47 -0
- package/dist/tools/tool-wrapper.js.map +1 -0
- package/dist/types/index.d.ts +261 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/file-logger.d.ts +24 -0
- package/dist/utils/file-logger.d.ts.map +1 -0
- package/dist/utils/file-logger.js +117 -0
- package/dist/utils/file-logger.js.map +1 -0
- package/dist/utils/logger.d.ts +51 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +189 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/sanitizer.d.ts +13 -0
- package/dist/utils/sanitizer.d.ts.map +1 -0
- package/dist/utils/sanitizer.js +60 -0
- package/dist/utils/sanitizer.js.map +1 -0
- package/docs/EXAMPLES.md +171 -0
- package/docs/PROFILES.md +423 -0
- package/docs/SECURITY.md +190 -0
- package/docs/TOOLS.md +366 -0
- package/manifest.json +74 -0
- package/package.json +89 -0
- package/scripts/build-exe.ps1 +37 -0
- package/scripts/manage-service.ps1 +112 -0
- package/server.json +23 -0
- package/winhelm.config.example.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,646 @@
|
|
|
1
|
+
# WinHelm — Windows Native MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://microsoft.com/windows)
|
|
5
|
+
[](https://nodejs.org/)
|
|
6
|
+
[]()
|
|
7
|
+
[](https://modelcontextprotocol.io/)
|
|
8
|
+
|
|
9
|
+
> **WinHelm MCP** — *The helm for your Windows workspace.*
|
|
10
|
+
> A lightweight, production-grade Windows Native Model Context Protocol (MCP) server featuring a built-in Single-Process Web Gateway (Streamable HTTP `/mcp` + Server-Sent Events `/sse`), Real-Time Web Monitor Dashboard, 38 System Tools with Dynamic Profile Loading, and MCP File Preview Resource.
|
|
11
|
+
|
|
12
|
+
[📖 Tools Reference](docs/TOOLS.md) • [⚙️ Tool Profiles](docs/PROFILES.md) • [🛡️ Security Architecture](docs/SECURITY.md) • [💡 Agent Examples](docs/EXAMPLES.md) • [📝 Changelog](CHANGELOG.md) • [🤝 Contributing](CONTRIBUTING.md)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Table of Contents
|
|
17
|
+
|
|
18
|
+
- [Overview](#overview)
|
|
19
|
+
- [Key Features](#key-features)
|
|
20
|
+
- [System Requirements](#system-requirements)
|
|
21
|
+
- [Architecture & Live Dashboard](#architecture--live-dashboard)
|
|
22
|
+
- [Quick Start](#quick-start)
|
|
23
|
+
- [Tool Profiles ("Load Only What You Need")](#tool-profiles-load-only-what-you-need)
|
|
24
|
+
- [Client Configuration](#client-configuration)
|
|
25
|
+
- [Claude Desktop](#1-claude-desktop-claude_desktop_configjson)
|
|
26
|
+
- [Cursor IDE](#2-cursor-ide)
|
|
27
|
+
- [ChatGPT & OpenAI MCP Tunnel](#3-chatgpt--openai-mcp-tunnel-tunnel-client)
|
|
28
|
+
- [Remote & Tailscale Connection](#4-remote--tailscale-connection)
|
|
29
|
+
- [Tools Overview (38 Tools)](#tools-overview-38-tools)
|
|
30
|
+
- [MCP Resources & Web Endpoints](#mcp-resources--web-endpoints)
|
|
31
|
+
- [Configuration & Environment Variables](#configuration--environment-variables)
|
|
32
|
+
- [Standalone Executable (`winhelm.exe`)](#standalone-executable-winhelmexe)
|
|
33
|
+
- [Documentation & Deep Dive](#documentation--deep-dive)
|
|
34
|
+
- [License](#license)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Overview
|
|
39
|
+
|
|
40
|
+
**WinHelm** bridges the gap between AI assistants (Claude, Cursor, LibreChat, ChatGPT) and the Windows operating system. Unlike generic cross-platform servers, WinHelm is built from the ground up for Windows with:
|
|
41
|
+
|
|
42
|
+
- **Zero Gateway Overhead:** Native single-process Web Gateway supporting both modern Streamable HTTP (`/mcp`) and standard Server-Sent Events (`/sse`). No external proxy (`supergateway` or reverse proxy) required.
|
|
43
|
+
- **Safety First:** Accidental deletions go to the **Windows Recycle Bin** instead of permanent destruction. Dangerous commands (`format-volume`, `rmdir /s /q c:\`) are strictly blocked by default.
|
|
44
|
+
- **First-class Windows Integrations:** NVIDIA/WMI GPU telemetry, Windows Services management, native UTF-8 PowerShell runner, and headless Microsoft Edge PDF compilation.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Key Features
|
|
49
|
+
|
|
50
|
+
1. **All-in-One Gateway & Web Monitor:**
|
|
51
|
+
- **Streamable HTTP:** `http://<HOST>:8788/mcp` (Modern MCP standard)
|
|
52
|
+
- **SSE Stream & POST:** `http://<HOST>:8788/sse` and `/message`
|
|
53
|
+
- **Web Monitor Dashboard:** `http://<HOST>:8788/` (Interactive metrics, sessions, drives, memory, GPU, and live audit logs)
|
|
54
|
+
- **Interactive File Viewer:** `http://<HOST>:8788/preview?path=...` (Rich Markdown & code viewer with syntax formatting)
|
|
55
|
+
- **Health Check:** `http://<HOST>:8788/health`
|
|
56
|
+
2. **High-Observability Logging & Secret Masking:**
|
|
57
|
+
- Microsecond execution timings with ANSI color-coded tags (`[HTTP]`, `[TOOL-START]`, `[TOOL-DONE]`, `[SECURITY]`).
|
|
58
|
+
- Automatically sanitizes Bearer tokens, API keys (`sk-***`, `ghp_***`), AWS credentials (`AKIA***`), JSON properties (`"authToken"`, `"password"`, `"x-api-key"`), and sensitive arguments before printing or writing logs.
|
|
59
|
+
3. **Background Daemon Task Engine:**
|
|
60
|
+
- Execute long-running dev servers (`npm run dev`, `docker compose up`) as background tasks with detached PIDs, non-blocking logs streaming, and interactive stdin support.
|
|
61
|
+
4. **High-Performance Code Search (Ripgrep):**
|
|
62
|
+
- Integrates `ripgrep` (`rg.exe`) for fast regex search with streaming pagination (`page`, `pageSize`, `hasMore`) to prevent context window overflow.
|
|
63
|
+
5. **Headless PDF Generation:**
|
|
64
|
+
- Converts Markdown and HTML into clean PDF documents using pre-installed Microsoft Edge or Chrome without requiring heavy dependencies like Puppeteer.
|
|
65
|
+
6. **Tailscale & Remote Ready:**
|
|
66
|
+
- Optionally bind to `0.0.0.0` or your Tailscale IP (`100.x.y.z`) for cross-device access. Default is `127.0.0.1` (loopback-only). Non-loopback binding requires Bearer Token verification and is guarded by a startup safety gate.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## System Requirements
|
|
71
|
+
|
|
72
|
+
| Component | Minimum Requirement | Recommended | Notes |
|
|
73
|
+
| :--- | :--- | :--- | :--- |
|
|
74
|
+
| **Operating System** | Windows 10 / 11 / Server 2019+ | Windows 11 (64-bit) | Native Win32 & PowerShell APIs |
|
|
75
|
+
| **Node.js** | Node.js >= 20.0.0 | Node.js 20+ LTS | Not required if using `dist/winhelm.exe` |
|
|
76
|
+
| **PowerShell** | Windows PowerShell 5.1 | PowerShell 7+ (pwsh) | Auto-detects pwsh with UTF-8 encoding |
|
|
77
|
+
| **PDF Engine** | Microsoft Edge | Pre-installed on Win 10/11 | Google Chrome is also auto-detected |
|
|
78
|
+
| **Search Engine** | Built-in recursive search | `ripgrep` (`rg.exe`) | Install via `winget install BurntSushi.ripgrep.MSVC` |
|
|
79
|
+
| **Privileges** | Standard User | Standard User | Administrator is only needed for `service:install` |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Architecture & Dashboard
|
|
84
|
+
|
|
85
|
+
### System Architecture
|
|
86
|
+
|
|
87
|
+
```mermaid
|
|
88
|
+
flowchart TD
|
|
89
|
+
Client["AI Client (Claude / Cursor / Remote)"]
|
|
90
|
+
|
|
91
|
+
subgraph WinHelm["WinHelm Server (Port 8788)"]
|
|
92
|
+
subgraph Gateway["Single-Process Unified Gateway"]
|
|
93
|
+
MCP_HTTP["Streamable HTTP (/mcp)"]
|
|
94
|
+
MCP_SSE["SSE Gateway (/sse, /message)"]
|
|
95
|
+
Dashboard["Web Monitor (/ & /dashboard)"]
|
|
96
|
+
PreviewUI["File Preview (/preview)"]
|
|
97
|
+
Health["Health & Audit Export (/health, /api/monitor/*)"]
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
subgraph Security["Security & Governance"]
|
|
101
|
+
AuthGuard["Bearer Token Authentication"]
|
|
102
|
+
RateLimit["Rate Limiter (120 req/min)"]
|
|
103
|
+
PathGuard["Allowed Directories Guard"]
|
|
104
|
+
CmdGuard["Blocked Commands Guard"]
|
|
105
|
+
Sanitizer["Secret Masking (API Keys / Passwords)"]
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
subgraph Engines["Core Engine Layer"]
|
|
109
|
+
PSEngine["PowerShell UTF-8 Runner"]
|
|
110
|
+
TaskEngine["Background Daemon Task Engine"]
|
|
111
|
+
FSEngine["Filesystem & Safe Delete (Recycle Bin)"]
|
|
112
|
+
SearchEngine["Ripgrep Streaming Engine"]
|
|
113
|
+
PDFEngine["Edge / Chrome Headless PDF Engine"]
|
|
114
|
+
SysEngine["System, GPU & Windows Services Inspector"]
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
subgraph Windows["Windows Operating System"]
|
|
119
|
+
Win32["Win32 Shell / Recycle Bin"]
|
|
120
|
+
PowerShell["PowerShell CLI / Tasks"]
|
|
121
|
+
WMI_NVIDIA["WMI & nvidia-smi Telemetry"]
|
|
122
|
+
SCM["Windows Service Control Manager"]
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
Client <--> Gateway
|
|
126
|
+
Gateway --> Security
|
|
127
|
+
Security --> Engines
|
|
128
|
+
Engines <--> Windows
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Web Monitor & Live Dashboard
|
|
132
|
+
|
|
133
|
+
Access the built-in real-time dashboard in your browser at `http://localhost:8788/`:
|
|
134
|
+
|
|
135
|
+

|
|
136
|
+
|
|
137
|
+
#### Live Task Execution & Telemetry Streaming
|
|
138
|
+
|
|
139
|
+

|
|
140
|
+
|
|
141
|
+
#### Interactive File & Markdown Preview (`preview://file`)
|
|
142
|
+
|
|
143
|
+
Access syntax-highlighted code and rendered Markdown directly at `http://localhost:8788/preview?path=<filepath>`:
|
|
144
|
+
|
|
145
|
+

|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Quick Start
|
|
150
|
+
|
|
151
|
+
### 1. Installation & Setup
|
|
152
|
+
|
|
153
|
+
#### Option A: Standalone Executable (Recommended for Production)
|
|
154
|
+
Download the portable zero-dependency `winhelm.exe` from [GitHub Releases](https://github.com/dhammawatthumpra-coder/winhelm-mcp/releases) or compile locally with `npm run build:exe`. Requires no Node.js runtime on Windows 10/11.
|
|
155
|
+
|
|
156
|
+
#### Option B: NPM CLI (Convenient for Dev & Testing)
|
|
157
|
+
```powershell
|
|
158
|
+
# Install globally
|
|
159
|
+
npm install -g winhelm-mcp
|
|
160
|
+
|
|
161
|
+
# Run immediately
|
|
162
|
+
winhelm --profile dev
|
|
163
|
+
|
|
164
|
+
# Or run on-demand with npx (no global install required)
|
|
165
|
+
npx winhelm-mcp --profile dev
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
#### Option C: Clone & Build from Source
|
|
169
|
+
```powershell
|
|
170
|
+
git clone https://github.com/dhammawatthumpra-coder/winhelm-mcp.git
|
|
171
|
+
cd winhelm-mcp
|
|
172
|
+
npm install
|
|
173
|
+
npm run build
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### 2. Start the Server
|
|
177
|
+
|
|
178
|
+
```powershell
|
|
179
|
+
# Start standard server on port 8788 (full profile)
|
|
180
|
+
npm start
|
|
181
|
+
|
|
182
|
+
# Or start with a lightweight profile for coding agents (dev) or small models (minimal)
|
|
183
|
+
node dist/index.js --profile dev
|
|
184
|
+
|
|
185
|
+
# Or customize port and bearer token via CLI flags
|
|
186
|
+
node dist/index.js --port 8788 --auth my-secret-token
|
|
187
|
+
|
|
188
|
+
# Or run in Read-Only mode (disallows file edits, deletions, and killing processes)
|
|
189
|
+
node dist/index.js --read-only
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 3. Verify Health Check
|
|
193
|
+
|
|
194
|
+
Visit `http://localhost:8788/health` in your browser. You should receive:
|
|
195
|
+
```json
|
|
196
|
+
{
|
|
197
|
+
"status": "ok",
|
|
198
|
+
"server": "winhelm-mcp",
|
|
199
|
+
"version": "1.1.0",
|
|
200
|
+
"activeSessions": {
|
|
201
|
+
"sse": 0,
|
|
202
|
+
"streamableHttp": 0
|
|
203
|
+
},
|
|
204
|
+
"uptimeSeconds": 12,
|
|
205
|
+
"timestamp": "2026-09-28T08:00:00.000Z"
|
|
206
|
+
}
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Tool Profiles ("Load Only What You Need")
|
|
212
|
+
|
|
213
|
+
AI coding assistants perform much better when their context window isn't bloated with dozens of unneeded tool schemas. WinHelm implements a **Dynamic Profile System** so your agent sees only the tools it actually needs:
|
|
214
|
+
|
|
215
|
+
```powershell
|
|
216
|
+
# 1. Minimal Profile: 6 essential tools for small models (Haiku, Llama 8B, local LLMs)
|
|
217
|
+
winhelm --profile minimal
|
|
218
|
+
|
|
219
|
+
# 2. Core Profile: 15 essential tools (terminal, file read/write/edit/search/hash, process list, telemetry)
|
|
220
|
+
winhelm --profile core
|
|
221
|
+
|
|
222
|
+
# 3. Developer Profile: 28 tools (Core + background tasks, ripgrep, zip archives, HTTP requests, PDF reports, system open & file preview)
|
|
223
|
+
winhelm --profile dev
|
|
224
|
+
|
|
225
|
+
# 4. SysAdmin Profile: 37 tools (All Core + tasks, ripgrep, archives, services, event logs, network, process kill, desktop automation & preview — all except pdf_generate)
|
|
226
|
+
winhelm --profile sysadmin
|
|
227
|
+
|
|
228
|
+
# 5. Full Suite: All 38 tools + interactive preview resource (default)
|
|
229
|
+
winhelm --profile full
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Profile Inclusions
|
|
233
|
+
|
|
234
|
+
| Profile | Active Tools | Key Inclusions | Context Window Savings |
|
|
235
|
+
| :--- | :---: | :--- | :--- |
|
|
236
|
+
| **`minimal`** | **6** | `terminal_run`, `file_read`, `file_write`, `file_list`, `file_search`, `system_info` | 🟢 **~85% token reduction** |
|
|
237
|
+
| **`core`** | **15** | `terminal_run`, `file_read`, `file_write`, `file_edit`, `file_list`, `file_search`, `file_copy`, `file_move`, `file_tail`, `file_hash`, `file_delete_safe`, `system_info`, `gpu_info`, `process_list`, `port_check` | 🟢 **~60% token reduction** |
|
|
238
|
+
| **`dev`** | **28** | All Core + `terminal_task_*` (5 tasks), `file_search_ripgrep`, `archive_zip/unzip`, `http_ping/request`, `pdf_generate`, `system_open`, `preview://file` | 🟡 **~30% token reduction** |
|
|
239
|
+
| **`sysadmin`** | **37** | All tools except `pdf_generate`: Core + tasks, ripgrep, archives, services, event logs, network, process kill, desktop actions & preview | 🟠 Full Windows ops toolkit |
|
|
240
|
+
| **`full`** | **38** | All 38 tools + interactive HTML preview resource (default when omitted) | 🔵 Complete Windows control |
|
|
241
|
+
|
|
242
|
+
### Token Economics & Model Optimization
|
|
243
|
+
|
|
244
|
+
| Profile | Tools | Approx Context Tokens | Token Savings | Recommended Target Models & Use Cases |
|
|
245
|
+
| :--- | :---: | :---: | :---: | :--- |
|
|
246
|
+
| **`minimal`** | **6** | **~1,500** | 🟢 **−85%** | **Claude 3.5 Haiku, Llama 3 8B, local LLMs** or token-constrained pipelines |
|
|
247
|
+
| **`core`** | **15** | **~4,000** | 🟢 **−60%** | Everyday coding & file operations without background processes |
|
|
248
|
+
| **`dev`** | **28** | **~6,800** | 🟡 **−32%** | **Claude 3.7 Sonnet, GPT-4o, Cursor** full-stack software development |
|
|
249
|
+
| **`sysadmin`** | **37** | **~9,200** | 🟠 **−8%** | Headless server management, Windows DevOps, diagnostics & audit |
|
|
250
|
+
| **`full`** | **38** | **~10,000** | 🔵 **Baseline** | Complete Windows native desktop suite with PDF & HTML visual previews |
|
|
251
|
+
|
|
252
|
+
> **Pro Tip:** In `claude_desktop_config.json`, pass `["--profile", "dev"]` under `args` for software development, or `["--profile", "minimal"]` for Claude Haiku!
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Client Configuration
|
|
257
|
+
|
|
258
|
+
### 1. Claude Desktop (`claude_desktop_config.json`)
|
|
259
|
+
|
|
260
|
+
Path: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
261
|
+
|
|
262
|
+
#### Option A: Remote / Local SSE Gateway (Recommended)
|
|
263
|
+
```json
|
|
264
|
+
{
|
|
265
|
+
"mcpServers": {
|
|
266
|
+
"winhelm": {
|
|
267
|
+
"url": "http://127.0.0.1:8788/sse",
|
|
268
|
+
"headers": {
|
|
269
|
+
"Authorization": "Bearer my-secret-token"
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
#### Option B: Direct Stdio / Node Process (Lightweight with Profile)
|
|
277
|
+
```json
|
|
278
|
+
{
|
|
279
|
+
"mcpServers": {
|
|
280
|
+
"winhelm": {
|
|
281
|
+
"command": "node",
|
|
282
|
+
"args": ["<PATH_TO_WINHELM>/dist/index.js", "--stdio", "--profile", "dev"],
|
|
283
|
+
"env": {
|
|
284
|
+
"MCP_ALLOWED_DIRECTORIES": "D:\\mcp,C:\\Projects"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
> **Context Optimization:** Supplying `"--profile", "dev"` restricts tools to 28 developer essentials, saving ~32% context tokens while preserving all coding, ripgrep, background task, PDF, archive, and preview capabilities.
|
|
291
|
+
|
|
292
|
+
#### Option C: Standalone Executable (`winhelm.exe`)
|
|
293
|
+
```json
|
|
294
|
+
{
|
|
295
|
+
"mcpServers": {
|
|
296
|
+
"winhelm": {
|
|
297
|
+
"command": "<PATH_TO_WINHELM>\\dist\\winhelm.exe",
|
|
298
|
+
"args": ["--stdio", "--profile", "dev"]
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
#### Option D: Per-Project Dedicated Config File (Isolated Profiles & Roots)
|
|
305
|
+
```json
|
|
306
|
+
{
|
|
307
|
+
"mcpServers": {
|
|
308
|
+
"winhelm-project-a": {
|
|
309
|
+
"command": "winhelm",
|
|
310
|
+
"args": ["--stdio", "--config", "D:\\mcp\\configs\\project-a.json"]
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
> **Multi-Instance Isolation:** Each project config file maintains its own isolated `allowedDirectories`, `profile`, and security rules without modifying the shared default `winhelm.config.json`. CLI overrides are session-only (`--no-persist` by default) to prevent instances from colliding.
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
### 2. Cursor IDE
|
|
320
|
+
|
|
321
|
+
In Cursor Settings (`Settings` -> `Features` -> `MCP` -> `Add new MCP server`):
|
|
322
|
+
|
|
323
|
+
- **Name:** `winhelm`
|
|
324
|
+
- **Type:** `sse`
|
|
325
|
+
- **URL:** `http://127.0.0.1:8788/sse`
|
|
326
|
+
|
|
327
|
+
*(If authentication is configured, add `"Authorization": "Bearer <YOUR_TOKEN>"` to the headers section).*
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
### 3. ChatGPT & OpenAI MCP Tunnel (`tunnel-client`)
|
|
332
|
+
|
|
333
|
+
WinHelm integrates seamlessly with OpenAI's official `tunnel-client` daemon, allowing ChatGPT to execute Windows commands, inspect files, and manage background tasks directly over a secure Cloudflare Tunnel:
|
|
334
|
+
|
|
335
|
+
#### Profile Configuration (`winhelm-mcp.yaml`)
|
|
336
|
+
```yaml
|
|
337
|
+
config_version: 1
|
|
338
|
+
|
|
339
|
+
control_plane:
|
|
340
|
+
base_url: "https://api.openai.com"
|
|
341
|
+
tunnel_id: "your-tunnel-id-here"
|
|
342
|
+
api_key: "env:CONTROL_PLANE_API_KEY"
|
|
343
|
+
|
|
344
|
+
health:
|
|
345
|
+
listen_addr: "127.0.0.1:18026"
|
|
346
|
+
|
|
347
|
+
admin_ui:
|
|
348
|
+
open_browser: false
|
|
349
|
+
|
|
350
|
+
log:
|
|
351
|
+
level: info
|
|
352
|
+
format: json
|
|
353
|
+
|
|
354
|
+
mcp:
|
|
355
|
+
commands:
|
|
356
|
+
# Direct stdio connection with dev profile (~32% token savings for ChatGPT)
|
|
357
|
+
- channel: main
|
|
358
|
+
command: 'node D:/mcp/winhelm-mcp/dist/index.js --stdio --profile dev'
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
#### Running the Tunnel
|
|
362
|
+
```powershell
|
|
363
|
+
.\tunnel-client.exe run --profile-file winhelm-mcp.yaml
|
|
364
|
+
```
|
|
365
|
+
> **Purity Guard:** In `--stdio` mode, WinHelm routes all operational logs to `stderr`, leaving `stdout` purely for JSON-RPC messages to guarantee zero parsing errors on ChatGPT.
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
### 4. Remote & Tailscale Connection
|
|
370
|
+
|
|
371
|
+
WinHelm binds by default to `127.0.0.1` (localhost only). To allow secure cross-device access over private networks like Tailscale or WireGuard, bind to `0.0.0.0` or your Tailscale IP:
|
|
372
|
+
|
|
373
|
+
1. Retrieve your machine's Tailscale IP (e.g. `100.80.20.10`) or Tailscale Funnel domain (e.g. `https://your-node.ts.net`).
|
|
374
|
+
2. Start WinHelm with `--host 0.0.0.0` and a strong authentication token:
|
|
375
|
+
```powershell
|
|
376
|
+
node dist/index.js --port 8788 --host 0.0.0.0 --auth super-secure-token-here
|
|
377
|
+
```
|
|
378
|
+
> ⚠️ **Host Safety Gate:** Binding to `--host 0.0.0.0` exposes the server to your local network and Tailscale. You **must** supply an authentication token (`--auth`), otherwise startup will be rejected with exit code 1 by the host safety gate.
|
|
379
|
+
3. Connect your mobile or remote Claude / Cursor / ChatGPT client:
|
|
380
|
+
- **Streamable HTTP:** `http://100.80.20.10:8788/mcp`
|
|
381
|
+
- **SSE Stream:** `http://100.80.20.10:8788/sse`
|
|
382
|
+
- **Web Monitor Dashboard:** `http://100.80.20.10:8788/?token=super-secure-token-here` (or Tailscale Funnel URL)
|
|
383
|
+
- **Header:** `Authorization: Bearer super-secure-token-here`
|
|
384
|
+
|
|
385
|
+
#### Claude.ai Custom Connectors (URL Query Token)
|
|
386
|
+
|
|
387
|
+
Claude.ai Custom Connectors and certain web/mobile clients do not provide a UI field to enter custom HTTP headers (such as `Authorization: Bearer <token>`). WinHelm natively supports passing the authentication token directly via the URL query parameter:
|
|
388
|
+
|
|
389
|
+
- **Server URL:** `https://<your-tailnet-domain>.ts.net/mcp?token=<YOUR_AUTH_TOKEN>`
|
|
390
|
+
- **Authentication:** Select **`No sign-in`**
|
|
391
|
+
- **Transport (under Advanced):** Streamable HTTP (Default)
|
|
392
|
+
|
|
393
|
+
> 🔒 **Security Guarantee:** Passing the token in the URL query parameter still triggers full timing-safe cryptographic verification on the server, ensuring your Windows machine remains completely protected from unauthorized internet access without needing a complex OAuth setup.
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Tools Overview (38 Tools)
|
|
398
|
+
|
|
399
|
+
WinHelm provides 38 focused Windows native tools grouped across 6 functional categories. Each tool is loaded dynamically based on your active `--profile`:
|
|
400
|
+
|
|
401
|
+
| Category | Tools | In Profiles | Summary |
|
|
402
|
+
| :--- | :---: | :--- | :--- |
|
|
403
|
+
| **Terminal & Background Tasks** | 6 | `minimal` (run only), `core` (run only), `dev`, `sysadmin`, `full` | Synchronous PowerShell runner and detached daemon processes with live logs & stdin. |
|
|
404
|
+
| **Filesystem, Safe Delete & Archives** | 12 | `minimal` (read, write, list, search), `core` (10 tools), `dev` (all 12), `sysadmin` (all 12), `full` (all 12) | Surgical file edits, streaming tails, SHA-256 hashes, .NET zip archives, and **Recycle Bin safe delete**. |
|
|
405
|
+
| **Codebase Search, PDF & Preview** | 3 | `dev` (all 3), `sysadmin` (search & preview), `full` (all 3) | Streaming paginated `ripgrep` regex search (`query` parameter), headless Chromium PDF printer, and web previewer. |
|
|
406
|
+
| **Desktop, Clipboard & Toast** | 5 | `dev` (`system_open`), `sysadmin` (all 5), `full` (all 5) | Windows clipboard read/write, primary screen capture, system app launcher (`system_open`), and native Toast notifications. |
|
|
407
|
+
| **System, Processes & Services** | 9 | `minimal` (`system_info`), `core` (info, gpu, procs, port), `sysadmin` (all 9), `full` (all 9) | CPU/RAM/Drive telemetry, NVIDIA GPU stats, process list/kill, port inspector, event logs, and service control. |
|
|
408
|
+
| **Network & Connectivity** | 3 | `dev` (ping, req), `sysadmin` (all 3), `full` (all 3) | HTTP latency probe, full REST client (`http_request`), and local/Tailscale adapter inspector. |
|
|
409
|
+
|
|
410
|
+
📖 **See [docs/TOOLS.md](docs/TOOLS.md) for full parameter specifications, types, returns, and schemas.**
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## MCP Resources & Web Endpoints
|
|
415
|
+
|
|
416
|
+
### MCP Resources
|
|
417
|
+
|
|
418
|
+
WinHelm exposes 1 dedicated Model Context Protocol resource:
|
|
419
|
+
|
|
420
|
+
| URI | MIME Type | Description |
|
|
421
|
+
| :--- | :--- | :--- |
|
|
422
|
+
| `preview://file` | `text/html;profile=mcp-app` | Dynamically renders rich HTML preview for Markdown and source code files with line numbers and syntax highlighting. |
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
### Gateway Web Endpoints
|
|
427
|
+
|
|
428
|
+
WinHelm hosts a full web application on a single port (default: `8788`):
|
|
429
|
+
|
|
430
|
+
- **`/` & `/dashboard`** — Real-time Web Monitor Dashboard (CPU, RAM, GPU, sessions, requests, live logs).
|
|
431
|
+
- **`/mcp`** — Streamable HTTP transport endpoint.
|
|
432
|
+
- **`/sse`** — Server-Sent Events transport endpoint for clients like Claude Desktop and Cursor.
|
|
433
|
+
- **`/message`** — POST endpoint for incoming JSON-RPC messages in SSE mode.
|
|
434
|
+
- **`/preview`** — Interactive browser file viewer (`/preview?path=D:\project\README.md`).
|
|
435
|
+
- **`/health`** — JSON health status and server uptime probe.
|
|
436
|
+
- **`/api/monitor/stats`** — JSON hardware and session statistics.
|
|
437
|
+
- **`/api/monitor/export?format=json|csv`** — Audit log export for security compliance.
|
|
438
|
+
|
|
439
|
+
> 💡 **Browser Dashboard Access with Authentication:**
|
|
440
|
+
> When authentication is enabled (`--auth <token>` or `authToken`), accessing the Web Monitor Dashboard or Previewer via your browser requires passing the token once in the URL:
|
|
441
|
+
> - **Dashboard:** `http://<HOST>:8788/?token=<YOUR_AUTH_TOKEN>` (or `https://<your-tailnet-domain>.ts.net/?token=<YOUR_AUTH_TOKEN>`)
|
|
442
|
+
> - **File Preview:** `http://<HOST>:8788/preview?path=D:\project\README.md&token=<YOUR_AUTH_TOKEN>`
|
|
443
|
+
> WinHelm validates the token, displays live metrics and real-time logs, and sets a secure `HttpOnly` session cookie so subsequent dashboard navigation stays authenticated without re-entering the token.
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## Configuration & Environment Variables
|
|
448
|
+
|
|
449
|
+
WinHelm loads configuration in the following order of precedence:
|
|
450
|
+
1. CLI Flags
|
|
451
|
+
2. Environment Variables
|
|
452
|
+
3. `winhelm.config.json`
|
|
453
|
+
4. Default settings
|
|
454
|
+
|
|
455
|
+
### Reference Table
|
|
456
|
+
|
|
457
|
+
| CLI Flag | Environment Variable | Default | Description |
|
|
458
|
+
| :--- | :--- | :--- | :--- |
|
|
459
|
+
| `--config <path>` | *N/A* | *auto* | Load configuration from a specific JSON file (for per-project multi-agent isolation). |
|
|
460
|
+
| `--stdio` | *N/A* | `false` | Run in standard I/O mode for local MCP clients (OpenAI tunnel-client, Claude, Cursor). |
|
|
461
|
+
| `--profile, -p <name>` | `WINHELM_PROFILE` | `full` | Tool profile to load: `minimal` (6), `core` (15), `dev` (28), `sysadmin` (37), or `full` (38). |
|
|
462
|
+
| `--tools <list>` | *N/A* | *auto* | Explicit comma-separated tools to load or `+tool`/`-tool` modifiers. |
|
|
463
|
+
| `--transport <type>` | `WINHELM_TRANSPORT` | `http` | Transport mode: `http` (Web Gateway + SSE) or `stdio`. |
|
|
464
|
+
| `--port <number>` | `PORT` | `8788` | Port number for the Web Gateway and MCP server. |
|
|
465
|
+
| `--host <string>` | `HOST` | `127.0.0.1` | Network interface to bind (`127.0.0.1` loopback default, `0.0.0.0` for LAN/Tailscale). |
|
|
466
|
+
| `--auth <token>` | `MCP_AUTH_TOKEN` | *none* | Bearer token for authentication. Rejects unauthenticated requests with HTTP 401. |
|
|
467
|
+
| `--read-only` | `MCP_READ_ONLY` | `false` | Enables read-only mode (strictly blocks file writing, shell execution, process killing, service modification, and mutating HTTP requests). |
|
|
468
|
+
| `--allowed-dirs <list>`| `MCP_ALLOWED_DIRECTORIES` | `[]` *(block all)* | Comma-separated directory paths permitted for file access (e.g. `"D:\mcp,C:\Workspace"`). Empty = block all filesystem operations (fail-closed). |
|
|
469
|
+
| `--no-persist` | *N/A* | `true` | Keep CLI overrides session-only without writing to `winhelm.config.json` (default behavior / explicit no-op). |
|
|
470
|
+
| `--persist` | *N/A* | `false` | Persist CLI overrides back to the active configuration file. |
|
|
471
|
+
| *N/A* | `MCP_BLOCKED_COMMANDS` | *(see below)* | Additional comma-separated commands to block from execution. |
|
|
472
|
+
| *N/A* | `MCP_ALLOWED_HOSTS` | `localhost,127.0.0.1,*.ts.net` | Comma-separated allowed hostnames for Host header validation (DNS Rebinding protection). |
|
|
473
|
+
|
|
474
|
+
### `winhelm.config.json`
|
|
475
|
+
|
|
476
|
+
Create or modify `winhelm.config.json` in your project root or `%USERPROFILE%\.winhelm\config.json`:
|
|
477
|
+
|
|
478
|
+
```json
|
|
479
|
+
{
|
|
480
|
+
"blockedCommands": [
|
|
481
|
+
"format-volume",
|
|
482
|
+
"format-disk",
|
|
483
|
+
"clear-disk",
|
|
484
|
+
"stop-computer",
|
|
485
|
+
"restart-computer",
|
|
486
|
+
"rmdir /s /q c:\\",
|
|
487
|
+
"del /f /s /q c:\\"
|
|
488
|
+
],
|
|
489
|
+
"allowedDirectories": ["D:\\mcp", "C:\\Workspace"],
|
|
490
|
+
"allowSystemExecution": true,
|
|
491
|
+
"profile": "dev",
|
|
492
|
+
"fileReadLineLimit": 2000,
|
|
493
|
+
"defaultTimeoutMs": 60000,
|
|
494
|
+
"telemetryEnabled": false,
|
|
495
|
+
"authToken": null,
|
|
496
|
+
"readOnly": false,
|
|
497
|
+
"rateLimitWindowMs": 60000,
|
|
498
|
+
"rateLimitMaxRequests": 120
|
|
499
|
+
}
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
> **Security Boundaries vs. Defense-in-Depth:**
|
|
503
|
+
> - **True Security Boundaries:** **Authentication Token (`authToken`)**, **Tool Profiles (`minimal`, `core`)**, and **Read-Only Mode (`readOnly`)**. For untrusted or public environments, configure an `authToken` and use `--profile core` to exclude terminal execution completely.
|
|
504
|
+
> - **Defense-in-Depth:** The command blocklist protects against accidental destructive commands (`format-volume`, `rmdir /s /q c:\`), but is not an impenetrable sandbox. `allowedDirectories` strictly bounds native File Tools (`file_read`, `file_write`, `create_zip`, etc.) and default CWD.
|
|
505
|
+
> - **DNS Rebinding Defense:** WinHelm validates `Host` headers against an allowlist (`localhost`, `127.0.0.1`, `[::1]`, `*.ts.net`). Requests from unauthorized hostnames are rejected with **HTTP 403 Forbidden**.
|
|
506
|
+
> - **Remote Tunnel Fail-Closed Gate:** Requests arriving through a reverse proxy or tunnel without an `authToken` configured are rejected immediately with **HTTP 403 Forbidden**.
|
|
507
|
+
> - **Fail-Closed Filesystem:** `allowedDirectories: []` blocks all filesystem operations by default. Specify target paths (e.g. `["D:\\mcp", "C:\\Workspace"]`). Wildcard `["*"]` is strictly discouraged for unauthenticated or public network exposures.
|
|
508
|
+
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
## Windows Background Service (Always-On Daemon)
|
|
512
|
+
|
|
513
|
+
WinHelm includes a built-in service manager using Windows Task Scheduler to run reliably in the background across system reboots:
|
|
514
|
+
|
|
515
|
+
```powershell
|
|
516
|
+
# Install as a persistent Windows Service (Run PowerShell as Administrator)
|
|
517
|
+
npm run service:install
|
|
518
|
+
|
|
519
|
+
# Check service status
|
|
520
|
+
npm run service:status
|
|
521
|
+
|
|
522
|
+
# Stop / Start the service
|
|
523
|
+
npm run service:stop
|
|
524
|
+
npm run service:start
|
|
525
|
+
|
|
526
|
+
# Uninstall the service
|
|
527
|
+
npm run service:uninstall
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
---
|
|
531
|
+
|
|
532
|
+
## Standalone Single-File Executable (`winhelm.exe`)
|
|
533
|
+
|
|
534
|
+
You can compile WinHelm into a standalone `.exe` (~2.6 MB) that requires **no Node.js installation** on target machines:
|
|
535
|
+
|
|
536
|
+
```powershell
|
|
537
|
+
npm run build:exe
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
The resulting executable will be generated at `dist/winhelm.exe`:
|
|
541
|
+
|
|
542
|
+
```powershell
|
|
543
|
+
# Run standalone executable with custom port
|
|
544
|
+
.\dist\winhelm.exe --port 9000 --auth my-token
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## Security, Rate Limiting & Auditing
|
|
550
|
+
|
|
551
|
+
1. **Automatic Secret Redaction:**
|
|
552
|
+
- Automatically sanitizes sensitive keys (`sk-...`, `ghp_...`, `Bearer ********`, and password values) from terminal output, dashboard UI, and log files.
|
|
553
|
+
2. **Built-in Rate Limiting (Sliding Window):**
|
|
554
|
+
- Enforces a sliding window ceiling of 120 requests per minute per IP address, preventing runaway client loops.
|
|
555
|
+
3. **Auditing & Log Rotation:**
|
|
556
|
+
- Logs are stored in `logs/winhelm-YYYY-MM-DD.log` (capped at 10 MB per file, auto-pruning logs older than 7 days).
|
|
557
|
+
- Export audit logs anytime via browser or API:
|
|
558
|
+
- `http://localhost:8788/api/monitor/export?format=json`
|
|
559
|
+
- `http://localhost:8788/api/monitor/export?format=csv`
|
|
560
|
+
4. **Fail-Closed Filesystem Confinement:**
|
|
561
|
+
- `allowedDirectories: []` blocks all filesystem operations by default for safety.
|
|
562
|
+
- Symlinks and NTFS directory junctions are resolved via `fs.realpathSync` before boundary evaluation.
|
|
563
|
+
5. **Loopback-First Network Binding:**
|
|
564
|
+
- Default host is `127.0.0.1` (loopback only).
|
|
565
|
+
- Non-loopback binding (such as `0.0.0.0`) without `--auth` is blocked at startup with exit code 1.
|
|
566
|
+
- Bearer tokens are compared using `crypto.timingSafeEqual` with buffer length validation to prevent timing side-channels.
|
|
567
|
+
|
|
568
|
+
---
|
|
569
|
+
|
|
570
|
+
## Troubleshooting
|
|
571
|
+
|
|
572
|
+
### 1. Port Conflict (`EADDRINUSE: address already in use :::8788`)
|
|
573
|
+
- **Cause:** Another process or previous instance is using port 8788.
|
|
574
|
+
- **Solution:** Specify a different port using `--port`:
|
|
575
|
+
```powershell
|
|
576
|
+
node dist/index.js --port 8790
|
|
577
|
+
```
|
|
578
|
+
Or check which process is holding port 8788:
|
|
579
|
+
```powershell
|
|
580
|
+
Get-NetTCPConnection -LocalPort 8788 | Select-Object OwningProcess
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### 2. HTTP 401 Unauthorized
|
|
584
|
+
- **Cause:** WinHelm was started with `--auth <token>` or `MCP_AUTH_TOKEN`, but the MCP client didn't supply matching credentials.
|
|
585
|
+
- **Solution 1 (Clients with Custom Header Support):** Add the Bearer token header to your client configuration:
|
|
586
|
+
```json
|
|
587
|
+
"headers": {
|
|
588
|
+
"Authorization": "Bearer <YOUR_TOKEN>"
|
|
589
|
+
}
|
|
590
|
+
```
|
|
591
|
+
- **Solution 2 (Claude.ai Custom Connectors without Header UI):** Append the token directly to the Server URL and select **No sign-in**:
|
|
592
|
+
```text
|
|
593
|
+
https://<your-domain>/mcp?token=<YOUR_TOKEN>
|
|
594
|
+
```
|
|
595
|
+
- **Solution 3 (Browser Dashboard & File Preview):** Append `?token=<YOUR_TOKEN>` to the URL in your browser:
|
|
596
|
+
```text
|
|
597
|
+
https://<your-domain>/?token=<YOUR_TOKEN>
|
|
598
|
+
https://<your-domain>/preview?path=...&token=<YOUR_TOKEN>
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
### 3. PowerShell Execution Policy Restriction
|
|
602
|
+
- **Cause:** Windows blocks script execution (`File cannot be loaded because running scripts is disabled on this system`).
|
|
603
|
+
- **Solution:** Run with bypass flag:
|
|
604
|
+
```powershell
|
|
605
|
+
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
### 4. Windows Service Installation Error (`Access is denied`)
|
|
609
|
+
- **Cause:** `npm run service:install` registers a task in Windows Task Scheduler, which requires elevated privileges.
|
|
610
|
+
- **Solution:** Open PowerShell as **Administrator** and re-run `npm run service:install`.
|
|
611
|
+
|
|
612
|
+
### 5. Tailscale / Remote Timeout
|
|
613
|
+
- **Cause:** Windows Defender Firewall is blocking inbound connections on port 8788.
|
|
614
|
+
- **Solution:** Allow port 8788 in Windows Firewall:
|
|
615
|
+
```powershell
|
|
616
|
+
New-NetFirewallRule -DisplayName "WinHelm MCP Gateway" -Direction Inbound -LocalPort 8788 -Protocol TCP -Action Allow
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
### 6. PDF Generation Headless Browser Not Found
|
|
620
|
+
- **Cause:** Neither Microsoft Edge nor Google Chrome could be located in default system paths.
|
|
621
|
+
- **Solution:** Ensure Microsoft Edge is installed at its standard location (`C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe`) or install Google Chrome.
|
|
622
|
+
|
|
623
|
+
### 7. Host Safety Gate Blocks Startup (`Non-loopback binding requires --auth`)
|
|
624
|
+
- **Cause:** You attempted to bind to a non-loopback address (such as `0.0.0.0`) without specifying an authentication token.
|
|
625
|
+
- **Solution:** Add `--auth <token>` or set the `MCP_AUTH_TOKEN` environment variable. This security gate prevents accidental public exposure of your host system without authentication.
|
|
626
|
+
|
|
627
|
+
---
|
|
628
|
+
|
|
629
|
+
## Documentation & Deep Dive
|
|
630
|
+
|
|
631
|
+
For in-depth guides, architectural references, and developer guidelines, explore the `docs/` folder:
|
|
632
|
+
|
|
633
|
+
- 📖 **[Comprehensive Tools Reference](docs/TOOLS.md)**: Exhaustive documentation for all 38 tools, including parameter types, options, return formats, and JSON-RPC examples.
|
|
634
|
+
- ⚙️ **[Tool Profiles & Context Optimization](docs/PROFILES.md)**: Deep dive into the 5 built-in profiles (minimal, core, dev, sysadmin, full), custom `--tools` filtering, token economics, and LLM optimization recipes.
|
|
635
|
+
- 🛡️ **[Security Model & Architecture](docs/SECURITY.md)**: Deep dive into the 5-layer security model, path confinement, regex command blacklists, and secret masking.
|
|
636
|
+
- 💡 **[Real-World Agent Examples](docs/EXAMPLES.md)**: End-to-end workflows showing how AI agents build projects, troubleshoot Windows crashes, and generate executive PDFs.
|
|
637
|
+
- 📝 **[Changelog](CHANGELOG.md)**: Release notes and version history following Keep a Changelog.
|
|
638
|
+
- 🤝 **[Contributing Guide](CONTRIBUTING.md)**: Instructions for developing, running tests, and opening Pull Requests.
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
642
|
+
## License
|
|
643
|
+
|
|
644
|
+
This project is licensed under the [MIT License](LICENSE) — see the [LICENSE](LICENSE) file for details.
|
|
645
|
+
Built cleanly from the ground up for the Windows Model Context Protocol developer community.
|
|
646
|
+
|