Labsco
shayonpal logo

MCP for Docs

from shayonpal

Automatically downloads and converts documentation from various sources into organized markdown files.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

mcp-for-docs

GitHub Status Platform License Version

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.

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

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.

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 lint

Architecture

  • 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