Labsco
MCP SERVER

MCP SOP Server

by dadapera

Semantic search over your company's SOP documents, with Italian-language support built in.

Vector Stores & RAG Retrieval
Summary
Two questions, not one: find the procedure, or ask what to do.

Document search returns passages; `get_sop_guidance` takes the situation you are actually in — a customer reported a defect — and answers from the procedures instead. That split matters in practice, because the person asking usually can't name the SOP they need. Categories come from your folder structure, so scoping a search is a filesystem decision rather than a configuration one.

What it is

A Python server that indexes your standard operating procedures — PDF and DOCX — and answers questions about them by meaning rather than keyword. It uses ChromaDB for vector storage and a multilingual sentence-transformer model chosen for Italian, so a question asked in Italian finds the right procedure even when the wording differs.

What you get
  • `search_sop_documents` searches with a natural-language `query` in Italian or English, with `max_results` (default 5) and an optional `category` filter
  • `get_sop_guidance` takes a `situation` description and returns guidance drawn from the procedures, optionally scoped to one category
  • `list_sop_categories` returns the available categories and collection statistics; `get_sop_by_category` returns everything in one
  • `refresh_sop_database` reindexes after documents change; `get_server_status` reports status and statistics
  • The server starts fast and indexes on the first tool call rather than at launch
Requirements

Python with a virtual environment and `pip install -r requirements.txt`. Create a `sop_documents/` directory and organise your files into category folders — the folder names become the categories you can filter by. Point your client at your virtualenv's Python running `main.py`, using absolute paths. The embedding model is `sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2` by default and downloads on first run; ChromaDB stores its index in `chroma_db/` in the project root. Text is chunked at 1000 characters with 200 of overlap.

Setup effort

One command — pip install -r requirements.txt