The Deepwiki MCP Server is an unofficial utility designed to extract content from Deepwiki and convert it into Markdown format. Operating via the Model Context Protocol, it allows you to provide a Deepwiki URL, crawl its pages, remove unnecessary boilerplate, and receive either a consolidated Markdown file or a structured list of individual pages.
What It Does
Domain Lock: Restricted exclusively to https://deepwiki.org URLs to prevent unintended external crawling.
HTML Cleaning: Automatically strips headers, footers, navigation bars, scripts, and advertisements, leaving you with clean content.
Link Rewriting: Updates internal links to ensure they remain functional within the Markdown output.
Flexible Output: Choose between a single aggregated document or a set of distinct pages.
Efficient Crawling: Allows for adjustable concurrency and crawl depth, enabling the server to handle large repositories without stalling.
NLP Search: Easily locate specific content by searching for library names.
Quick Prompts
deepwiki fetch how can i use gpt-image-1 with "vercel ai" sdk
deepwiki fetch how can i create new blocks in shadcn?
deepwiki fetch i want to understand how X works
Fetch the Whole Repo (Default)
use deepwiki https://deepwiki.org/shadcn-ui/ui
use deepwiki multiple pages https://deepwiki.org/shadcn-ui/ui
Fetch a Single Page
use deepwiki fetch single page https://deepwiki.org/tailwindlabs/tailwindcss/2.2-theme-system
Short Formats
use deepwiki fetch tailwindlabs/tailwindcss
deepwiki fetch library
deepwiki fetch url
deepwiki fetch <name>/<repo>
deepwiki multiple pages ...
deepwiki single page url ...
Cursor Setup
Add the following to your .cursor/mcp.json file:
{
"mcpServers": {
"mcp-deepwiki": {
"command": "npx",
"args": ["-y", "mcp-deepwiki@latest"]
}
}
}
MCP Tool Integration
The package registers a tool named deepwiki_fetch. You can use it in any MCP-compatible client with the following structure:
{
"action": "deepwiki_fetch",
"params": {
"url": "https://deepwiki.org/user/repo",
"mode": "aggregate",
"maxDepth": "1"
}
}
Parameters
url (required): The starting URL for the Deepwiki repository.mode (optional): aggregate returns a single Markdown file; pages returns structured page data. Defaults to aggregate.maxDepth (optional): Determines how deep the crawler should go. Defaults to 10.Response Examples
Success (Aggregate Mode)
{
"status": "ok",
"data": "# Page Title\n\nPage content...\n\n---\n\n# Another Page\n\nMore content...",
"totalPages": 5,
"totalBytes": 25000,
"elapsedMs": 1200
}
Success (Pages Mode)
{
"status": "ok",
"data": [
{
"path": "index",
"markdown": "# Home Page\n\nWelcome to the repository."
},
{
"path": "section/page1",
"markdown": "# First Page\n\nThis is the first page content."
}
],
"totalPages": 2,
"totalBytes": 12000,
"elapsedMs": 800
}
Error
{
"status": "error",
"code": "DOMAIN_NOT_ALLOWED",
"message": "Only deepwiki.org domains are allowed"
}
Partial Success
{
"status": "partial",
"data": "# Page Title\n\nPage content...",
"errors": [
{
"url": "https://deepwiki.org/user/repo/page2",
"reason": "HTTP error: 404"
}
],
"totalPages": 1,
"totalBytes": 5000,
"elapsedMs": 950
}
Local Setup
For development purposes, configure your .cursor/mcp.json as follows:
{
"mcpServers": {
"mcp-deepwiki": {
"command": "node",
"args": ["./bin/cli.mjs"]
}
}
}
To build the project from source:
git clone https://github.com/regenrek/mcp-deepwiki.git then cd mcp-deepwiki.npm install.npm run build.Direct HTTP API
You can also interact with the server via HTTP:
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"id": "req-1",
"action": "deepwiki_fetch",
"params": {
"url": "https://deepwiki.org/user/repo",
"mode": "aggregate"
}
}'
Environment Variables
DEEPWIKI_MAX_CONCURRENCY: The maximum number of parallel requests. Defaults to 5.DEEPWIKI_REQUEST_TIMEOUT: Request timeout in milliseconds. Defaults to 30000.DEEPWIKI_MAX_RETRIES: Number of retry attempts on failure. Defaults to 3.DEEPWIKI_RETRY_DELAY: The base backoff delay in milliseconds. Defaults to 250.You can set these by creating a .env file in the project root:
DEEPWIKI_MAX_CONCURRENCY=10
DEEPWIKI_REQUEST_TIMEOUT=60000
DEEPWIKI_MAX_RETRIES=5
DEEPWIKI_RETRY_DELAY=500
Docker
docker build -t mcp-deepwiki .docker run -it --rm mcp-deepwikidocker run -d -p 3000:3000 mcp-deepwiki --http --port 3000docker run -d -p 3000:3000 \
-e DEEPWIKI_MAX_CONCURRENCY=10 \
-e DEEPWIKI_REQUEST_TIMEOUT=60000 \
mcp-deepwiki --http --port 3000
Development Commands
pnpm installpnpm run dev-stdiopnpm testpnpm run lintpnpm run buildEACCES error, ensure the binary is executable by running: chmod +x ./node_modules/.bin/mcp-deepwikilsof -i :3000 and ensure your firewall is not blocking the connection.DEEPWIKI_REQUEST_TIMEOUT=60000 DEEPWIKI_MAX_CONCURRENCY=10 npx mcp-deepwiki
LightlyStudio: Reduce Annotation Costs Through Intelligent Data Curation
Skill Seeker: Convert Any Documentation Site Into Claude AI Skills
Grey Deer VPN: Residential IPs for Secure Global Access
withoutbg: Free Local & API-Based AI Background Removal Tool
SE-Agent: Self-Evolving AI Agent Tops SWE-bench Verified
Puter: An Open-Source Personal Cloud OS for Files, Apps, and Games
MonkeyCode: Secure Private AI Coding with Integrated Security Scanning & Admin Controls
LetsMarkdown: Lightweight Collaborative Markdown Editor Powered by Rust
Trae Agent: Run Complex Dev Workflows With Plain English Prompts
Notes MCP Guide: Connect Apple Notes to Claude, Cursor, and LLMs
Magentic-UI: Multi-Agent Web Automation You Can Watch and Control
Tabby Terminal: A Cross-Platform Emulator with SSH, Serial Support, and Plugins