A TypeScript-based Model Context Protocol (MCP) server that provides document management and semantic search capabilities. Upload documents, search them with AI embeddings, and integrate seamlessly with MCP clients like Claude Desktop.
# Run directly with npx (recommended)
npx @andrea9293/mcp-documentation-server
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"documentation": {
"command": "npx",
"args": [
"-y",
"@andrea9293/mcp-documentation-server"
],
"env": {
"MCP_EMBEDDING_MODEL": "Xenova/all-MiniLM-L6-v2"
}
}
}
}
- Add documents: Upload text/markdown files or add content directly
- Search documents: Use semantic search to find relevant information
- Manage content: List, retrieve, and organize your documents
- 📄 Document Management - Add, list, retrieve, and delete documents with metadata
- 🔍 Semantic Search - AI-powered search using embeddings
- 📁 File Upload - Drop .txt/.md/.pdf files in uploads folder for processing
- 🧩 Smart Chunking - Automatic text splitting for better search accuracy
- 🗑️ Document Deletion - Clean removal of documents and their chunks
- 🌍 Multilingual - Supports multiple languages with quality embeddings
- 💾 Local Storage - All data stored locally in
~/.mcp-documentation-server/
directory - ⚡ Fast Setup - No database required, works out of the box
Tool | Description |
---|---|
add_document |
Add a document with title, content, and metadata |
search_documents |
Search for chunks within a specific document |
list_documents |
List all documents with their metadata |
get_document |
Retrieve a complete document by ID |
delete_document |
Delete a document by ID (removes all associated chunks) |
get_uploads_path |
Get path to uploads folder |
list_uploads_files |
List files in uploads folder |
process_uploads |
Process uploaded files into documents |
{
"tool": "add_document",
"arguments": {
"title": "Python Basics",
"content": "Python is a high-level programming language...",
"metadata": {
"category": "programming",
"tags": ["python", "tutorial"]
}
}
}
{
"tool": "search_documents",
"arguments": {
"document_id": "doc-123",
"query": "variable assignment",
"limit": 5
}
}
{
"tool": "delete_document",
"arguments": {
"id": "doc-123"
}
}
- Get uploads path:
get_uploads_path
(~/.mcp-documentation-server/uploads/
) - Place your .txt/.md/.pdf files in that folder
- Process files:
process_uploads
- Search the processed documents
Supported file types:
- .txt - Plain text files
- .md - Markdown files
- .pdf - PDF files (text extraction, no OCR)
All documents and uploads are stored locally in:
~/.mcp-documentation-server/
├── data/ # Document storage (JSON files)
└── uploads/ # Files to process (.txt, .md, .pdf)
Set via MCP_EMBEDDING_MODEL
environment variable:
Xenova/all-MiniLM-L6-v2
(default) - Fast, good qualityXenova/paraphrase-multilingual-mpnet-base-v2
(recommended) - Best quality, multilingual
npx @andrea9293/mcp-documentation-server
npm install -g @andrea9293/mcp-documentation-server
mcp-documentation-server
git clone https://github.com/andrea9293/mcp-documentation-server.git
cd mcp-documentation-server
npm install
npm run build
npm start
- Use descriptive titles for easy identification
- Add relevant metadata (tags, categories) for better organization
- Keep documents focused on specific topics for better search accuracy
- Use specific, descriptive search queries
- Combine keywords related to your topic
- Start with broader queries, then refine with more specific terms
- Process large files during off-peak hours (initial embedding creation)
- Use smaller embedding models for faster performance if quality is acceptable
- Regularly clean up unused documents to maintain performance
- Cause: Embedding models download on first use (~420MB for best model)
- Solution: Wait for background download to complete, or use smaller model initially
- Cause: Mixed embedding models in same dataset
- Solution: Stick to one model or re-add all documents after switching
# Development server with hot reload
npm run dev
# Build and test
npm run build
# Inspect tools with web UI
npm run inspect
- Fork the repository
- Create feature branch:
git checkout -b feature/name
- Follow Conventional Commits for messages
- Submit pull request
MIT - see LICENSE file
Built with FastMCP and TypeScript 🚀