local-docs-mcp
Uses Ollama's embedding models to generate document embeddings for semantic search of local documentation.
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., "@local-docs-mcpsearch for 'hybrid search' in my local documentation"
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.
Local Docs MCP
A modular semantic search system with MCP (Model Context Protocol) integration for searching local documentation. The Retrieval-Augmented Generation (RAG) system not only lets you manage document chunks for knowledge retrieval but also gives AI assistants semantic search capabilities through the MCP.
Key Features
Core Capability | Technical Implementation |
Document Indexing | A full indexing pipeline that processes documents from the |
Vector Database | Uses Qdrant to store document embeddings for semantic search. |
Retrieval | The search service provides semantic search capabilities with multiple strategies (semantic, hybrid, and filtered). |
MCP Integration | The MCP server exposes these retrieval capabilities to AI assistants. |
Related MCP server: RAG Database MCP Server
Quick Start
Installation
Clone and setup the project:
git clone git@github.com:nguyenchiencong/local-docs-mcp.git
cd local-docs-mcpStart required services:
# Start Qdrant
docker run -d -p 6334:6334 -p 6333:6333 qdrant/qdrant
# Make sure Ollama is running with the embedding model
ollama pull hf.co/Qwen/Qwen3-Embedding-0.6B-GGUF:F16
# Setup postgres for cocoindex
docker compose -f <(curl -L https://raw.githubusercontent.com/cocoindex-io/cocoindex/refs/heads/main/dev/postgres.yaml) up -dConfigure environment:
# Edit .env with your specific configuration
cp .env.example .env
# Don't forget to setup your .cocoignore file
cp .cocoignore.example .cocoignoreInstall dependencies:
uv syncUsage
Before indexing, add your documents to the docs folder.
To index your documents:
uv run python -m src.indexing.main_flow
# To run the force reindex utility
uv run python -m src.indexing.force_reindexTo start the MCP server:
uv run python -m src.mcp_server.serverMake the CLI available on your PATH
If you want to run local-docs-mcp from any directory:
Windows (PowerShell):
setx PATH "path\to\local-docs-mcp\.venv\Scripts;$($env:Path)"Linux/macOS (bash/zsh):
echo 'export PATH="/path/to/local-docs-mcp/.venv/bin:$PATH"' >> ~/.bashrc
To run MCP tools directly from the CLI (one-off calls):
# Start the server (default behavior)
local-docs-mcp
# Run a semantic search once and exit
local-docs-mcp semantic_search --query "vector search overview" --limit 5
# Run hybrid search
local-docs-mcp hybrid_search --query "async await" --semantic-weight 0.7 --limit 5
# Run a filtered search with metadata (JSON object)
local-docs-mcp search_with_metadata_filter --query "UI tutorial" --metadata-filter '{"filename": "ui.md"}' --limit 5
# Retrieve a specific document by ID
local-docs-mcp document_retrieval --document-id "doc-123"
# Fetch collection info
local-docs-mcp get_collection_info --jsonConfiguration
System Settings
All configuration is managed in pyproject.toml under the [tool.local-docs] section:
[tool.local-docs]
# Qdrant configuration
qdrant_url = "http://localhost:6334"
qdrant_collection = "local-docs-collection"
# Ollama configuration
ollama_url = "http://localhost:11434"
ollama_model = "hf.co/Qwen/Qwen3-Embedding-0.6B-GGUF:F16"
embedding_dimension = 1024
# Document configuration
docs_directory = "docs"
supported_extensions = [".md", ".rst", ".txt"]
# Search configuration
search_limit = 10
# Chunking configuration
chunk_size = 1200
chunk_overlap = 200
# Search configuration
search_limit = 10
similarity_threshold = 0.15
search_hnsw_ef = 256
hybrid_semantic_weight = 0.85
mmr_lambda = 0.75Environment Variables: Override any setting with LOCAL_DOCS_* environment variables:
export LOCAL_DOCS_SEARCH_LIMIT=20
export LOCAL_DOCS_OLLAMA_MODEL="different-model"MCP Client Setup
Add this to your MCP client configuration (e.g., Claude Code):
{
"mcpServers": {
"local-docs-mcp": {
"command": "uv",
"args": ["run", "--project", "/path/to/local-docs-mcp", "-m", "src.mcp_server.server"]
}
}
}MCP Tools
The MCP server exposes the following semantic search tools to AI assistants:
Tool | Purpose | Parameters | Example Prompt |
| Perform semantic search on indexed documents. Finds content based on meaning and context rather than exact keywords. |
| "Find information about error handling patterns in the codebase" |
| Combine semantic search with keyword matching. Useful when exact terminology matters alongside conceptual meaning. |
| "Search for 'async await' patterns and asynchronous programming concepts" |
| Retrieve complete document by ID. Use this when you need the full context of a specific document found in search results. |
| "Get the full document for ID 'doc_12345'" |
| Search with metadata constraints. Use this to narrow down search results by specific document properties. |
| "Search for API documentation in files with filename containing 'api'" |
| Get information about the indexed document collection, including statistics and status. | none | "Show me collection statistics and indexing status" |
Use cases
Documentation Research:
"What are signals and how do they work in Godot?"
"Find tutorials about character controllers"
"Explain the difference between KinematicBody and RigidBody"
Problem Solving:
"How do I fix 'node not found' errors?"
"What are the best practices for performance optimization?"
"Search for debugging techniques in Godot"
Learning Paths:
"I'm a beginner, show me getting started content"
"What should I learn after basic GDScript?"
"Find intermediate tutorials about physics"
Specific Searches:
"Show me the top 5 most relevant results about animations"
"Find only tutorial files about UI design"
"Look for performance optimization guides"
Development
Running Tests
uv run pytest tests/Contributing
Fork the repository
Create a feature branch
Add tests for new functionality
Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Related Projects
CocoIndex - Document indexing and processing
Qdrant - Vector database for similarity search
Ollama - Local AI model serving
Model Context Protocol - Standard for AI tool integration
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.
Latest Blog Posts
- 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/nguyenchiencong/local-docs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server