localrag
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@localragsearch my notes for ideas on project planning"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
localrag
Zero-dependency local semantic search over your own files — plus a tiny MCP server so Claude (or any MCP client) can search them as a tool.
Nothing leaves your machine. Embeddings come from any OpenAI-compatible endpoint; point it at Ollama, LM Studio, llama.cpp, or vLLM running locally.
No dependencies. Pure standard library —
urllib,json,math. The index is one JSON file; search is plain cosine similarity.Two ways in: a
localragCLI, and an MCP server (search_docstool).
Install
pip install localragRelated MCP server: RAG MCP Server
Quick start
Assuming Ollama with an embedding model:
ollama pull nomic-embed-text
localrag build ~/notes ~/docs # index your files (.md/.txt/.rst)
localrag query "what did I decide about the deploy pipeline?"
localrag query "deploy pipeline" --answer # retrieve + let a chat model answerOutput:
=== top 5 for: deploy pipeline ===
[1] (0.812) notes/ops.md
We settled on blue/green with a manual approval gate before cutover...Use it from Claude / any MCP client (the search_docs tool)
Run the server:
python -m localrag.mcp_serverRegister it with an MCP client. For Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"localrag": {
"command": "python",
"args": ["-m", "localrag.mcp_server"],
"env": { "LOCALRAG_INDEX": "/home/you/notes/localrag-index.json" }
}
}
}Now the model can call search_docs("...") to ground its answers in your notes.
Configuration
All optional — sensible local defaults out of the box.
Env var | Meaning | Default |
| OpenAI-compatible base URL (incl. |
|
| embedding model |
|
| base URL for | = |
| chat model for |
|
| bearer token, if your server needs one | (none) |
| index file path |
|
Using a hosted endpoint instead of local? Point LOCALRAG_EMBED_URL at it and
set LOCALRAG_API_KEY — the same code path works with the OpenAI API.
How it works
Chunk — files are split on blank lines into ~800-char blocks with a small overlap so context isn't cut mid-thought.
Embed — each chunk is embedded once and stored with its vector in a JSON index.
Search — the query is embedded and ranked against every chunk by cosine similarity. For
--answer, the top chunks become the sole context for a grounded reply.
Small corpora (thousands of chunks) are the sweet spot: no database, no server, just a file you can commit or delete.
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceProvides semantic search and management of shared documentation using ChromaDB and OpenAI embeddings. It enables users to query local documents by meaning, list files, and read content through natural language tools.
- Flicense-qualityDmaintenanceProvides tools for ingesting documents into a local vector database and retrieving relevant information via semantic search, enabling retrieval-augmented generation for MCP clients.6
- FlicenseAqualityBmaintenanceA local-first document retrieval engine that mounts as an MCP tool for agents to index files, search for relevant passages, and let the agent's own LLM answer.4
- Alicense-qualityBmaintenanceEnables semantic search over a local knowledge base using MCP tools, allowing AI clients to retrieve relevant document chunks via the search_knowledge tool.162MIT
Related MCP Connectors
Agentic search over your Dewey document collections from any MCP-compatible client.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shotaro-kajiyama/localrag'
If you have feedback or need assistance with the MCP directory API, please join our Discord server