https://github.com/pankaj28843/docs-mcp-server
Multi-tenant Model Context Protocol server for documentation search (FastMCP + BM25 + article-extractor)
https://github.com/pankaj28843/docs-mcp-server
ai-assistant bm25 documentation documentation-search fastmcp mcp mkdocs model-context-protocol python uv
Last synced: 2 months ago
JSON representation
Multi-tenant Model Context Protocol server for documentation search (FastMCP + BM25 + article-extractor)
- Host: GitHub
- URL: https://github.com/pankaj28843/docs-mcp-server
- Owner: pankaj28843
- License: mit
- Created: 2025-12-31T09:18:26.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-01-27T16:22:16.000Z (2 months ago)
- Last Synced: 2026-01-28T02:13:08.368Z (2 months ago)
- Topics: ai-assistant, bm25, documentation, documentation-search, fastmcp, mcp, mkdocs, model-context-protocol, python, uv
- Language: Python
- Homepage: https://pankaj28843.github.io/docs-mcp-server/
- Size: 1.45 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
- awesome-mcp-servers - Javadocs.dev MCP Server - An open MCP server by Javadocs.dev that allows MCP-compatible tools to search and retrieve Java API documentation programmatically. ([Read more](/details/javadocsdev-mcp-server.md)) `java` `documentation` `api` (Documentation & Learning Resources)
README
# docs-mcp-server
**Stop AI hallucinations — give your assistant real documentation.**
A Model Context Protocol (MCP) server that provides AI assistants with access to documentation sources through a unified search API. Uses BM25 scoring with SQLite optimizations for reliable document search.
[](https://pankaj28843.github.io/docs-mcp-server/)
[](https://www.python.org/)
[](LICENSE)
## System Architecture
The server uses a consolidated DocumentationSearchEngine with a clean, simple architecture:
- **Basic search implementation**: Production-ready BM25 scoring with SQLite FTS
- **Deep module design**: Powerful functionality behind simple interface
- **Single responsibility**: Document search and retrieval without complexity
- **Unified interface**: Eliminates interface proliferation and classitis
Each documentation source is indexed using BM25 scoring with configurable boost factors and snippet generation.
## Key Features
| Feature | Description |
|---------|-------------|
| 🎯 **Multi-Tenant** | Serve unlimited documentation sources from one container |
| 🔍 **Reliable Search** | BM25 scoring with SQLite optimizations for consistent results |
| 🔄 **Auto-Sync** | Scheduled crawlers for websites, git syncs for repositories |
| 🚀 **MCP Native** | Standard tools (search, fetch, browse) for AI assistants |
| 📚 **Offline-Ready** | Filesystem tenants for local markdown collections |
---
## Quick Start
Deploy the server and test search functionality:
```bash
# Clone and install dependencies
git clone https://github.com/pankaj28843/docs-mcp-server.git
cd docs-mcp-server
uv sync
# Create configuration with sample documentation sources
cp deployment.example.json deployment.json
# Deploy server container
uv run python deploy_multi_tenant.py --mode online
# Sync documentation source (Django REST Framework example)
uv run python trigger_all_syncs.py --tenants drf --force
# Test search functionality
uv run python debug_multi_tenant.py --host localhost --port 42042 --tenant drf --test search
```
The search test returns ranked results with BM25 scores and generated snippets.
**MCP Integration**: Add to `~/.config/Code/User/mcp.json`:
```json
{
"servers": {
"TechDocs": {
"type": "http",
"url": "http://127.0.0.1:42042/mcp"
}
}
}
```
**Verification**: Ask VS Code Copilot "Search Django REST Framework docs for serializers" to see results with actual documentation URLs.
---
## Documentation Sources
Pre-configured sources in `deployment.example.json`:
| Codename | Source | Type |
|----------|--------|------|
| `django` | Django framework docs | Online (sitemap) |
| `drf` | Django REST Framework | Online (sitemap) |
| `fastapi` | FastAPI framework | Online (sitemap) |
| `python` | Python stdlib | Online (sitemap) |
| `pytest` | Pytest testing | Online (crawler) |
| `cosmicpython` | Architecture patterns | Online (crawler) |
| `mkdocs` | MkDocs docs | Git (GitHub) |
| `aidlc-rules` | AIDLC workflow rules | Git (GitHub) |
Configure additional sources by editing `deployment.json`. See [deployment.json Schema](https://pankaj28843.github.io/docs-mcp-server/reference/deployment-json-schema/).
---
## Kiro CLI Integration
This project is optimized for Kiro CLI with:
## Kiro CLI Integration
This project is optimized for Kiro CLI with:
- **Maximally permissive execution** - All tools auto-approved in safe VM environment
- **Validation hooks** - Auto-format on write, full validation on completion
- **Skills integration** - Common tasks available via `/skill` command
- **Cross-agent alignment** - Consistent behavior across Kiro, GitHub Copilot, and Gemini CLI
### Quick Commands
```bash
# Activate the agent
kiro-cli chat docs-mcp-dev
# Use skills for common tasks
/skill validate-code # Full validation loop
/skill quick-test # Unit tests with coverage
/skill format-code # Format and lint
/skill build-docs # Build documentation
/skill deploy-local # Deploy server locally
```
### Git Hooks
Pre-commit hooks automatically format code:
```bash
# Install pre-commit hooks
pre-commit install
```
Pre-push hooks run tests with coverage requirements before pushing.
---
## Documentation
| Section | Description |
|---------|-------------|
| 📚 [Tutorials](https://pankaj28843.github.io/docs-mcp-server/tutorials/getting-started/) | Step-by-step guides for new users |
| 🛠️ [How-To Guides](https://pankaj28843.github.io/docs-mcp-server/how-to/configure-git-tenant/) | Solve specific tasks |
| 📖 [Reference](https://pankaj28843.github.io/docs-mcp-server/reference/deployment-json-schema/) | Configuration schema, CLI, API |
| 💡 [Explanations](https://pankaj28843.github.io/docs-mcp-server/explanations/architecture/) | Architecture, design decisions |
---
## Contributing
See [Contributing Guide](https://pankaj28843.github.io/docs-mcp-server/contributing/) for development setup and guidelines.
---
## License
MIT License — See [LICENSE](LICENSE)