mcp-plesk-dev-docs 0.4.2__tar.gz
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.
- mcp_plesk_dev_docs-0.4.2/LICENSE +21 -0
- mcp_plesk_dev_docs-0.4.2/NOTICE +0 -0
- mcp_plesk_dev_docs-0.4.2/PKG-INFO +221 -0
- mcp_plesk_dev_docs-0.4.2/README.md +173 -0
- mcp_plesk_dev_docs-0.4.2/mcp_plesk_dev_docs.egg-info/PKG-INFO +221 -0
- mcp_plesk_dev_docs-0.4.2/mcp_plesk_dev_docs.egg-info/SOURCES.txt +54 -0
- mcp_plesk_dev_docs-0.4.2/mcp_plesk_dev_docs.egg-info/dependency_links.txt +1 -0
- mcp_plesk_dev_docs-0.4.2/mcp_plesk_dev_docs.egg-info/entry_points.txt +2 -0
- mcp_plesk_dev_docs-0.4.2/mcp_plesk_dev_docs.egg-info/requires.txt +25 -0
- mcp_plesk_dev_docs-0.4.2/mcp_plesk_dev_docs.egg-info/top_level.txt +1 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/__init__.py +3 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/ai_client.py +257 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/benchmark_engines.py +330 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/benchmark_gates.py +254 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/benchmark_reporting.py +107 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/benchmark_runner.py +433 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/benchmark_suites.py +30 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/chunking.py +360 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/error_handling.py +112 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/html_utils.py +217 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/indexing.py +53 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/io_utils.py +287 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/log_handler.py +209 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/model_config.py +218 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/platform_utils.py +214 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/settings.py +93 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/summary_cache.py +55 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/tq_index.py +85 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/turboquant/__init__.py +21 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/turboquant/compressors.py +190 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/turboquant/lloyd_max.py +190 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/turboquant/turboquant.py +249 -0
- mcp_plesk_dev_docs-0.4.2/plesk_unified/types.py +27 -0
- mcp_plesk_dev_docs-0.4.2/pyproject.toml +116 -0
- mcp_plesk_dev_docs-0.4.2/setup.cfg +4 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_ai_client.py +111 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_async_tools.py +256 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_benchmark_engines.py +89 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_benchmark_gates.py +128 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_chunking.py +112 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_error_handling.py +192 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_html_utils.py +70 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_indexing.py +231 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_io_utils.py +122 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_log_handler.py +244 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_model_config.py +197 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_progress.py +72 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_prompts.py +75 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_resources.py +58 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_sampling.py +207 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_search_helpers.py +425 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_server.py +453 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_settings.py +157 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_sota_ph1.py +82 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_startup_path.py +77 -0
- mcp_plesk_dev_docs-0.4.2/tests/test_turboquant_regression.py +92 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Gilson Siqueira
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
File without changes
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mcp-plesk-dev-docs
|
|
3
|
+
Version: 0.4.2
|
|
4
|
+
Summary: A unified MCP server that indexes and retrieves Plesk documentation using vector embeddings and semantic search with reranking
|
|
5
|
+
Author-email: Gilson Siqueira <gilson@example.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/barateza/mcp-plesk-dev-docs
|
|
8
|
+
Project-URL: Documentation, https://github.com/barateza/mcp-plesk-dev-docs#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/barateza/mcp-plesk-dev-docs.git
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/barateza/mcp-plesk-dev-docs/issues
|
|
11
|
+
Keywords: plesk,mcp,model-context-protocol,semantic-search,rag,vector-database
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Documentation
|
|
19
|
+
Classifier: Topic :: System :: Monitoring
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Requires-Python: >=3.12
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
License-File: NOTICE
|
|
25
|
+
Requires-Dist: beautifulsoup4>=4.14.3
|
|
26
|
+
Requires-Dist: fastmcp>=3.2.4
|
|
27
|
+
Requires-Dist: lancedb>=0.29.1
|
|
28
|
+
Requires-Dist: pylance>=0.23.0
|
|
29
|
+
Requires-Dist: numpy>=1.26.0
|
|
30
|
+
Requires-Dist: psutil>=6.1.1
|
|
31
|
+
Requires-Dist: pydantic>=2.10.0
|
|
32
|
+
Requires-Dist: pydantic-settings>=2.7.1
|
|
33
|
+
Requires-Dist: sentence-transformers>=5.2.2
|
|
34
|
+
Requires-Dist: torch>=2.4.0
|
|
35
|
+
Requires-Dist: markdownify>=0.14.1
|
|
36
|
+
Requires-Dist: tantivy>=0.22.0
|
|
37
|
+
Requires-Dist: lance-namespace==0.6.1
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: requests>=2.32.0; extra == "dev"
|
|
41
|
+
Requires-Dist: ruff>=0.3.0; extra == "dev"
|
|
42
|
+
Requires-Dist: pre-commit>=3.6.0; extra == "dev"
|
|
43
|
+
Provides-Extra: test
|
|
44
|
+
Requires-Dist: pytest>=8.0.0; extra == "test"
|
|
45
|
+
Provides-Extra: tools
|
|
46
|
+
Requires-Dist: requests>=2.32.0; extra == "tools"
|
|
47
|
+
Dynamic: license-file
|
|
48
|
+
|
|
49
|
+
# mcp-plesk-dev-docs
|
|
50
|
+
|
|
51
|
+
[](https://www.python.org/downloads/)
|
|
52
|
+
[](LICENSE)
|
|
53
|
+
[](https://modelcontextprotocol.io/)
|
|
54
|
+
[](https://github.com/psf/black)
|
|
55
|
+
[](https://github.com/astral-sh/ruff)
|
|
56
|
+
|
|
57
|
+
**State-of-the-Art (SOTA) semantic search across the entire Plesk documentation surface, optimized for sub-second latency on Apple Silicon.**
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Why this exists
|
|
62
|
+
|
|
63
|
+
Plesk documentation is spread across five separate sources: an admin guide, a REST API reference, a CLI reference, a PHP SDK, and a JS SDK. Answering a single extension development question often means searching all of them manually, cross-referencing results, and still missing the relevant section.
|
|
64
|
+
|
|
65
|
+
This server ingests all five sources, embeds them with a multilingual model, and exposes a single `search_plesk_unified` MCP tool. It uses hybrid search (Vector + FTS), Reciprocal Rank Fusion (RRF), and Cross-Encoder reranking to deliver high-precision results in milliseconds.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Architecture & Performance
|
|
70
|
+
|
|
71
|
+
```mermaid
|
|
72
|
+
flowchart TD
|
|
73
|
+
Client["MCP Client\n(Claude Desktop / Cursor / etc.)"]
|
|
74
|
+
|
|
75
|
+
Client -->|"search_plesk_unified(query)"| Server
|
|
76
|
+
|
|
77
|
+
subgraph Server["FastMCP Server · Modular Architecture"]
|
|
78
|
+
direction TB
|
|
79
|
+
Main["Bootstrap · server/main.py"]
|
|
80
|
+
Life["Lifecycle Hooks · server/lifecycle.py"]
|
|
81
|
+
Tools["MCP Tools · server/mcp_app.py"]
|
|
82
|
+
|
|
83
|
+
Main --> Life --> Tools
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
subgraph Pipeline["Retrieval Pipeline"]
|
|
87
|
+
direction TB
|
|
88
|
+
E["1 · Embed query\n(Hardware-accelerated)"]
|
|
89
|
+
S["2 · Hybrid Search\nVector (LanceDB) + FTS (Tantivy)"]
|
|
90
|
+
R["3 · RRF Merge + Rerank\n(MiniLM-L4-v2)"]
|
|
91
|
+
N["4 · Neighbor Expansion\n(Context Enrichment)"]
|
|
92
|
+
A["5 · AI Synthesis\n(sampling-enabled)"]
|
|
93
|
+
E --> S --> R --> N --> A
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
subgraph Store["LanceDB Vector & FTS Store"]
|
|
97
|
+
direction LR
|
|
98
|
+
G["Guide"]
|
|
99
|
+
A_["API"]
|
|
100
|
+
C["CLI"]
|
|
101
|
+
P["PHP Stubs"]
|
|
102
|
+
J["JS SDK"]
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
Tools --> Pipeline
|
|
106
|
+
S <--> Store
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Performance Benchmarks (2026-05-04)
|
|
110
|
+
Optimized for Apple Silicon (M2/M3) using MPS acceleration and memory-resident table caching.
|
|
111
|
+
|
|
112
|
+
| Profile | Embed Model | HR@5 | MRR@5 | Avg Latency | Est. RAM |
|
|
113
|
+
| :--- | :--- | :--- | :--- | :--- | :--- |
|
|
114
|
+
| **`light`** | BAAI/bge-small | **100.0%** | **0.917** | **1.007 s** | ~200 MB |
|
|
115
|
+
| **`medium`** | BAAI/bge-base | **100.0%** | **0.917** | **~0.60s** | ~600 MB |
|
|
116
|
+
| **`full-tq`** | BAAI/bge-m3 | 75.0% | 0.750 | **~0.40s** | ~1300 MB |
|
|
117
|
+
|
|
118
|
+
*Metrics measured on Apple M2 Pro with LanceDB connection caching enabled.*
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Key Features
|
|
123
|
+
|
|
124
|
+
- **Sub-Second Hybrid Search:** Combined Vector + Tantivy FTS with **RAM-cached table connections** for instant retrieval.
|
|
125
|
+
- **AST-Aware Chunking:** Uses `tree-sitter` to respect class and method boundaries in PHP, JS, and TS documentation.
|
|
126
|
+
- **TurboQuant Acceleration:** Fast 4-bit quantized search for the `full-tq` profile, delivering 10x lower latency for large models.
|
|
127
|
+
- **Neighborhood Retrieval:** Automatically fetches adjacent chunks (prev/next) to provide complete context for grounding.
|
|
128
|
+
- **Macro-Context Summaries:** Injects file-level purpose summaries into every chunk using the `SummaryCache`.
|
|
129
|
+
- **AI-Synthesized Answers:** Generates concise answers from search results with structured inline citations `[1]`, `[2]`.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## MCP Components
|
|
134
|
+
|
|
135
|
+
This server provides tools, prompts, and resources. See **[docs/mcp-components.md](docs/mcp-components.md)** for a full reference.
|
|
136
|
+
|
|
137
|
+
### Primary Tools
|
|
138
|
+
|
|
139
|
+
| Tool | Description |
|
|
140
|
+
|---|---|
|
|
141
|
+
| `search_plesk_unified` | Hybrid search with RRF and Cross-Encoder reranking. |
|
|
142
|
+
| `get_file_content` | Retrieve the full content of a specific documentation file. |
|
|
143
|
+
| `resolve_references` | Find all files referencing a specific symbol or topic. |
|
|
144
|
+
| `refresh_knowledge` | Re-fetch sources and update the index (incremental). |
|
|
145
|
+
| `trigger_index_sync` | Start a background indexing job. |
|
|
146
|
+
| `daemon_health` | Check readiness, hardware acceleration (MPS/CUDA), and latency stats. |
|
|
147
|
+
|
|
148
|
+
### Resources
|
|
149
|
+
|
|
150
|
+
- `plesk://toc/api` - Table of Contents for API documentation.
|
|
151
|
+
- `plesk://toc/cli` - Table of Contents for CLI reference.
|
|
152
|
+
- `plesk://toc/guide` - Table of Contents for Extensions Guide.
|
|
153
|
+
- `plesk://toc/php-stubs` - Hierarchical list of PHP classes.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Quickstart
|
|
158
|
+
|
|
159
|
+
### Install
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
git clone https://github.com/barateza/mcp-plesk-dev-docs.git
|
|
163
|
+
cd mcp-plesk-dev-docs
|
|
164
|
+
uv pip install -e .
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Initial Indexing
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
uv run python -m mcp_plesk_dev_docs.server.main refresh_knowledge
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Running
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Standard mode
|
|
177
|
+
uv run python -m mcp_plesk_dev_docs.server.main
|
|
178
|
+
|
|
179
|
+
# Responsive daemon mode (auto-warmup)
|
|
180
|
+
PLESK_DAEMON_AUTO_WARMUP=true uv run python -m mcp_plesk_dev_docs.server.main
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Configuration
|
|
186
|
+
|
|
187
|
+
Set environment variables in `.env`:
|
|
188
|
+
|
|
189
|
+
```env
|
|
190
|
+
PLESK_MODEL_PROFILE=light # light | medium | full-tq
|
|
191
|
+
PLESK_ENABLE_SAMPLING=true # AI-Synthesized answers
|
|
192
|
+
PLESK_DAEMON_AUTO_WARMUP=true # Preload models on startup
|
|
193
|
+
PLESK_INDEX_SUMMARIES=true # Enable file-level summaries
|
|
194
|
+
OPENROUTER_API_KEY=sk-or-v1-...
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Documentation
|
|
200
|
+
|
|
201
|
+
- **[docs/benchmarks.md](docs/benchmarks.md)** - Detailed latency and quality reports.
|
|
202
|
+
- **[docs/mcp-components.md](docs/mcp-components.md)** - Full tool and resource reference.
|
|
203
|
+
- **[docs/turboquant.md](docs/turboquant.md)** - 4-bit quantization internals.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
MIT. See [LICENSE](LICENSE).
|
|
210
|
+
|
|
211
|
+
## Ownership & Disclaimer
|
|
212
|
+
|
|
213
|
+
This is a personal project by Gilson Siqueira. It is not officially affiliated with, endorsed by, or supported by Plesk or WebPros International GmbH. Plesk is a trademark of WebPros International GmbH.
|
|
214
|
+
|
|
215
|
+
Important notice about Plesk-owned deliverables
|
|
216
|
+
|
|
217
|
+
Portions of this repository were developed under contract for Plesk International GmbH ("Plesk") only if specifically identified as such. The MIT license above applies only to material the repository owner is authorized to license. Files or directories owned by Plesk, if any, are listed in [NOTICE](NOTICE). If you need assurance about licensing for a particular file, contact Plesk or seek legal counsel before relying on the MIT License for Plesk-owned files.
|
|
218
|
+
|
|
219
|
+
*Built to make Plesk extension development faster.*
|
|
220
|
+
|
|
221
|
+
<!-- mcp-name: io.github.barateza/mcp-plesk-dev-docs -->
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# mcp-plesk-dev-docs
|
|
2
|
+
|
|
3
|
+
[](https://www.python.org/downloads/)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://modelcontextprotocol.io/)
|
|
6
|
+
[](https://github.com/psf/black)
|
|
7
|
+
[](https://github.com/astral-sh/ruff)
|
|
8
|
+
|
|
9
|
+
**State-of-the-Art (SOTA) semantic search across the entire Plesk documentation surface, optimized for sub-second latency on Apple Silicon.**
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Why this exists
|
|
14
|
+
|
|
15
|
+
Plesk documentation is spread across five separate sources: an admin guide, a REST API reference, a CLI reference, a PHP SDK, and a JS SDK. Answering a single extension development question often means searching all of them manually, cross-referencing results, and still missing the relevant section.
|
|
16
|
+
|
|
17
|
+
This server ingests all five sources, embeds them with a multilingual model, and exposes a single `search_plesk_unified` MCP tool. It uses hybrid search (Vector + FTS), Reciprocal Rank Fusion (RRF), and Cross-Encoder reranking to deliver high-precision results in milliseconds.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Architecture & Performance
|
|
22
|
+
|
|
23
|
+
```mermaid
|
|
24
|
+
flowchart TD
|
|
25
|
+
Client["MCP Client\n(Claude Desktop / Cursor / etc.)"]
|
|
26
|
+
|
|
27
|
+
Client -->|"search_plesk_unified(query)"| Server
|
|
28
|
+
|
|
29
|
+
subgraph Server["FastMCP Server · Modular Architecture"]
|
|
30
|
+
direction TB
|
|
31
|
+
Main["Bootstrap · server/main.py"]
|
|
32
|
+
Life["Lifecycle Hooks · server/lifecycle.py"]
|
|
33
|
+
Tools["MCP Tools · server/mcp_app.py"]
|
|
34
|
+
|
|
35
|
+
Main --> Life --> Tools
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
subgraph Pipeline["Retrieval Pipeline"]
|
|
39
|
+
direction TB
|
|
40
|
+
E["1 · Embed query\n(Hardware-accelerated)"]
|
|
41
|
+
S["2 · Hybrid Search\nVector (LanceDB) + FTS (Tantivy)"]
|
|
42
|
+
R["3 · RRF Merge + Rerank\n(MiniLM-L4-v2)"]
|
|
43
|
+
N["4 · Neighbor Expansion\n(Context Enrichment)"]
|
|
44
|
+
A["5 · AI Synthesis\n(sampling-enabled)"]
|
|
45
|
+
E --> S --> R --> N --> A
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
subgraph Store["LanceDB Vector & FTS Store"]
|
|
49
|
+
direction LR
|
|
50
|
+
G["Guide"]
|
|
51
|
+
A_["API"]
|
|
52
|
+
C["CLI"]
|
|
53
|
+
P["PHP Stubs"]
|
|
54
|
+
J["JS SDK"]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
Tools --> Pipeline
|
|
58
|
+
S <--> Store
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Performance Benchmarks (2026-05-04)
|
|
62
|
+
Optimized for Apple Silicon (M2/M3) using MPS acceleration and memory-resident table caching.
|
|
63
|
+
|
|
64
|
+
| Profile | Embed Model | HR@5 | MRR@5 | Avg Latency | Est. RAM |
|
|
65
|
+
| :--- | :--- | :--- | :--- | :--- | :--- |
|
|
66
|
+
| **`light`** | BAAI/bge-small | **100.0%** | **0.917** | **1.007 s** | ~200 MB |
|
|
67
|
+
| **`medium`** | BAAI/bge-base | **100.0%** | **0.917** | **~0.60s** | ~600 MB |
|
|
68
|
+
| **`full-tq`** | BAAI/bge-m3 | 75.0% | 0.750 | **~0.40s** | ~1300 MB |
|
|
69
|
+
|
|
70
|
+
*Metrics measured on Apple M2 Pro with LanceDB connection caching enabled.*
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Key Features
|
|
75
|
+
|
|
76
|
+
- **Sub-Second Hybrid Search:** Combined Vector + Tantivy FTS with **RAM-cached table connections** for instant retrieval.
|
|
77
|
+
- **AST-Aware Chunking:** Uses `tree-sitter` to respect class and method boundaries in PHP, JS, and TS documentation.
|
|
78
|
+
- **TurboQuant Acceleration:** Fast 4-bit quantized search for the `full-tq` profile, delivering 10x lower latency for large models.
|
|
79
|
+
- **Neighborhood Retrieval:** Automatically fetches adjacent chunks (prev/next) to provide complete context for grounding.
|
|
80
|
+
- **Macro-Context Summaries:** Injects file-level purpose summaries into every chunk using the `SummaryCache`.
|
|
81
|
+
- **AI-Synthesized Answers:** Generates concise answers from search results with structured inline citations `[1]`, `[2]`.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## MCP Components
|
|
86
|
+
|
|
87
|
+
This server provides tools, prompts, and resources. See **[docs/mcp-components.md](docs/mcp-components.md)** for a full reference.
|
|
88
|
+
|
|
89
|
+
### Primary Tools
|
|
90
|
+
|
|
91
|
+
| Tool | Description |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `search_plesk_unified` | Hybrid search with RRF and Cross-Encoder reranking. |
|
|
94
|
+
| `get_file_content` | Retrieve the full content of a specific documentation file. |
|
|
95
|
+
| `resolve_references` | Find all files referencing a specific symbol or topic. |
|
|
96
|
+
| `refresh_knowledge` | Re-fetch sources and update the index (incremental). |
|
|
97
|
+
| `trigger_index_sync` | Start a background indexing job. |
|
|
98
|
+
| `daemon_health` | Check readiness, hardware acceleration (MPS/CUDA), and latency stats. |
|
|
99
|
+
|
|
100
|
+
### Resources
|
|
101
|
+
|
|
102
|
+
- `plesk://toc/api` - Table of Contents for API documentation.
|
|
103
|
+
- `plesk://toc/cli` - Table of Contents for CLI reference.
|
|
104
|
+
- `plesk://toc/guide` - Table of Contents for Extensions Guide.
|
|
105
|
+
- `plesk://toc/php-stubs` - Hierarchical list of PHP classes.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Quickstart
|
|
110
|
+
|
|
111
|
+
### Install
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
git clone https://github.com/barateza/mcp-plesk-dev-docs.git
|
|
115
|
+
cd mcp-plesk-dev-docs
|
|
116
|
+
uv pip install -e .
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Initial Indexing
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
uv run python -m mcp_plesk_dev_docs.server.main refresh_knowledge
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Running
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Standard mode
|
|
129
|
+
uv run python -m mcp_plesk_dev_docs.server.main
|
|
130
|
+
|
|
131
|
+
# Responsive daemon mode (auto-warmup)
|
|
132
|
+
PLESK_DAEMON_AUTO_WARMUP=true uv run python -m mcp_plesk_dev_docs.server.main
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Configuration
|
|
138
|
+
|
|
139
|
+
Set environment variables in `.env`:
|
|
140
|
+
|
|
141
|
+
```env
|
|
142
|
+
PLESK_MODEL_PROFILE=light # light | medium | full-tq
|
|
143
|
+
PLESK_ENABLE_SAMPLING=true # AI-Synthesized answers
|
|
144
|
+
PLESK_DAEMON_AUTO_WARMUP=true # Preload models on startup
|
|
145
|
+
PLESK_INDEX_SUMMARIES=true # Enable file-level summaries
|
|
146
|
+
OPENROUTER_API_KEY=sk-or-v1-...
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Documentation
|
|
152
|
+
|
|
153
|
+
- **[docs/benchmarks.md](docs/benchmarks.md)** - Detailed latency and quality reports.
|
|
154
|
+
- **[docs/mcp-components.md](docs/mcp-components.md)** - Full tool and resource reference.
|
|
155
|
+
- **[docs/turboquant.md](docs/turboquant.md)** - 4-bit quantization internals.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## License
|
|
160
|
+
|
|
161
|
+
MIT. See [LICENSE](LICENSE).
|
|
162
|
+
|
|
163
|
+
## Ownership & Disclaimer
|
|
164
|
+
|
|
165
|
+
This is a personal project by Gilson Siqueira. It is not officially affiliated with, endorsed by, or supported by Plesk or WebPros International GmbH. Plesk is a trademark of WebPros International GmbH.
|
|
166
|
+
|
|
167
|
+
Important notice about Plesk-owned deliverables
|
|
168
|
+
|
|
169
|
+
Portions of this repository were developed under contract for Plesk International GmbH ("Plesk") only if specifically identified as such. The MIT license above applies only to material the repository owner is authorized to license. Files or directories owned by Plesk, if any, are listed in [NOTICE](NOTICE). If you need assurance about licensing for a particular file, contact Plesk or seek legal counsel before relying on the MIT License for Plesk-owned files.
|
|
170
|
+
|
|
171
|
+
*Built to make Plesk extension development faster.*
|
|
172
|
+
|
|
173
|
+
<!-- mcp-name: io.github.barateza/mcp-plesk-dev-docs -->
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mcp-plesk-dev-docs
|
|
3
|
+
Version: 0.4.2
|
|
4
|
+
Summary: A unified MCP server that indexes and retrieves Plesk documentation using vector embeddings and semantic search with reranking
|
|
5
|
+
Author-email: Gilson Siqueira <gilson@example.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/barateza/mcp-plesk-dev-docs
|
|
8
|
+
Project-URL: Documentation, https://github.com/barateza/mcp-plesk-dev-docs#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/barateza/mcp-plesk-dev-docs.git
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/barateza/mcp-plesk-dev-docs/issues
|
|
11
|
+
Keywords: plesk,mcp,model-context-protocol,semantic-search,rag,vector-database
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Documentation
|
|
19
|
+
Classifier: Topic :: System :: Monitoring
|
|
20
|
+
Classifier: Topic :: Utilities
|
|
21
|
+
Requires-Python: >=3.12
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
License-File: NOTICE
|
|
25
|
+
Requires-Dist: beautifulsoup4>=4.14.3
|
|
26
|
+
Requires-Dist: fastmcp>=3.2.4
|
|
27
|
+
Requires-Dist: lancedb>=0.29.1
|
|
28
|
+
Requires-Dist: pylance>=0.23.0
|
|
29
|
+
Requires-Dist: numpy>=1.26.0
|
|
30
|
+
Requires-Dist: psutil>=6.1.1
|
|
31
|
+
Requires-Dist: pydantic>=2.10.0
|
|
32
|
+
Requires-Dist: pydantic-settings>=2.7.1
|
|
33
|
+
Requires-Dist: sentence-transformers>=5.2.2
|
|
34
|
+
Requires-Dist: torch>=2.4.0
|
|
35
|
+
Requires-Dist: markdownify>=0.14.1
|
|
36
|
+
Requires-Dist: tantivy>=0.22.0
|
|
37
|
+
Requires-Dist: lance-namespace==0.6.1
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: requests>=2.32.0; extra == "dev"
|
|
41
|
+
Requires-Dist: ruff>=0.3.0; extra == "dev"
|
|
42
|
+
Requires-Dist: pre-commit>=3.6.0; extra == "dev"
|
|
43
|
+
Provides-Extra: test
|
|
44
|
+
Requires-Dist: pytest>=8.0.0; extra == "test"
|
|
45
|
+
Provides-Extra: tools
|
|
46
|
+
Requires-Dist: requests>=2.32.0; extra == "tools"
|
|
47
|
+
Dynamic: license-file
|
|
48
|
+
|
|
49
|
+
# mcp-plesk-dev-docs
|
|
50
|
+
|
|
51
|
+
[](https://www.python.org/downloads/)
|
|
52
|
+
[](LICENSE)
|
|
53
|
+
[](https://modelcontextprotocol.io/)
|
|
54
|
+
[](https://github.com/psf/black)
|
|
55
|
+
[](https://github.com/astral-sh/ruff)
|
|
56
|
+
|
|
57
|
+
**State-of-the-Art (SOTA) semantic search across the entire Plesk documentation surface, optimized for sub-second latency on Apple Silicon.**
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Why this exists
|
|
62
|
+
|
|
63
|
+
Plesk documentation is spread across five separate sources: an admin guide, a REST API reference, a CLI reference, a PHP SDK, and a JS SDK. Answering a single extension development question often means searching all of them manually, cross-referencing results, and still missing the relevant section.
|
|
64
|
+
|
|
65
|
+
This server ingests all five sources, embeds them with a multilingual model, and exposes a single `search_plesk_unified` MCP tool. It uses hybrid search (Vector + FTS), Reciprocal Rank Fusion (RRF), and Cross-Encoder reranking to deliver high-precision results in milliseconds.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Architecture & Performance
|
|
70
|
+
|
|
71
|
+
```mermaid
|
|
72
|
+
flowchart TD
|
|
73
|
+
Client["MCP Client\n(Claude Desktop / Cursor / etc.)"]
|
|
74
|
+
|
|
75
|
+
Client -->|"search_plesk_unified(query)"| Server
|
|
76
|
+
|
|
77
|
+
subgraph Server["FastMCP Server · Modular Architecture"]
|
|
78
|
+
direction TB
|
|
79
|
+
Main["Bootstrap · server/main.py"]
|
|
80
|
+
Life["Lifecycle Hooks · server/lifecycle.py"]
|
|
81
|
+
Tools["MCP Tools · server/mcp_app.py"]
|
|
82
|
+
|
|
83
|
+
Main --> Life --> Tools
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
subgraph Pipeline["Retrieval Pipeline"]
|
|
87
|
+
direction TB
|
|
88
|
+
E["1 · Embed query\n(Hardware-accelerated)"]
|
|
89
|
+
S["2 · Hybrid Search\nVector (LanceDB) + FTS (Tantivy)"]
|
|
90
|
+
R["3 · RRF Merge + Rerank\n(MiniLM-L4-v2)"]
|
|
91
|
+
N["4 · Neighbor Expansion\n(Context Enrichment)"]
|
|
92
|
+
A["5 · AI Synthesis\n(sampling-enabled)"]
|
|
93
|
+
E --> S --> R --> N --> A
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
subgraph Store["LanceDB Vector & FTS Store"]
|
|
97
|
+
direction LR
|
|
98
|
+
G["Guide"]
|
|
99
|
+
A_["API"]
|
|
100
|
+
C["CLI"]
|
|
101
|
+
P["PHP Stubs"]
|
|
102
|
+
J["JS SDK"]
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
Tools --> Pipeline
|
|
106
|
+
S <--> Store
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Performance Benchmarks (2026-05-04)
|
|
110
|
+
Optimized for Apple Silicon (M2/M3) using MPS acceleration and memory-resident table caching.
|
|
111
|
+
|
|
112
|
+
| Profile | Embed Model | HR@5 | MRR@5 | Avg Latency | Est. RAM |
|
|
113
|
+
| :--- | :--- | :--- | :--- | :--- | :--- |
|
|
114
|
+
| **`light`** | BAAI/bge-small | **100.0%** | **0.917** | **1.007 s** | ~200 MB |
|
|
115
|
+
| **`medium`** | BAAI/bge-base | **100.0%** | **0.917** | **~0.60s** | ~600 MB |
|
|
116
|
+
| **`full-tq`** | BAAI/bge-m3 | 75.0% | 0.750 | **~0.40s** | ~1300 MB |
|
|
117
|
+
|
|
118
|
+
*Metrics measured on Apple M2 Pro with LanceDB connection caching enabled.*
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Key Features
|
|
123
|
+
|
|
124
|
+
- **Sub-Second Hybrid Search:** Combined Vector + Tantivy FTS with **RAM-cached table connections** for instant retrieval.
|
|
125
|
+
- **AST-Aware Chunking:** Uses `tree-sitter` to respect class and method boundaries in PHP, JS, and TS documentation.
|
|
126
|
+
- **TurboQuant Acceleration:** Fast 4-bit quantized search for the `full-tq` profile, delivering 10x lower latency for large models.
|
|
127
|
+
- **Neighborhood Retrieval:** Automatically fetches adjacent chunks (prev/next) to provide complete context for grounding.
|
|
128
|
+
- **Macro-Context Summaries:** Injects file-level purpose summaries into every chunk using the `SummaryCache`.
|
|
129
|
+
- **AI-Synthesized Answers:** Generates concise answers from search results with structured inline citations `[1]`, `[2]`.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## MCP Components
|
|
134
|
+
|
|
135
|
+
This server provides tools, prompts, and resources. See **[docs/mcp-components.md](docs/mcp-components.md)** for a full reference.
|
|
136
|
+
|
|
137
|
+
### Primary Tools
|
|
138
|
+
|
|
139
|
+
| Tool | Description |
|
|
140
|
+
|---|---|
|
|
141
|
+
| `search_plesk_unified` | Hybrid search with RRF and Cross-Encoder reranking. |
|
|
142
|
+
| `get_file_content` | Retrieve the full content of a specific documentation file. |
|
|
143
|
+
| `resolve_references` | Find all files referencing a specific symbol or topic. |
|
|
144
|
+
| `refresh_knowledge` | Re-fetch sources and update the index (incremental). |
|
|
145
|
+
| `trigger_index_sync` | Start a background indexing job. |
|
|
146
|
+
| `daemon_health` | Check readiness, hardware acceleration (MPS/CUDA), and latency stats. |
|
|
147
|
+
|
|
148
|
+
### Resources
|
|
149
|
+
|
|
150
|
+
- `plesk://toc/api` - Table of Contents for API documentation.
|
|
151
|
+
- `plesk://toc/cli` - Table of Contents for CLI reference.
|
|
152
|
+
- `plesk://toc/guide` - Table of Contents for Extensions Guide.
|
|
153
|
+
- `plesk://toc/php-stubs` - Hierarchical list of PHP classes.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Quickstart
|
|
158
|
+
|
|
159
|
+
### Install
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
git clone https://github.com/barateza/mcp-plesk-dev-docs.git
|
|
163
|
+
cd mcp-plesk-dev-docs
|
|
164
|
+
uv pip install -e .
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Initial Indexing
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
uv run python -m mcp_plesk_dev_docs.server.main refresh_knowledge
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Running
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Standard mode
|
|
177
|
+
uv run python -m mcp_plesk_dev_docs.server.main
|
|
178
|
+
|
|
179
|
+
# Responsive daemon mode (auto-warmup)
|
|
180
|
+
PLESK_DAEMON_AUTO_WARMUP=true uv run python -m mcp_plesk_dev_docs.server.main
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Configuration
|
|
186
|
+
|
|
187
|
+
Set environment variables in `.env`:
|
|
188
|
+
|
|
189
|
+
```env
|
|
190
|
+
PLESK_MODEL_PROFILE=light # light | medium | full-tq
|
|
191
|
+
PLESK_ENABLE_SAMPLING=true # AI-Synthesized answers
|
|
192
|
+
PLESK_DAEMON_AUTO_WARMUP=true # Preload models on startup
|
|
193
|
+
PLESK_INDEX_SUMMARIES=true # Enable file-level summaries
|
|
194
|
+
OPENROUTER_API_KEY=sk-or-v1-...
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Documentation
|
|
200
|
+
|
|
201
|
+
- **[docs/benchmarks.md](docs/benchmarks.md)** - Detailed latency and quality reports.
|
|
202
|
+
- **[docs/mcp-components.md](docs/mcp-components.md)** - Full tool and resource reference.
|
|
203
|
+
- **[docs/turboquant.md](docs/turboquant.md)** - 4-bit quantization internals.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
MIT. See [LICENSE](LICENSE).
|
|
210
|
+
|
|
211
|
+
## Ownership & Disclaimer
|
|
212
|
+
|
|
213
|
+
This is a personal project by Gilson Siqueira. It is not officially affiliated with, endorsed by, or supported by Plesk or WebPros International GmbH. Plesk is a trademark of WebPros International GmbH.
|
|
214
|
+
|
|
215
|
+
Important notice about Plesk-owned deliverables
|
|
216
|
+
|
|
217
|
+
Portions of this repository were developed under contract for Plesk International GmbH ("Plesk") only if specifically identified as such. The MIT license above applies only to material the repository owner is authorized to license. Files or directories owned by Plesk, if any, are listed in [NOTICE](NOTICE). If you need assurance about licensing for a particular file, contact Plesk or seek legal counsel before relying on the MIT License for Plesk-owned files.
|
|
218
|
+
|
|
219
|
+
*Built to make Plesk extension development faster.*
|
|
220
|
+
|
|
221
|
+
<!-- mcp-name: io.github.barateza/mcp-plesk-dev-docs -->
|