mcp-doc-search
Enables searching and retrieving documents from a local folder to ground LLM answers in your files.
README
mcp-doc-search
A small Model Context Protocol (MCP) server that gives
an LLM grounded search and retrieval over a local folder of documents. The model calls
search_docs to find relevant sources, then get_document to read and cite them, so
answers stay grounded in your files instead of the model's memory.
Built as a focused, forward-deployed pattern: the simplest thing that makes retrieval real and citable, ready to drop into an enterprise workflow and extend with embeddings or evals.
Tools
| Tool | What it does |
|---|---|
search_docs |
Ranks documents in the docs folder against a query and returns top matches with snippets and scores. |
get_document |
Returns the full text of a document by id, for citation or deeper reading. |
Quick start
npm install
npm run build
DOCS_DIR=./docs npm start
The server speaks MCP over stdio, so it is launched by an MCP client rather than used directly.
Use with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"doc-search": {
"command": "node",
"args": ["/absolute/path/to/mcp-doc-search/dist/index.js"],
"env": { "DOCS_DIR": "/absolute/path/to/your/docs" }
}
}
}
Then ask Claude something answerable from your docs, for example: "Search the docs for the KYC retry policy and cite the source."
How it works
- On startup the server indexes every
.md/.txtfile inDOCS_DIR. search_docsscores documents with a term-frequency relevance measure and returns ranked snippets.get_documentreturns full text for citation.
Scoring is intentionally simple. The point is the grounded retrieval contract, which is swappable for vector embeddings without changing the tool interface.
Roadmap
- Vector embeddings + chunking for semantic search
- PDF ingestion with OCR for scanned documents
- A small eval set to measure answer groundedness
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.