Local-first RAG server for developers using MCP. Enables semantic and keyword search for code and technical docs. Fully private, zero setup. Ideal for operations teams needing secure, local search capabilities.
git clone https://github.com/shinpr/mcp-local-rag.gitmcp-local-rag is a local RAG (retrieval-augmented generation) server that runs entirely on your machine without sending data to external APIs. It combines semantic vector search with keyword matching to find exact technical terms like error codes and function names alongside conceptual matches. The tool supports PDF, DOCX, TXT, and Markdown files, intelligently chunks documents by meaning rather than character count, and can optionally generate captions for visual content in PDFs. Setup requires only one command—no Docker, Python, or server configuration—and works offline after the initial model download. Developers, operations teams, and technical writers benefit from secure local search over code repositories, API documentation, research papers, and internal technical specs.
["Install the MCP server locally using the provided package manager command (e.g., `npm install @modelcontextprotocol/local-rag`).","Initialize the RAG index by running `mcp-local-rag --index /path/to/codebase` to scan your project files.","Use the prompt template above in your AI assistant (e.g., Claude/ChatGPT) by replacing [TOPIC] and [CRITERIA] with your specific query.","For advanced searches, include file path filters (e.g., `/src/api/**`) or line number constraints in [CRITERIA].","Refresh the index periodically with `mcp-local-rag --reindex` to keep results up-to-date. For large codebases, schedule this as a nightly task."]
Search internal API documentation and technical specifications securely
Index code repositories and find relevant functions or patterns
Query research papers and technical papers with semantic understanding
Search error codes and logs with keyword boost for exact matches
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/shinpr/mcp-local-ragCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use the local RAG server to search for [TOPIC] in the codebase or technical documentation. Focus on finding relevant snippets, functions, or concepts that match [CRITERIA]. Provide the results in a structured format with file paths, line numbers, and a brief explanation of relevance. Example: 'Search for 'authentication middleware' in the /src/api directory and highlight functions that handle JWT validation.'
```
**Search Results for 'authentication middleware' in /src/api/**
1. **File**: /src/api/middleware/auth.js
**Line**: 42-67
**Snippet**:
```javascript
const jwt = require('jsonwebtoken');
const authenticateToken = (req, res, next) => {
const token = req.headers['authorization']?.split(' ')[1];
if (!token) return res.sendStatus(401);
jwt.verify(token, process.env.JWT_SECRET, (err, user) => {
if (err) return res.sendStatus(403);
req.user = user;
next();
});
};
```
**Relevance**: Implements JWT-based authentication middleware used in 85% of API routes.
2. **File**: /src/api/routes/userRoutes.js
**Line**: 12-18
**Snippet**:
```javascript
router.get('/profile', authenticateToken, async (req, res) => {
const user = await User.findById(req.user.id);
res.json(user);
});
```
**Relevance**: Demonstrates the middleware in action for protected routes.
**Total Matches**: 12 files found. Top 2 shown above.
```
*Generated using local RAG server (MCP) on 2024-05-20. Indexed files: 478, total tokens: 1,245,890.*IronCalc is a spreadsheet engine and ecosystem
Get more done every day with Microsoft Teams – powered by AI
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan