mcp-doc-search
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., "@mcp-doc-searchSearch docs for onboarding checklist and retrieve the full document"
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.
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 |
| Ranks documents in the docs folder against a query and returns top matches with snippets and scores. |
| Returns the full text of a document by id, for citation or deeper reading. |
Related MCP server: directory-indexer
Quick start
npm install
npm run build
DOCS_DIR=./docs npm startThe 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
Available Tools
2 toolsget_documentGet documentA
Return the full text of a document by its id (filename), for citation or deeper reading.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document id, e.g. a filename returned by search_docs |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so description carries full burden. It indicates read-only behavior by 'Return the full text' but does not disclose error handling, auth requirements, or rate limits. Minimal behavioral context beyond purpose.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence efficiently conveys action, subject, and purpose without redundancy. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool is simple with one parameter and clear purpose. Description covers use case and expected input. No output schema, but return type is implied as 'full text'. Complete for this context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with description of id as 'Document id, e.g. a filename returned by search_docs'. The tool description adds 'for citation or deeper reading' but no new parameter-specific information beyond the schema. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states verb 'Return' and resource 'full text of a document', specifying the identifier (id as filename) and use case (citation or deeper reading). It distinguishes from sibling search_docs, which is for searching, by focusing on retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'for citation or deeper reading' implies use after search_docs, but no explicit when-to-use or when-not-to-use guidance is provided. It gives context but lacks exclusions or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_docsSearch documentsA
Search the local document set for a query and return the most relevant documents with snippets. Use this to ground answers in real sources before responding.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language query or keywords | |
| limit | No | Max results |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns 'snippets' but does not elaborate on ordering, pagination, authentication, or scope constraints beyond 'local document set'. This is adequate but not fully transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no extraneous words. The first sentence states the core function, and the second provides usage guidance. It is front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 parameters, no output schema, one sibling), the description covers the main purpose and usage context. However, it lacks explicit details about the output structure (e.g., format of snippets), which would be beneficial since no output schema is provided.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents both parameters. The description does not add any semantic detail beyond what the schema provides, such as clarifying the nature of snippets or the meaning of the limit parameter. Thus, baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly specifies the verb 'search' and resource 'local document set', and distinguishes from the sibling tool 'get_document' by implying it is for retrieval of specific documents, while search_docs is for searching and returning snippets.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Use this to ground answers in real sources before responding', providing clear context for when to use the tool. However, it does not explicitly state when not to use it or mention alternatives like get_document.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The two tools have completely distinct purposes: one for searching documents with snippets, the other for retrieving full text by ID. No ambiguity exists.
Both names follow a consistent verb_noun pattern in snake_case (search_docs, get_document), making them predictable and easy to distinguish.
With only two tools, the server is minimal but adequately scoped for a focused document search and retrieval purpose. It is slightly thin but not inappropriate.
The tool surface covers the essential workflow for a read-only document search: searching and retrieving full documents. No obvious gaps for its stated purpose.
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 Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Securely search and manage workspace context files for AI agents and teams.
Ingest, manage, and retrieve documents for RAG-powered AI applications
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Related MCP Servers
- FlicenseBqualityDmaintenanceProvides intelligent retrieval capabilities for local files by scanning directories, generating vector indexes, and enabling semantic search through RAG (Retrieval Augmented Generation) with incremental indexing support.2
- AlicenseNot gradedqualityCmaintenanceProvides AI assistants with semantic search and read access to local files and directories, enabling knowledge retrieval from indexed content.1516MIT
- FlicenseNot gradedqualityDmaintenanceEnables retrieval-augmented generation by allowing LLMs to search documents in a local folder using vector similarity, supporting multiple file formats.
- AlicenseAqualityCmaintenanceProvides LLMs with secure, read-only access to local documentation by scanning directories, extracting content from PDF, DOCX, Markdown, and text files, and performing keyword searches.314MIT
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/anujmv/mcp-doc-search'
If you have feedback or need assistance with the MCP directory API, please join our Discord server