pip install predictive-maintenance-mcpThis installs the server and all dependencies. You can then run it directly:
predictive-maintenance-mcpNote: The PyPI package does not include sample data. Clone the repository (see below) if you need the bundled vibration signals.
- Python 3.11 or 3.12
- pip (Python package manager)
- Git
git clone https://github.com/LGDiMaggio/predictive-maintenance-mcp.git
cd predictive-maintenance-mcp# Windows
python -m venv .venv
.venv\Scripts\activate
# Linux/macOS
python -m venv .venv
source .venv/bin/activate# Install production dependencies only
pip install -e .
# OR install with development tools (for contributors)
pip install -e .[dev]uv sync # production deps
uv sync --all-extras # include dev depspython -c "import mcp; print('MCP installed successfully')"
python validate_server.py# Default: stdio transport (Claude Desktop, VS Code)
predictive-maintenance-mcp
python -m predictive_maintenance_mcp
# SSE transport for remote/enterprise clients (Copilot Studio, networked)
predictive-maintenance-mcp --transport sse --host 0.0.0.0 --port 8080
# Docker (SSE mode by default)
docker compose up -dSee DEPLOYMENT.md for HTTPS setup with Docker + Caddy auto-TLS.
Run the PowerShell script for automatic configuration:
.\setup_claude.ps1This will:
- Create virtual environment
- Install dependencies
- Configure Claude Desktop automatically
- Test the server
-
Complete steps 1-3 above
-
Edit your Claude Desktop config:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- Windows:
-
Add this configuration:
{
"mcpServers": {
"predictive-maintenance": {
"command": "C:/path/to/predictive-maintenance-mcp/.venv/Scripts/python.exe",
"args": [
"C:/path/to/predictive-maintenance-mcp/src/machinery_diagnostics_server.py"
]
}
}
}Important:
- Replace
C:/path/to/predictive-maintenance-mcpwith your actual project path- Use absolute paths for both
commandandargs- On macOS/Linux, use
.venv/bin/pythoninstead of.venv/Scripts/python.exe
- Restart Claude Desktop
pip install -e .[dev]This includes:
pytest- Testing frameworkpytest-cov- Coverage reportingblack- Code formatterflake8- Lintermypy- Type checker
# Run all tests
pytest
# Run with coverage
pytest --cov=src --cov-report=html
# Run specific test file
pytest tests/test_real_data.py -v# Format code
black src tests
# Check formatting
black --check src tests
# Lint code
flake8 src --max-line-length=120
# Type check
mypy src --ignore-missing-importspip install --upgrade mcp[cli]pip install -e .-
Use absolute paths: Both
commandandargsmust use full absolute paths{ "mcpServers": { "predictive-maintenance": { "command": "C:/full/path/to/.venv/Scripts/python.exe", "args": ["C:/full/path/to/src/machinery_diagnostics_server.py"] } } } -
Don't use
cwd: Claude Desktop may ignore it, use absolute paths instead -
Avoid
pythoncommand: Use the full path to your virtual environment's Python:- ❌
"command": "python"(won't work if not in PATH) - ✅
"command": "C:/path/.venv/Scripts/python.exe"(Windows) - ✅
"command": "/path/.venv/bin/python"(macOS/Linux)
- ❌
-
Module import: If installed via
pip install -e ., you can also use:- ✅
"args": ["-m", "predictive_maintenance_mcp"] - ✅
"args": ["C:/path/src/machinery_diagnostics_server.py"]
- ✅
-
Restart Claude Desktop completely after config changes
-
Check logs:
- Windows:
%LOCALAPPDATA%\AnthropicClaude\logs - Look for errors like "spawn python ENOENT" or "No module named"
- Windows:
# Ensure dev dependencies installed
pip install -e .[dev]
# Check Python version
python --version # Should be 3.11 or 3.12
# Run validation
python validate_server.py- Python: 3.11+
- RAM: 4 GB
- Disk: 500 MB (including sample data)
- Python: 3.12
- RAM: 8 GB (for ML model training)
- Disk: 2 GB (for reports and models)
mcp[cli]>=1.16.0- Model Context Protocol frameworknumpy>=2.3.3- Numerical computingpandas>=2.3.3- Data manipulationscipy>=1.16.2- Scientific computing (FFT, filters)scikit-learn>=1.7.2- Machine learningplotly>=5.24.0- Interactive visualizationspydantic>=2.12.0- Data validationpypdf>=4.0- PDF text extraction
Install any combination using pip extras:
# Semantic vector search (FAISS + sentence-transformers)
pip install predictive-maintenance-mcp[vector-search]
# OCR for scanned PDF manuals (Tesseract)
pip install predictive-maintenance-mcp[ocr]
# DOCX diagnostic report generation
pip install predictive-maintenance-mcp[docx]
# SSE transport for remote/enterprise deployment (Copilot Studio, networked clients)
pip install predictive-maintenance-mcp[sse]
# Everything (all optional features)
pip install predictive-maintenance-mcp[full]| Extra | Packages | Purpose |
|---|---|---|
vector-search |
faiss-cpu, sentence-transformers |
Semantic document search (FAISS). Falls back to TF-IDF when not installed. |
ocr |
pytesseract, Pillow, pdf2image |
OCR for scanned/image-based PDF manuals. Requires Poppler on system PATH. |
docx |
python-docx |
Generate structured Word (.docx) diagnostic reports. |
sse |
uvicorn |
SSE/HTTP transport for remote MCP clients. Required for --transport sse. |
full |
All of the above | Install all optional features at once. |
Note:
vector-searchpulls in PyTorch (~2 GB). For lightweight installs, skip it — TF-IDF keyword search works well for technical documentation.
pytest>=8.0.0- Testingpytest-cov>=4.1.0- Coverageblack>=24.0.0- Formattingflake8>=7.0.0- Lintingmypy>=1.8.0- Type checking
MIT License - see LICENSE file for details.
Sample vibration data: CC BY-NC-SA 4.0