initialize_ragLABSCO SUMMARY
A private set of documents becomes answerable.
Everything the loop needs is in one server: put documents in, search them, and ask questions that get answered from what came back. It is small enough to point at a handful of documents for a single project, and clearing the store is one call when that project ends.
What it is
An MCP server that runs a retrieval-augmented generation loop: documents are chunked and vectorised into a store, retrieved by cosine similarity, and answered against. The model work runs on an OpenAI key you supply.
What you get
- Documents added with metadata, chunked and vectorised automatically
- Similarity search over the store, with the number of results you want
- Questions answered against the retrieved context rather than from the model alone
- Statistics on what the knowledge base currently holds
- The whole store cleared when you want to start again
Requirements
Node.js, a clone of the repository, and an OpenAI API key in the environment. The RAG agent is initialised once before the other tools will do anything.
Setup effort
Build from source — git clone https://github.com/PrettyKing/chalee-mcp-rag.git
USE CASES
Making a pile of documents askable
Initialise, add the documents with whatever metadata you want to filter on later, and start asking. Chunking and vectorising happen on the way in.
Finding the passage rather than the answer
Search directly when you want the source text — useful when the answer needs to be quoted rather than summarised.
Checking what is actually in the knowledge base
Read the statistics before you trust an answer. An empty or half-loaded store explains more bad answers than the retrieval does.
Starting over with a new document set
Clear the store and load the new documents, so answers cannot be contaminated by the project you just finished.
6 tools
Listed in project docs. Your client may show a different list.
add_documentask_questionsearch_documentsget_knowledge_base_statsclear_knowledge_baseBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation.
Requires
- Node.js 16 or newer
- OPENAI_API_KEY in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/PrettyKing/chalee-mcp-rag.git
cd chalee-mcp-rag
npm installMCP Clients
Claude Desktop
{
"mcpServers": {
"chalee-rag-server": {
"command": "node",
"args": [
"<YOUR_PATH_TO_CHALEE_MCP_RAG>/mcp-rag-server.js"
],
"env": {
"OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>"
}
}
}
}