MCP for Docs

by shayonpal

Not rated
GitHub

About

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

Details

Author
shayonpal
Categories
Developer Tools, Other, Web Scraping, Knowledge Base

Setup

Install MCP for Docs in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/shayonpal/mcp-for-docs

Follow the installation instructions in the repository README, then restart your MCP client.

An MCP (Model Context Protocol) server that automatically downloads and converts documentation from various sources into organized markdown files.

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.

- πŸ•·οΈ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

- Node.js 18+
- npm or yarn
- Claude Desktop or Claude Code CLI

git clone https://github.com/shayonpal/mcp-for-docs.git cd mcp-for-docs

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": {} } } }
{ "mcpServers": { "mcp-for-docs": { "command": "node", "args": ["/path/to/mcp-for-docs/dist/index.js"], "env": {} } } }

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, useforce_refresh: true.

- Tools:/Users/shayon/DevProjects/~meta/docs/tools/[tool-name]/
- APIs:/Users/shayon/DevProjects/~meta/docs/apis/[api-name]/

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, useforce_regenerate: true.

To see what documentation is available locally:

await list_documentation({ category: "all", // Options: "tools", "apis", "all" include_stats: true });

- n8n documentation
- Anthropic API docs
- Obsidian Tasks plugin docs
- Apple Swift documentation

Most documentation sites following standard patterns should work automatically.

- 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, seeCHANGELOG.md.
- Editconfig.jsonand update thedocsBasePathfor your machine:

{ "docsBasePath": "/Users/yourusername/path/to/docs" }

Important: Theconfig.jsonfile is tracked in git. When you clone this repository on a different machine, you'll need to update thedocsBasePathto match that machine's directory structure.

The tool automatically organizes documentation based on content analysis:
- You provide a URLwhen calling the tool (e.g.,https://docs.n8n.io)
- The categorizer analyzes the contentand determines if it's:

- tools/- Software tools, applications, plugins
- apis/- API references, SDK documentation

- 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!
- First machine: Set yourdocsBasePathand commit
- Other machines: After cloning, updatedocsBasePathto match that machine
- Use environment variableto override without changing the file:

export DOCS_BASE_PATH="/different/path/on/this/machine"
# 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

- 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

- 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 allopen issuesfor the complete roadmap.
- Fork the repository
- Create a feature branch
- Make your changes
- Update CHANGELOG.md
- Submit a pull request

This project is licensed under the GPL 3.0 License - see theLICENSEfile for details.

- Built with theModel Context Protocol SDK
- Uses
Playwrightfor web scraping
- Markdown conversion powered by
Turndown

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Download DocSend and Papermark decks as PDF/PPTX and data rooms as ZIPs, including email-gated and protected links.

Crawl websites to generate Markdown documentation and make it searchable through an MCP server.

Extracts document content from Microsoft Learn and GitHub URLs and stores it in PocketBase for retrieval and search.

AI Influencer Search, Creator Data, & Live Scraping

Local-first MCP server that captures web URLs (X, Reddit, YouTube, Wikipedia, articles) as typed data + Markdown into a self-hosted capture/store/recall substrate, with offline semantic recall. Six tools over a local khiipd daemon; run khiipd serve first.

Converts various file types and web content, such as PDFs, images, audio, and web pages, into Markdown format.

Create and read feature flags, review experiments, generate flag types, search docs, and interact with GrowthBook's feature flagging and experimentation platform.

Search Apple's Developer Documentation with smart search and wildcard support.

Access technical documentation for libraries and frameworks, formatted in clean markdown for LLM consumption.

A Retrieval-Augmented Generation (RAG) server for document processing, vector storage, and intelligent Q&A, powered by the Model Context Protocol.

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.