scikitplot.mcp#
Composable documentation retrieval for Model Context Protocol (MCP) servers.
The default import surface is independent of the MCP SDK, pydantic, and the
optional corpus/vector dependencies. Importing scikitplot.mcp pulls only
the SDK-free retrieval core (contracts, fusion, the in-memory demo retriever) and
the pydantic-free capability/runtime-status helpers, so it works on the Legacy
Retrieval tier (Python 3.8+) with a base install.
The server layer (SearchService, create_server, and the pydantic output
models SearchDocsOutput / CitationOutput) is imported lazily on first
access. It requires the [mcp] extra (pydantic always; mcp>=2.0.0,<3 on
Python >= 3.10). No models, indexes, files, or network connections are opened at
import time.
User guide. See the Model Context Protocol Retrieval section for further details.
MCP: Capabilities#
Verify this module's capability vocabulary still matches Corpus's. |
|
Return the effective surface for a specific server configuration. |
|
Return the static / potential tool/resource inventory, without importing the MCP SDK — safe on any interpreter, including the Legacy Retrieval tier. |
|
Report, without importing the MCP SDK, whether the protocol server can run in this interpreter — so callers can degrade gracefully to the SDK-free retrieval layer instead of catching an exception from |
MCP: Core#
Class inheritance

Compiled regular expression object. |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
int([x]) -> integer int(x, base=10) -> integer |
|
Structural contract every retrieval backend must satisfy. |
|
One retrieved passage with the metadata needed to cite it. |
|
Validated, concurrency-bounded search orchestration, free of wire models. |
|
Format retrieval results as an MCP |
|
Return whether |
MCP: Corpus Index Retriever#
Class inheritance

Docs dense retriever backed by an embedder + a vector index + a document lookup. |
|
Text-level retriever over a corpus |
|
Anything that turns a query string into a vector (e.g. corpus |
|
Anything that returns |
MCP: Corpus Hybrid Retriever#
Class inheritance

int([x]) -> integer int(x, base=10) -> integer |
|
Lexical retriever (FTS/BM25) leg backed by a full-text search seam. |
|
Fuse several retrievers into one via Reciprocal Rank Fusion. |
|
Fuse weighted ranked lists into a single |
MCP: Demo#
One in-memory document used by |
|
A compact BM25 implementation suitable for demos and small corpora. |
|
Return a tiny corpus that explains the sample's own mechanism. |
MCP: Outcome#
Class inheritance

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
How one retrieval leg fared. |
|
Ranked hits plus the story of how they were obtained. |
|
Verify this module's vocabulary still matches Corpus's. |
|
Resolve a status string to |
MCP: Server#
Stable source metadata for one returned passage. |
|
Structured output schema automatically advertised by MCP SDK v2. |
|
Wire adapter: bounded, validated search returning pydantic tool models. |
|
Create an official MCP Python SDK v2 |
MCP: Command Line and Validation#
Validated effective CLI configuration. |
|
Return |
|
Return |