mcp-for-docs
Supports crawling and conversion of Apple Swift documentation into markdown format with automatic organization and cheat sheet generation.
Allows automatic downloading and conversion of n8n documentation from their docs site into structured markdown files with intelligent categorization.
Supports crawling and organizing Obsidian Tasks plugin documentation, converting it to markdown with preservation of code blocks and formatting.
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., "@mcp-for-docs crawl the n8n documentation and make a cheat sheet for me"
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.
mcp-for-docs
An MCP (Model Context Protocol) server that automatically downloads and converts documentation from various sources into organized markdown files.
Overview
mcp-for-docs is designed to crawl documentation websites, convert their content to markdown format, and organize them in a structured directory system. It can also generate condensed cheat sheets from the downloaded documentation.
Related MCP server: Documentation MCP Server
Features
π·οΈ Smart Documentation Crawler: Automatically crawls documentation sites with configurable depth
π HTML to Markdown Conversion: Preserves code blocks, tables, and formatting
π Automatic Categorization: Intelligently organizes docs into tools/APIs categories
π Cheat Sheet Generator: Creates condensed reference guides from documentation
π Smart Discovery System: Automatically detects existing documentation before crawling
π Local-First: Uses existing downloaded docs when available
β‘ Rate Limiting: Respects server limits and robots.txt
β User Confirmation: Prevents accidental regeneration of existing content
βοΈ Comprehensive Configuration: JSON-based configuration with environment variable overrides
π§ͺ Test Suite: 94 tests covering core functionality
Installation
Prerequisites
Node.js 18+
npm or yarn
Claude Desktop or Claude Code CLI
Setup
Clone the repository:
git clone https://github.com/shayonpal/mcp-for-docs.git
cd mcp-for-docsInstall dependencies:
npm installBuild the project:
npm run buildAdd to your MCP configuration:
For Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"mcp-for-docs": {
"command": "node",
"args": ["/path/to/mcp-for-docs/dist/index.js"],
"env": {}
}
}
}For Claude Code CLI (~/.claude.json):
{
"mcpServers": {
"mcp-for-docs": {
"command": "node",
"args": ["/path/to/mcp-for-docs/dist/index.js"],
"env": {}
}
}
}Usage
Crawling Documentation
To download documentation from a website:
await crawl_documentation({
url: "https://docs.n8n.io/",
max_depth: 3, // Optional, defaults to 3
force_refresh: false // Optional, set to true to regenerate existing docs
});The tool will first check for existing documentation and show you what's already available. To regenerate existing content, use force_refresh: true.
The documentation will be saved to:
Tools:
/Users/shayon/DevProjects/~meta/docs/tools/[tool-name]/APIs:
/Users/shayon/DevProjects/~meta/docs/apis/[api-name]/
Generating Cheat Sheets
To create a cheat sheet from documentation:
await generate_cheatsheet({
url: "https://docs.anthropic.com/",
use_local: true, // Use local files if available (default)
force_regenerate: false // Optional, set to true to regenerate existing cheatsheets
});Cheat sheets are saved to: /Users/shayon/DevProjects/~meta/docs/cheatsheets/
The tool will check for existing cheatsheets and show you what's already available. To regenerate existing content, use force_regenerate: true.
Listing Downloaded Documentation
To see what documentation is available locally:
await list_documentation({
category: "all", // Options: "tools", "apis", "all"
include_stats: true
});Supported Documentation Sites
The server has been tested with:
n8n documentation
Anthropic API docs
Obsidian Tasks plugin docs
Apple Swift documentation
Most documentation sites following standard patterns should work automatically.
Recent Updates
Configuration System (v0.4.0): Added comprehensive JSON-based configuration with environment variable support
Smart Discovery: Automatically finds and reports existing documentation before crawling
Improved Conversion: Fixed HTML to Markdown issues including table formatting and inline code preservation
Dynamic Categorization: Intelligent detection of tools vs APIs based on URL patterns and content analysis
Test Coverage: 94 tests passing with comprehensive unit and integration testing
For detailed changes, see CHANGELOG.md.
Configuration
Initial Setup
Copy the example configuration:
cp config.example.json config.jsonEdit
config.jsonand update thedocsBasePathfor your machine:
{
"docsBasePath": "/Users/yourusername/path/to/docs"
}Important: The config.json file is tracked in git. When you clone this repository on a different machine, you'll need to update the docsBasePath to match that machine's directory structure.
How Documentation Organization Works
The tool automatically organizes documentation based on content analysis:
You provide a URL when calling the tool (e.g.,
https://docs.n8n.io)The categorizer analyzes the content and determines if it's:
tools/- Software tools, applications, pluginsapis/- API references, SDK documentation
Documentation is saved to:
{docsBasePath}/{category}/{tool-name}/
For example:
https://docs.n8n.ioβ/Users/shayon/DevProjects/~meta/docs/tools/n8n/https://docs.anthropic.comβ/Users/shayon/DevProjects/~meta/docs/apis/anthropic/
This happens automatically - you don't need to configure anything per-site!
Configuration Options
Setting | Description | Default |
| Where to store all documentation | Required - no default |
| How many levels deep to crawl | 3 |
| Requests per second | 2 |
| Page load timeout (ms) | 30000 |
| Browser identification | MCP-for-docs/1.0 |
| Max characters in cheatsheet | 10000 |
| Append to cheatsheet names | -Cheatsheet.md |
Multi-Machine Setup
Since config.json is tracked in git:
First machine: Set your
docsBasePathand commitOther machines: After cloning, update
docsBasePathto match that machineUse environment variable to override without changing the file:
export DOCS_BASE_PATH="/different/path/on/this/machine"
Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run tests
npm test
# Build for production
npm run build
# Lint code
npm run lintArchitecture
Crawler: Uses Playwright for JavaScript-rendered pages
Parser: Extracts content using configurable selectors
Converter: Turndown library with custom rules for markdown
Categorizer: Smart detection of tools vs APIs
Storage: Organized file system structure
Known Issues
URL Structure Preservation (#15): Currently flattens URL structure when saving docs
Large Documentation Sites (#14): No document limit for very large sites
GitHub Repository Docs (#9): Specialized crawler for GitHub repos not yet implemented
See all open issues for the complete roadmap.
Contributing
Fork the repository
Create a feature branch
Make your changes
Update CHANGELOG.md
Submit a pull request
License
This project is licensed under the GPL 3.0 License - see the LICENSE file for details.
Acknowledgments
Built with the Model Context Protocol SDK
Uses Playwright for web scraping
Markdown conversion powered by Turndown
Available Tools
3 toolscrawl_documentationC
Crawl and download documentation from a website
Inputs: url (required), max_depth, force_refresh, rate_limit, +2 more.
generate_cheatsheetC
Generate a cheat sheet from documentation
Inputs: url (required), use_local, sections, output_format, +2 more.
list_documentationC
List available documentation
Inputs: category, include_stats.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: crawling/downloading documentation, generating a cheat sheet from it, and listing available documentation. There is no overlap in functionality, making it easy for an agent to select the right tool.
All tool names follow a consistent verb_noun pattern (crawl_documentation, generate_cheatsheet, list_documentation) with snake_case throughout. This predictability aids in tool discovery and usage.
With only 3 tools, the set feels thin for a documentation management server. While the tools cover core operations, more comprehensive coverage (e.g., search, update, or delete documentation) would be expected for such a domain.
The tools cover listing, crawling, and generating cheat sheets, but there are notable gaps. Missing operations like searching within documentation, updating or deleting documentation, or managing documentation metadata limit the server's utility for full lifecycle management.
Maintenance
Related MCP Connectors
Convert PDFs, Office docs, websites and audio into AI-ready Markdown, then search and ask your docs.
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.
Documents to Markdown/PDF, OCR, video and audio transcripts, TTS, screenshots, domains, frames.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA comprehensive, domain-agnostic documentation scraping and AI integration toolkit. Scrape any documentation website, create structured databases, and integrate with Claude Desktop via MCP (Model Context Protocol) for seamless AI-powered documentation assistance.5-
- AlicenseNot gradedqualityDmaintenanceScrapes and indexes documentation websites to provide AI assistants with searchable access to documentation content, API references, and code examples through configurable URL crawling.ISC
- AlicenseNot gradedqualityNot gradedmaintenanceCrawls documentation websites and provides semantic search capabilities over the content through vector embeddings, enabling natural language queries of technical documentation.2MIT
- FlicenseNot gradedqualityDmaintenanceEnables crawling and extracting clean content from documentation websites with optional LLM-powered analysis for intelligent summaries, code example extraction, and content classification.-