Download deepwiki.com content as separate Markdown files using the deepwiki MCP server.
Note: This is an unofficial tool. The deepwiki MCP server's behavior may change at any time, which could break this tool's functionality.
The deepwiki MCP server's read_wiki_contents tool returns all pages concatenated together with # Page: [title] delimiters (without newlines before them). This bursts coding AI's context usage.
This tool splits the combined content into separate, properly numbered Markdown files based on the structure, making it easier to:
- Read only the parts you (the AI) want
- Minimize context usage
npm install -g @heguro/deepwiki-dl
# or use with npx
npx @heguro/deepwiki-dl owner/repo [outDir]deepwiki-dl owner/repo [outDir]owner/repo- GitHub repository (e.g.,modelcontextprotocol/typescript-sdk)outDir- Optional output directory. Defaults to{repo-name}-deepwiki/
Download documentation for the MCP TypeScript SDK:
deepwiki-dl modelcontextprotocol/typescript-sdkThis will create a directory typescript-sdk-deepwiki/ with:
_wiki_structure.md- The structure fromread_wiki_structure1 Overview.md- Individual pages with proper numbering1.1 Installation and Setup.md1.2 Core Concepts.md2 Architecture.md- etc.
Specify a custom output directory:
deepwiki-dl modelcontextprotocol/typescript-sdk ./my-docsThis tool connects to the deepwiki MCP server at https://mcp.deepwiki.com/mcp and:
- Calls
read_wiki_structureto get the table of contents with numbered sections - Calls
read_wiki_contentsto get all page content in a single string - Parses the content which comes in format
# Page: [title]\n\n[content] - Matches page titles with the structure to determine proper numbering
- Saves each page as a separate Markdown file with format
N [title].mdorN.N [title].md
# Install dependencies
pnpm install
# Build
pnpm run build
# Lint
pnpm run lint
# Format
pnpm run formatCC0-1.0 - Public Domain