Skip to content

Commit 0c34464

Browse files
LGDiMaggioclaude
andcommitted
docs: fix MCP configs and correct ML algorithm descriptions
- Replace broken direct .py script args with `-m predictive_maintenance_mcp` in both Claude Desktop and VS Code config examples (relative imports made direct script execution non-functional after R2 refactoring) - Add pip-installed variant (console script `predictive-maintenance-mcp`) as the recommended config for both clients - Add PDM_PROJECT_DIR env var to source-install configs - Fix MCP Inspector debug command (was uv run mcp dev src/...) - Correct GitHub Pages and README: replace "Isolation Forest" with "OneClassSVM & LocalOutlierFactor" (actual algorithms used) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 87025ab commit 0c34464

File tree

2 files changed

+56
-28
lines changed

2 files changed

+56
-28
lines changed

README.md

Lines changed: 54 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -222,42 +222,34 @@ Evaluate real_train/OuterRaceFault_1.csv against ISO 20816-3 standard
222222

223223
## 🚀 Installation
224224

225-
### Quick Start (Python Package)
225+
### Option A — PyPI (recommended)
226226

227227
```bash
228-
# 1. Clone repository
229-
git clone https://github.com/LGDiMaggio/predictive-maintenance-mcp.git
230-
cd predictive-maintenance-mcp
231-
232-
# 2. Run automated setup
233-
python setup_venv.py
234-
235-
# 3. Activate environment
236-
.venv\Scripts\activate # Windows
237-
source .venv/bin/activate # Linux/macOS
238-
239-
# 4. Verify installation
240-
python validate_server.py
228+
pip install predictive-maintenance-mcp
241229
```
242230

243-
📖 **Detailed Installation Guide**: See [INSTALL.md](INSTALL.md) for troubleshooting, Claude Desktop setup, and developer instructions.
231+
Then configure your MCP client (see [Configuration](#️-configuration) below) and point it to the installed server.
244232

245-
### From Source (Advanced)
233+
### Option B — From Source (development)
246234

247235
```bash
248236
git clone https://github.com/LGDiMaggio/predictive-maintenance-mcp.git
249237
cd predictive-maintenance-mcp
250238
pip install -e .
251239
```
252240

253-
### Run as Module
254-
255-
After installation, you can also run the server directly:
241+
### Run the Server
256242

257243
```bash
244+
# Via module (works with both pip install and editable install)
258245
python -m predictive_maintenance_mcp
246+
247+
# Via console script (after pip install)
248+
predictive-maintenance-mcp
259249
```
260250

251+
📖 **Detailed Installation Guide**: See [INSTALL.md](INSTALL.md) for troubleshooting and advanced setup.
252+
261253
---
262254

263255
## ⚙️ Configuration
@@ -268,41 +260,77 @@ Add to your Claude Desktop config:
268260
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
269261
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
270262

263+
**If installed via pip** (recommended):
264+
265+
```json
266+
{
267+
"mcpServers": {
268+
"predictive-maintenance": {
269+
"command": "predictive-maintenance-mcp"
270+
}
271+
}
272+
}
273+
```
274+
275+
**If running from source** (local dev):
276+
271277
```json
272278
{
273279
"mcpServers": {
274280
"predictive-maintenance": {
275281
"command": "C:/path/to/predictive-maintenance-mcp/.venv/Scripts/python.exe",
276-
"args": ["C:/path/to/predictive-maintenance-mcp/src/machinery_diagnostics_server.py"]
282+
"args": ["-m", "predictive_maintenance_mcp"],
283+
"env": {
284+
"PDM_PROJECT_DIR": "C:/path/to/predictive-maintenance-mcp"
285+
}
277286
}
278287
}
279288
}
280289
```
281290

282291
> **Important Notes**:
283292
> - Replace `C:/path/to/predictive-maintenance-mcp` with your actual project path
284-
> - Use **absolute paths** for both `command` and `args`
293+
> - Use **absolute paths** — forward slashes (`/`) work on all platforms, including Windows
285294
> - On macOS/Linux, use `.venv/bin/python` instead of `.venv/Scripts/python.exe`
286-
> - Forward slashes (`/`) work on all platforms, including Windows
295+
> - The `PDM_PROJECT_DIR` env var tells the server where to find `data/`, `models/`, and `reports/`
287296
288297
After configuration, **restart Claude Desktop** completely.
289298

290299
### VS Code
291300

292301
Add to your MCP configuration (`.vscode/mcp.json` or user settings):
293302

303+
**If installed via pip** (recommended):
304+
305+
```json
306+
{
307+
"servers": {
308+
"predictive-maintenance": {
309+
"type": "stdio",
310+
"command": "predictive-maintenance-mcp"
311+
}
312+
}
313+
}
314+
```
315+
316+
**If running from source** (local dev):
317+
294318
```json
295319
{
296320
"servers": {
297321
"predictive-maintenance": {
322+
"type": "stdio",
298323
"command": "/path/to/predictive-maintenance-mcp/.venv/bin/python",
299-
"args": ["/path/to/predictive-maintenance-mcp/src/machinery_diagnostics_server.py"]
324+
"args": ["-m", "predictive_maintenance_mcp"],
325+
"env": {
326+
"PDM_PROJECT_DIR": "/path/to/predictive-maintenance-mcp"
327+
}
300328
}
301329
}
302330
}
303331
```
304332

305-
> Adjust paths according to your system (use `.venv/Scripts/python.exe` on Windows)
333+
> Use `.venv/Scripts/python.exe` on Windows. The `PDM_PROJECT_DIR` env var tells the server where to find `data/`, `models/`, and `reports/`.
306334
307335
---
308336

@@ -663,10 +691,10 @@ Use MCP Inspector for interactive testing:
663691
npx @modelcontextprotocol/inspector npx predictive-maintenance-mcp
664692
```
665693

666-
Or from source:
694+
Or from source (with venv active):
667695

668696
```bash
669-
uv run mcp dev src/machinery_diagnostics_server.py
697+
npx @modelcontextprotocol/inspector python -m predictive_maintenance_mcp
670698
```
671699

672700
---

docs/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ <h3>ISO 20816-3 Assessment</h3>
760760
<div class="feature-card reveal">
761761
<div class="feature-icon amber">🤖</div>
762762
<h3>ML Anomaly Detection</h3>
763-
<p>Train on healthy baselines, predict anomalies in new signals. Isolation Forest with automatic feature extraction.</p>
763+
<p>Train on healthy baselines, detect anomalies in new signals. OneClassSVM &amp; LocalOutlierFactor with automatic feature extraction.</p>
764764
</div>
765765
<div class="feature-card reveal">
766766
<div class="feature-icon green">📄</div>
@@ -934,7 +934,7 @@ <h3>SciPy + NumPy</h3>
934934
<div class="tech-card">
935935
<div class="tech-icon">🧠</div>
936936
<h3>scikit-learn</h3>
937-
<p>ML anomaly detection with Isolation Forest, feature extraction on healthy baselines.</p>
937+
<p>ML anomaly detection with OneClassSVM &amp; LocalOutlierFactor, feature extraction on healthy baselines.</p>
938938
</div>
939939
</div>
940940
</div>

0 commit comments

Comments
 (0)