Expand description
microsoft-365-mcp — hybrid vector + BM25 RAG over the official Microsoft 365 documentation.
The corpus is the MicrosoftDocs/microsoft-365-docs repository (microsoft-365/ and copilot/ trees, English markdown). A CLI walks the corpus checkout, chunks markdown with line provenance, embeds every chunk locally (fastembed ONNX, no API key), builds a tantivy BM25 index, and serves hybrid retrieval (reciprocal rank fusion) over MCP or a CLI query command.
Build with the embedded builder, run build-index, install, and query. See docs/setup.md for the full workflow.
Modules§
- bm25
- BM25 full-text index (tantivy) over the chunk corpus.
- chunk
- File chunking — split documentation files into retrieval units with line provenance.
- embed
- Local embedding model (fastembed, ONNX, no API key).
- install
- Install helper: copy the binary to ~/.local/bin, register the MCP server (with MICROSOFT_365_MCP_HOME pointing at the index directory) in ~/.opengrok/config.toml, and install the embedded skill, baking in the index directory.
- rag
- Hybrid vector + BM25 store for a documentation corpus.
- scan
- Corpus scanning — walk a source-of-truth docs repository and collect the markdown files that should be indexed, with relative paths and sizes.
- server
- MCP server handler — the three query tools, wired to the RAG store.
Constants§
- SERVER_
NAME - Name used for the MCP server registration, the installed binary, the skill directory, and the tools’ namespace. Rename here (and in Cargo.toml) when you copy this template into a project. The MICROSOFT_365_MCP_SERVER_NAME environment variable overrides it at install time.