mcp server
raglite
TypeScript RAG toolkit for semantic search, multi-provider LLM Q&A, and document APIs.
Set up
Runs on your computer. Pick your agent and operating system.
Before you start
- Node.js 20 or newer
{
"mcpServers": {
"creatorpiyush-raglite": {
"command": "npx",
"args": [
"-y",
"raglite-toolkit"
]
}
}
}same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12
Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs
README
synced Oct 14, 2026raglite-toolkit
Semantic search, cited answers, an MCP server and agent tools over your documents, in a few lines of TypeScript.
Documentation · Getting started · Providers · MCP server · Troubleshooting · Changelog
RAGLite indexes PDFs, Word files, Markdown, text, JSON, folders and web pages, then searches them and answers questions with any LLM, citing the passages it used.
- Answers with citations, including the PDF page and Markdown section of each passage
- Hybrid search: vector search for meaning, BM25 for exact terms such as error codes, or both
- Metadata filters and reranking, and
raglite evalto measure retrieval on your own questions - MCP server for Claude Code, Claude Desktop, Cursor and VS Code, and an AI SDK tool for your own agents
- Any provider: OpenAI, Anthropic, Google, Mistral, Cohere, Groq, xAI and Ollama; install only what you use
- Fully local option: local embeddings and Ollama, no API key
- Content-hash caching, Qdrant, Pinecone and LanceDB stores, streaming, a REST API and a CLI
Install
Requires Node.js 20 or later.
npm install raglite-toolkit
npm install @huggingface/transformers # local embeddings (the default), no API key
npm install @ai-sdk/anthropic # Claude answers; see Providers for the others
Quick start
import { Document } from "raglite-toolkit";
const doc = new Document("./policy.pdf", {
llm: { provider: "anthropic", apiKey: process.env.ANTHROPIC_API_KEY },
});
await doc.build();
const hits = await doc.search("refund policy", { topK: 3 });
const answer = await doc.ask("What is the refund policy?");
console.log(answer.text); // "Refunds are issued within 30 days [1]."
console.log(answer.citations); // [{ n: 1, source: "policy.pdf", page: 12, text: "..." }]
Learn more
- Collections: index folders, files and URLs together
- Citations: pages and sections for each cited passage
- Hybrid search: vector, keyword and hybrid retrieval
- Metadata filters: search one customer's documents or a range of pages
- Reranking: Cohere, Voyage, an LLM or your own function
- Evaluating retrieval:
raglite evalscores recall@k, MRR and hit rate on your questions - MCP server: give your documents to AI coding tools
- Agent tools:
asTool()for the Vercel AI SDK - Streaming, progress and cancellation
- Vector stores: Qdrant, Pinecone, LanceDB or your own
- REST API and CLI
- How caching works
- Options and types
Python
The same library for Python: raglite-toolkit on PyPI (source). Every page of the documentation has TypeScript and Python tabs.
Contributing
See CONTRIBUTING.md. Security issues: SECURITY.md.
License
MIT