doc-bot
doc-bot is an intelligent MCP server that empowers AI assistants with deep project understanding through smart documentation management and API reference integration.
Core Capabilities:
Smart Documentation Search: Search project docs and API references using technical terms with intelligent relevance scoring (project docs boosted 5x)
Context-Aware Guidance: Get file-specific documentation, task-specific requirements, and project-wide coding standards based on your current work context
Continuous Compliance Monitoring: Use
doc_bot()andcheck_project_rules()at decision points to ensure alignment with project standards throughout developmentAPI Documentation (Docsets): Install, search, and explore official framework/library documentation with deep dives into methods, properties, and usage examples
Agent-Driven Documentation: Create and update documentation as new patterns and architectural decisions are discovered during development
Documentation Management: List, read, refresh, and manage documentation files with live reload support and file watching
Unified Search: Single interface across project documentation and API references with pagination for large result sets
Key Features: File pattern matching for contextual docs, automatic reload when files change externally, global and task-specific rule retrieval, and compatibility with MCP-enabled AI assistants like Claude and Cursor.
Provides access to Dash/Kapeli docsets for searching official API documentation across programming languages, frameworks, and libraries. Supports installing docsets from URLs or local files, managing installed docsets, and exploring API references.
Click on "Deploy 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., "@doc-bot What are our React component naming conventions?"
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.
doc-bot
An intelligent MCP (Model Context Protocol) server that gives AI assistants like Claude and Cursor deep understanding of your project through smart documentation management.
What is doc-bot?
doc-bot is a documentation server that enhances AI coding assistants by providing:
π§ Smart search through your project documentation
π Contextual docs that surface guidance 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
βοΈ Agent-driven updates so new knowledge is captured in docs
Related MCP server: AI Development Guidelines MCP Server
Why doc-bot?
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 decisions
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
How It Works
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:
Search for relevant documentation
Read project docs for patterns and examples
Find API references and examples
Update documentation when new patterns are discovered
Quick Start
1. Install doc-bot
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.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
For Cursor:
Add an
mcp.jsonfile with the contents above to your.cursorfolder
2. Create Your Documentation
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.json3. Test it!
Ask your AI assistant: "What are the coding standards for this project?"
Versioning and Compatibility
doc-bot 2.0 is a breaking change. Rule enforcement is removed in favor of documentation-first guidance. As a legacy fallback, docs marked alwaysApply: true (or always_apply: true) are surfaced in the system prompt and get_file_docs results.
If you need the legacy rule enforcement flow, pin to
@afterxleep/doc-bot@1or build from the1.xbranch.New installs should use the latest 2.x line (
@afterxleep/doc-bot@latest).
Project Documentation
doc-bot treats your project documentation as a searchable knowledge base for AI assistants.
Agent-Driven Updates
doc-bot is designed for agents to keep documentation current as they work. When an assistant discovers a new pattern or a change, it can add or update docs directly:
{
"fileName": "auth-flow.md",
"title": "Auth Flow",
"description": "OAuth flow and token handling",
"keywords": ["auth", "oauth", "tokens"],
"filePatterns": ["src/auth/**"],
"content": "# Auth Flow\n\nDocument the new flow here."
}Agent Documentation Loop
Use this fast loop to extend project knowledge and keep docs current:
Orient quickly: call
doc_bot(task)orget_document_index()when the project is unfamiliar.Find specifics: use
search_documentationwith concrete terms (API names, class names, errors).Read the full context: open matches with
read_specific_documentorget_file_docs.Capture new knowledge: when behavior changes or new patterns emerge, write it with
create_or_update_rule.Refresh when needed: if docs are edited manually, run
refresh_documentation().
Keep docs short, scoped, and searchable with clear titles, keywords, and filePatterns.
Documentation Format
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 componentsFrontmatter Options
Field | Type | Description | Example |
| string | Document title (required) | "API Guidelines" |
| string | Brief description | "REST API design patterns" |
| array | Search keywords | ["api", "rest", "http"] |
| array | Optional topical tags | ["architecture", "backend"] |
| array | Apply to specific files | [".test.js", "**/.spec.ts"] |
| boolean | Always include this doc in system prompt + file docs (alias: | true |
How Search Works
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)
Compact Results - Returns titles, paths, descriptions, scores, and matched terms only
doc-bot surfaces documentation for agents; it does not enforce rules. Docs marked alwaysApply: true are always surfaced for agents. Agents should update docs when new patterns or changes appear.
Types of Documentation
General Documentation
---
title: "Coding Standards"
---
Project-wide guidance and conventionsContextual Documentation
---
title: "Testing Guide"
filePatterns: ["*.test.js", "*.spec.ts"]
---
Documentation that only applies to test filesSearchable References
---
title: "Database Schema"
keywords: ["database", "postgres", "schema", "migrations"]
---
Documentation found through search queriesDocsets (API Documentation)
doc-bot can also search official API documentation from Docsets, giving your AI assistant access to comprehensive framework and library references.
What are Docsets?
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.)
Setting Up Docsets
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.docsetManage your docsets:
List all installed docsets Remove docset with ID abc123Docsets are automatically stored in
~/Developer/DocSetsby default.
Docset Sources
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"] } } }
How Docset Search Works
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, methodsPerformance: Parallel search across multiple docsets with caching
Available Tools
doc-bot provides these tools to AI assistants:
Tool | Purpose | Example Use |
| Get documentation guidance | "How should I approach auth?" |
| Search all documentation | "How do I implement auth?" |
| Get file-specific docs | "Docs for Button.test.jsx" |
| Read full docs by file name | "Open coding-standards.md" |
| List all docs | "Show documentation index" |
| Add/update documentation | "Capture auth flow update" |
| Reload docs from disk | "Refresh the doc store" |
| Explore API documentation | "Show me URLSession methods" |
| Install new docset | "Add Swift docs from URL" |
| Remove installed docset | "Remove docset abc123" |
| List all docsets | "Show installed docsets" |
Configuration Options
CLI Options
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 helpAdvanced Configuration
{
"mcpServers": {
"doc-bot": {
"command": "npx",
"args": [
"@afterxleep/doc-bot@latest",
"--docs", "./documentation",
"--docsets", "/Library/Application Support/Dash/DocSets",
"--verbose",
"--watch"
]
}
}
}Documentation
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
Best Practices
Writing Effective Documentation
Use descriptive titles and keywords
--- title: "Authentication Flow" keywords: ["auth", "login", "jwt", "security", "authentication"] ---Use file patterns for contextual docs
--- filePatterns: ["**/auth/**", "*.auth.js"] ---Keep docs focused - One topic per file
Include examples - Show, don't just tell
Optimizing Search
Include synonyms in keywords:
["test", "testing", "spec", "jest"]Use clear section headers so matching stays accurate
Add concise descriptions because search results show descriptions, not body content
Why MCP over Static Instruction Files?
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
Contributing
See our Contributing Guide for development setup and guidelines.
License
MIT - See LICENSE for details.
Support
Issues: GitHub Issues
Discussions: GitHub Discussions
Releases
We publish from the stable branch via GitHub Actions. Use the Publish to npm workflow (manual trigger) or merge to stable to release.
Legacy Agent Enforcement (Optional)
This is not the primary workflow; doc-bot focuses on documentation-first guidance and agent-driven updates. If you still need the legacy "always apply" flow enforced by your agent host, copy templates/AGENTS.md into your project's AGENTS.md. This forces the agent to call doc_bot() first and follow doc-bot's tool sequence, ensuring alwaysApply docs are surfaced before work begins.
Note: doc-bot does not enforce rules. Your agent host must honor AGENTS.md for this to work.
Built with β€οΈ in Spain
Available Tools
11 toolsadd_docsetB
Install a new documentation set (docset) for API reference. Supports both local .docset files and direct URLs.
Inputs: source (required).
create_or_update_ruleA
Create or update documentation as you discover new patterns, decisions, or changes. Use this to keep docs current for future agents.
Inputs: title (required), content (required), fileName (required), topics, +5 more.
doc_botB
Documentation MCP guidance: suggests docs, search hints, and doc upkeep steps. Use frequently to stay aligned and capture new knowledge.
Inputs: task (required), page.
explore_apiB
Deep dive into any API, framework, or class from installed docsets.
Inputs: apiName (required), docsetId.
get_document_indexB
List all available project documentation files with titles and metadata.
Inputs: no named parameters.
get_file_docsA
Get documentation that matches a file path or pattern using frontmatter filePatterns. Use when editing a specific file or directory.
Inputs: filePath (required).
list_docsetsA
List all installed documentation sets (docsets). Shows docset IDs, names, and installation details.
Inputs: no named parameters.
read_specific_documentB
Read full documentation file content when you need complete context.
Inputs: fileName (required), page.
refresh_documentationA
Reload all project documentation from disk when docs are updated externally.
Inputs: no named parameters.
remove_docsetA
Remove an installed documentation set. Use list_docsets first to see available docsets and their IDs.
Inputs: docsetId (required).
search_documentationB
Search project documentation and installed API references for patterns, examples, and usage details. Use early and often to stay aligned with current docs.
Inputs: query (required), page, type, limit, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 11 tools
Each tool has a clearly distinct purpose: docset management (add, list, remove), documentation retrieval (search, read by file, read by ID, index, refresh), rule creation/update, API deep dive, and guidance. Overlaps are minimal and descriptions clarify boundaries.
Most tools use a consistent verb_noun snake_case pattern (e.g., add_docset, search_documentation). The tool 'doc_bot' breaks this pattern as a noun_noun, but it's a single outlier and still readable.
11 tools is well-scoped for a documentation MCP server. The set covers docset operations, documentation queries, rule management, and guidance without being overwhelming or too sparse.
The tool surface covers the full documentation lifecycle: install/remove docsets, create/update rules, search, read, index, and refresh. Missing operations like document deletion are not clearly needed based on the domain, so no obvious gaps.
Maintenance
Related MCP Connectors
Provide your AI coding tools with token-efficient access to up-to-date technical documentation forβ¦
Versioned documentation registry and semantic search for AI tools and coding assistants.
Project memory, documentation and controlled secret access for AI coding agents.
Shared project context for AI agents and teams: docs, tasks, and messages that stay current.
Related MCP Servers
- AlicenseBqualityCmaintenanceProvides AI assistants with persistent memory of your project architecture, development history, and technical decisions, allowing them to give context-aware coding help without needing repeated explanations.1661 npm2MIT
- FlicenseNot gradedqualityDmaintenanceProvides AI agents with professional coding standards, development best practices, and context-aware guidance through static documentation and AI-powered custom recommendations. Enables agents to access comprehensive development guidelines including coding rules, debugging techniques, and AI steering instructions.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to crawl, index, and retrieve information from technical documentation using semantic search, with optional knowledge graph validation for code hallucination detection.MIT
- AlicenseAqualityDmaintenanceProvides AI assistants with up-to-date documentation for popular libraries and frameworks, enabling them to generate more accurate code using less common or newly released libraries.536MIT