Document Search MCP Server
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., "@Document Search MCP ServerSearch my documents for the meal reimbursement policy."
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.
Document Search — an MCP server
Wraps document ingestion and retrieval (the same chunking + Voyage embedding + Chroma logic from Project 2) as an MCP server — so Claude Desktop or Claude Code can search your own documents directly, as a native tool call, instead of you running a separate CLI.
This is Project 4 in a self-directed AI engineering learning path. It builds on Project 2 (RAG) and Project 3 (tool use) — MCP is essentially "tool use, standardized so any client can use your tools, not just code you wrote yourself."
The key design decision, and why it matters
Unlike Project 2's doc_chat.py, this server never calls the Claude
API to generate an answer. It only retrieves and returns relevant
chunks. This is intentional, not a missing feature:
When Claude Desktop (or Claude Code) calls search_documents, it's
already a Claude model in the loop — the client itself. It receives
the retrieved chunks as a tool result and writes the final answer using
its own reasoning, the same way it would use any other tool's output.
Having the server also call Claude to generate an answer would be
redundant — two models doing the same generation job — and would take
control away from the client, which is supposed to decide how to use
retrieved context, not just relay someone else's answer.
This is the real shift MCP represents: in Project 2, you wrote the code that calls Claude. In Project 4, Claude is the code calling your tool. The server's only job is to be a good, honest data source.
Related MCP server: mcp-context
Setup
pip install -r requirements.txt$env:VOYAGE_API_KEY = "your-voyage-key"(No ANTHROPIC_API_KEY needed for the server itself — see above. You'll
still need one configured wherever Claude Desktop/Code itself runs, but
that's separate from this server.)
Connecting it to Claude Code
claude mcp add doc-search -- python /full/path/to/mcp_doc_server.pyUse the full absolute path to the script — relative paths won't resolve correctly once Claude Code launches it as a subprocess from a different working directory.
Then, in a Claude Code session, you can just ask naturally:
"Ingest the documents in ./sample_docs, then tell me the meal reimbursement policy."
Claude Code will call ingest_documents, then search_documents, then
write the answer itself — the same multi-step tool chaining you saw in
Project 3, except now the tool is your own MCP server instead of a
Python function baked into the same script.
Connecting it to Claude Desktop
Add this to your Claude Desktop MCP config file (claude_desktop_config.json
— check Claude Desktop's settings for its exact location on your system):
{
"mcpServers": {
"doc-search": {
"command": "python",
"args": ["/full/path/to/mcp_doc_server.py"],
"env": {
"VOYAGE_API_KEY": "your-voyage-key"
}
}
}
}Restart Claude Desktop after editing the config. You should see "doc-search" appear as an available tool source in the app.
Testing without a live MCP client
fastmcp ships an in-process test client, which is what verified this
server before you ever connect it to Claude Desktop:
import asyncio
from fastmcp import Client
from mcp_doc_server import mcp
async def main():
async with Client(mcp) as client:
tools = await client.list_tools()
print(tools)
asyncio.run(main())This calls the real MCP protocol layer — tool discovery, schema generation, invocation — without needing a full Claude Desktop install or a live API key, which is how the error-path behavior was verified during development.
Design notes
Tool docstrings are the interface, more so than in Project 3. With direct API tool use, you write a separate
descriptionfield. Withfastmcp, the Python docstring is the description the client sees — meaning writing a clear, accurate docstring isn't just good Python practice here, it's the actual mechanism by which Claude decides when and how to call your tool.Global client caching (
_voyage_client,_collection). MCP servers are typically long-running processes (started once, called many times), unlike a CLI script that runs once and exits. Creating a new Voyage client or Chroma connection on every single tool call would be wasteful; lazy-initializing them once and reusing them across calls is the correct pattern for a persistent server.Tools return strings, not raising exceptions, for expected error cases (missing folder, empty collection) — same philosophy as Project 3's
execute_tool. The calling model needs to see and reason about a failure, not have the whole server crash.
What's next
Add a
list_ingested_sourcestool so the client can check what's already searchable before deciding whether to re-ingest.Add authentication if this were ever exposed over network transport instead of run locally via stdio.
Package as a proper installable MCP server others could add to their own Claude Desktop config without cloning the repo.
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-qualityDmaintenanceA local-first MCP server that enables semantic search over PDF and DOCX documents using structure-aware parsing and vector storage. It allows users to query their local knowledge base through Claude Code without cloud dependencies or GPU requirements.
- Flicense-qualityDmaintenanceLocal MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.
- Alicense-qualityDmaintenanceLocal MCP server that indexes folders of documents into a hybrid vector + keyword search index for Claude Desktop, with support for PDFs, Office files, and images via OCR.MIT
- Flicense-qualityCmaintenanceMCP server enabling Claude Desktop to answer questions from local Word and PDF documents by searching a vector index built from their contents.
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
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/suhasdesai02/mcp-doc-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server