Skip to main content

powershell_mcp/
lib.rs

1//! powershell-mcp — hybrid vector + BM25 RAG over the official PowerShell
2//! documentation.
3//!
4//! The source of truth is the MicrosoftDocs/PowerShell-Docs repository
5//! (the same markdown that powers learn.microsoft.com/powershell): cmdlet
6//! reference pages, about topics, and conceptual guides across all
7//! supported PowerShell versions. A CLI walks a checkout of that repo,
8//! chunks the markdown with line provenance, embeds every chunk locally
9//! (fastembed ONNX, no API key), builds a tantivy BM25 index, and serves
10//! hybrid retrieval (reciprocal rank fusion) over MCP or a CLI query
11//! command.
12//!
13//! A local hybrid RAG server over a documentation corpus. See
14//! docs/setup.md for the full workflow.
15
16pub mod bm25;
17pub mod chunk;
18pub mod embed;
19pub mod install;
20pub mod rag;
21pub mod scan;
22pub mod server;
23
24/// Name used for the MCP server registration, the installed binary, the
25/// skill directory, and the tools' namespace. The
26/// POWERSHELL_MCP_SERVER_NAME environment variable overrides it at
27/// install time.
28pub const SERVER_NAME: &str = "powershell-mcp";