LabscoMCP early access ↗
ikungsjlMCP SERVER

MCP Knowledge Base

A local document knowledge base an assistant can build and query: add files or a whole directory, then ask questions answered from their contents.

by ikungsjl ↗Vector Stores & RAG RetrievalCommunity

LABSCO SUMMARY

Nothing leaves the machine.

There is no embedding provider to configure and no key to obtain, which makes this cheap to try on documents you would not upload anywhere — the trade is that retrieval is similarity over a local index rather than a hosted vector service. The threshold argument on the query is what you tune when answers come back too loose or too empty.

What it is

A TypeScript MCP server that indexes documents on your own machine and answers questions against them by similarity. It handles PDF, DOCX, TXT and HTML, and is written with Chinese-language documents in mind as well as English.

What you get

  • Ingestion — add_document for one file by path, add_directory to take everything in a folder
  • query_knowledge_base — ask a question and get matching passages, with arguments for how many results to return and a similarity threshold to cut weak matches
  • Management — list_documents, get_document for one by id, remove_document, clear_knowledge_base
  • get_stats for what the index currently holds
  • Automatic indexing on ingest, with the documents and index kept in their own directories beside the server

Requirements

Node and npm — clone, npm install, npm run build, then point your client at dist/index.js. No API keys and no external service: indexing and retrieval both run locally. The server creates a documents directory and an index directory on first use, so run it somewhere you are happy for those to live. MIT licensed.

Setup effort

Build from source — git clone https://github.com/ikungsjl/mcp-knowledge-base.git