An intelligent MCP (Model Context Protocol) server that gives AI assistants like Claude and Cursor deep understanding of your project through smart documentation management.
doc-bot is a documentation server that enhances AI coding assistants by providing:
- 🧠 Smart search through your project documentation
- 📖 Contextual rules that apply based on what you're working on
- 🔄 Live updates as your documentation changes
- 📚 API references from official documentation (via Docsets)
- 🤖 MCP tools for AI agents to query and understand your project
Traditional AI assistants have limited context windows and no understanding of your specific project. doc-bot solves this by:
- Providing project-specific knowledge - Your conventions, patterns, and rules
- Searching intelligently - AI finds exactly what it needs without cluttering context
- Scaling infinitely - Thousands of docs without token limits
- Staying current - Live reload ensures AI always has latest information
doc-bot acts as a bridge between your documentation and AI assistants:
Your Project Documentation → doc-bot → MCP Protocol → AI Assistant (Claude, Cursor, etc.)
When you ask your AI assistant to write code, it can:
- Check your project's coding standards
- Search for relevant documentation
- Find API references and examples
- Follow your team's specific patterns
Add doc-bot to your AI assistant's configuration:
For Claude Desktop or Claude Code:
{
"mcpServers": {
"doc-bot": {
"command": "npx",
"args": ["@afterxleep/doc-bot@latest"]
}
}
}Location of config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
For Cursor:
- Add an
mcp.jsonfile with the contents above to your.cursorfolder
Create a doc-bot folder in your project root and add markdown files:
your-project/
├── doc-bot/
│ ├── coding-standards.md
│ ├── api-patterns.md
│ ├── testing-guide.md
│ └── architecture.md
├── src/
└── package.json
Replace all rules and instructions for your Agent (cursor.mdc, CLAUDE.md, etc) with Doc Bot Core Rule AGENT INTEGRATION RULE.
Ask your AI assistant: "What are the coding standards for this project?"
doc-bot treats your project documentation as a searchable knowledge base for AI assistants.
Create markdown files with frontmatter metadata:
---
title: "React Component Guidelines"
description: "Standards for building React components"
keywords: ["react", "components", "frontend", "jsx"]
---
# React Component Guidelines
- Use functional components with hooks
- Follow PascalCase naming
- Keep components under 200 lines
- Write tests for all components| Field | Type | Description | Example |
|---|---|---|---|
title |
string | Document title (required) | "API Guidelines" |
description |
string | Brief description | "REST API design patterns" |
keywords |
array | Search keywords | ["api", "rest", "http"] |
alwaysApply |
boolean | Apply to all queries | true/false |
filePatterns |
array | Apply to specific files | [".test.js", "**/.spec.ts"] |
- Intelligent Parsing - Queries are parsed, stop words removed
- Multi-field Matching - Searches title, description, keywords, and content
- Relevance Scoring - Results ranked by relevance (exact matches score highest)
- Context Extraction - Returns snippets showing matched content
---
title: "Coding Standards"
alwaysApply: true
---
Rules that apply to every file in your project---
title: "Testing Guide"
filePatterns: ["*.test.js", "*.spec.ts"]
---
Documentation that only applies to test files---
title: "Database Schema"
keywords: ["database", "postgres", "schema", "migrations"]
---
Documentation found through search queriesdoc-bot can also search official API documentation from Docsets, giving your AI assistant access to comprehensive framework and library references.
Docsets are pre-built documentation databases containing official docs for:
- Programming languages (Python, JavaScript, Go, etc.)
- Frameworks (React, Vue, Django, Rails, etc.)
- Libraries (NumPy, Express, jQuery, etc.)
- Platforms (iOS, Android, AWS, etc.)
-
Option A: Ask your AI assistant to install directly:
From a URL:
Use the add_docset tool to install Swift documentation from https://kapeli.com/feeds/Swift.tgzFrom a local file:
Use the add_docset tool to install the docset at /Users/me/Downloads/React.docset -
Manage your docsets:
List all installed docsets Remove docset with ID abc123Docsets are automatically stored in
~/Developer/DocSetsby default.
- User Contributed Docsets: https://github.com/Kapeli/Dash-User-Contributions
- Docset Generation Tools: https://github.com/Kapeli/docset-generator
Popular docsets available:
- Programming Languages: Python, JavaScript, Go, Rust, Swift
- Web Frameworks: React, Vue, Angular, Django, Rails
- Mobile: iOS, Android, React Native, Flutter
- Databases: PostgreSQL, MySQL, MongoDB, Redis
- Cloud: AWS, Google Cloud, Azure
- Configure custom path (optional):
{ "mcpServers": { "doc-bot": { "command": "npx", "args": ["@afterxleep/doc-bot@latest", "--docsets", "/path/to/docsets"] } } }
- Unified Search: One query searches both your docs and API docs
- Smart Prioritization: Your project docs are boosted 5x in relevance
- API Exploration: Use
explore_apitool to discover related classes, methods - Performance: Parallel search across multiple docsets with caching
doc-bot provides these tools to AI assistants:
| Tool | Purpose | Example Use |
|---|---|---|
check_project_rules |
Get rules before writing code | "What patterns should I follow?" |
search_documentation |
Search all documentation | "How do I implement auth?" |
get_global_rules |
Get always-apply rules | "What are the coding standards?" |
get_file_docs |
Get file-specific docs | "Rules for Button.test.jsx" |
explore_api |
Explore API documentation | "Show me URLSession methods" |
add_docset |
Install new docset | "Add Swift docs from URL" |
remove_docset |
Remove installed docset | "Remove docset abc123" |
list_docsets |
List all docsets | "Show installed docsets" |
doc-bot [options]
Options:
-d, --docs <path> Path to docs folder (default: ./doc-bot)
-s, --docsets <path> Path to docsets folder (default: ~/Developer/DocSets)
-v, --verbose Enable verbose logging
-w, --watch Watch for file changes
-h, --help Display help{
"mcpServers": {
"doc-bot": {
"command": "npx",
"args": [
"@afterxleep/doc-bot@latest",
"--docs", "./documentation",
"--docsets", "/Library/Application Support/Dash/DocSets",
"--verbose",
"--watch"
]
}
}
}- API Reference - Complete reference for all MCP tools
- Architecture Guide - Technical architecture and components
- Configuration Guide - All configuration options
- Troubleshooting Guide - Common issues and solutions
- Examples & Best Practices - Real-world usage examples
- Contributing Guide - How to contribute to doc-bot
-
Use descriptive titles and keywords
--- title: "Authentication Flow" keywords: ["auth", "login", "jwt", "security", "authentication"] ---
-
Apply rules contextually
--- filePatterns: ["**/auth/**", "*.auth.js"] ---
-
Keep docs focused - One topic per file
-
Include examples - Show, don't just tell
- Include synonyms in keywords:
["test", "testing", "spec", "jest"] - Use clear section headers for better snippet extraction
- Add descriptions to improve search relevance
Unlike static .cursorrules or .github/copilot-instructions.md files:
- Dynamic: AI searches for what it needs instead of reading everything
- Scalable: Unlimited docs without token limits
- Intelligent: Context-aware documentation based on current file
- Unified: Works with any MCP-compatible AI tool
- Live: Hot reload on documentation changes
See our Contributing Guide for development setup and guidelines.
MIT - See LICENSE for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built with ❤️ in Spain