Skip to main content

A unified MCP server that indexes and retrieves Plesk documentation using vector embeddings and semantic search with reranking

Project description

mcp-plesk-dev-docs

Python 3.12+ PyPI MCP Registry License: MIT MCP Compatible Code style: black Ruff

State-of-the-Art (SOTA) semantic search across the entire Plesk documentation surface, optimized for sub-second latency on Apple Silicon.


Why this exists

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.

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.


Architecture & Performance

flowchart TD
    Client["MCP Client\n(Claude Desktop / Cursor / etc.)"]

    Client -->|"search_plesk_unified(query)"| Server

    subgraph Server["FastMCP Server · Modular Architecture"]
        direction TB
        Main["Bootstrap · server/main.py"]
        Life["Lifecycle Hooks · server/lifecycle.py"]
        Tools["MCP Tools · server/mcp_app.py"]

        Main --> Life --> Tools
    end

    subgraph Pipeline["Retrieval Pipeline"]
        direction TB
        E["1 · Embed query\n(Hardware-accelerated)"]
        S["2 · Hybrid Search\nVector (LanceDB) + FTS (Tantivy)"]
        R["3 · RRF Merge + Rerank\n(MiniLM-L4-v2)"]
        N["4 · Neighbor Expansion\n(Context Enrichment)"]
        A["5 · AI Synthesis\n(sampling-enabled)"]
        E --> S --> R --> N --> A
    end

    subgraph Store["LanceDB Vector & FTS Store"]
        direction LR
        G["Guide"]
        A_["API"]
        C["CLI"]
        P["PHP Stubs"]
        J["JS SDK"]
    end

    Tools --> Pipeline
    S <--> Store

Performance Benchmarks (2026-05-04)

Optimized for Apple Silicon (M2/M3) using MPS acceleration and memory-resident table caching.

Profile Embed Model HR@5 MRR@5 Avg Latency Est. RAM
light BAAI/bge-small 100.0% 0.917 1.007 s ~200 MB
medium BAAI/bge-base 100.0% 0.917 ~0.60s ~600 MB
full-tq BAAI/bge-m3 75.0% 0.750 ~0.40s ~1300 MB

Metrics measured on Apple M2 Pro with LanceDB connection caching enabled.


Key Features

  • Sub-Second Hybrid Search: Combined Vector + Tantivy FTS with RAM-cached table connections for instant retrieval.
  • AST-Aware Chunking: Uses tree-sitter to respect class and method boundaries in PHP, JS, and TS documentation.
  • TurboQuant Acceleration: Fast 4-bit quantized search for the full-tq profile, delivering 10x lower latency for large models.
  • Neighborhood Retrieval: Automatically fetches adjacent chunks (prev/next) to provide complete context for grounding.
  • Macro-Context Summaries: Injects file-level purpose summaries into every chunk using the SummaryCache.
  • AI-Synthesized Answers: Generates concise answers from search results with structured inline citations [1], [2].

MCP Components

This server provides tools, prompts, and resources. See docs/mcp-components.md for a full reference.

Primary Tools

Tool Description
search_plesk_unified Hybrid search with RRF and Cross-Encoder reranking.
get_file_content Retrieve the full content of a specific documentation file.
resolve_references Find all files referencing a specific symbol or topic.
refresh_knowledge Re-fetch sources and update the index (incremental).
trigger_index_sync Start a background indexing job.
daemon_health Check readiness, hardware acceleration (MPS/CUDA), and latency stats.

Resources

  • plesk://toc/api - Table of Contents for API documentation.
  • plesk://toc/cli - Table of Contents for CLI reference.
  • plesk://toc/guide - Table of Contents for Extensions Guide.
  • plesk://toc/php-stubs - Hierarchical list of PHP classes.

Quickstart

Install

git clone https://github.com/barateza/mcp-plesk-dev-docs.git
cd mcp-plesk-dev-docs
uv pip install -e .

Initial Indexing

uv run python -m mcp_plesk_dev_docs.server.main refresh_knowledge

Running

# Standard mode
uv run python -m mcp_plesk_dev_docs.server.main

# Responsive daemon mode (auto-warmup)
PLESK_DAEMON_AUTO_WARMUP=true uv run python -m mcp_plesk_dev_docs.server.main

Configuration

Set environment variables in .env:

PLESK_MODEL_PROFILE=light       # light | medium | full-tq
PLESK_ENABLE_SAMPLING=true     # AI-Synthesized answers
PLESK_DAEMON_AUTO_WARMUP=true  # Preload models on startup
PLESK_INDEX_SUMMARIES=true     # Enable file-level summaries
OPENROUTER_API_KEY=sk-or-v1-...

Documentation


License

MIT. See LICENSE.

Ownership & Disclaimer

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.

Important notice about Plesk-owned deliverables

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. 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.

Built to make Plesk extension development faster.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_plesk_dev_docs-0.5.0.tar.gz (63.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_plesk_dev_docs-0.5.0-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_plesk_dev_docs-0.5.0.tar.gz.

File metadata

  • Download URL: mcp_plesk_dev_docs-0.5.0.tar.gz
  • Upload date:
  • Size: 63.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mcp_plesk_dev_docs-0.5.0.tar.gz
Algorithm Hash digest
SHA256 dcf399260764f489b262b4a26c6ab68fc3bfdf0c04bedb988bf4b84b45fbdb43
MD5 f0d7ab8581b55aca65079fbd5dcbdc11
BLAKE2b-256 8622566b5c52a02a957a147c6c4c1628cafedba985b9aa483c3144eeb27ae827

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_plesk_dev_docs-0.5.0.tar.gz:

Publisher: publish.yml on barateza/mcp-plesk-dev-docs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_plesk_dev_docs-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_plesk_dev_docs-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e662de64b161bfb631146f0f46a87aa271cb70f6c2557edc6f2e4fa3fce7eca
MD5 edaafb6d837a4de448ffb9f38807adb2
BLAKE2b-256 090c524da2a20babe112a8d6e94c4876d298d1954fb8ad1e28c9ea10a08da912

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_plesk_dev_docs-0.5.0-py3-none-any.whl:

Publisher: publish.yml on barateza/mcp-plesk-dev-docs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page