Skip to content
Back to search

deepwiki-mcp

πŸ“– MCP server for fetch deepwiki.com and get latest knowledge in Cursor and other Code Editors

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/regenrek--deepwiki-mcp/badge.svg)](/listings/regenrek--deepwiki-mcp)

HTML

<a href="/listings/regenrek--deepwiki-mcp"><img src="/api/listings/regenrek--deepwiki-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md Β· README Β· 316 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Deepwiki MCP Server
  2. > ⚠️ **IMPORTANT NOTICE**: This server is currently not working since DeepWiki has cut off the possibility to scrape it. We recommend using the official DeepWiki MCP server at https://docs.devin.ai/work-with-devin/deepwiki-mcp for the time being.
  3. This is an **unofficial Deepwiki MCP Server**
  4. It takes a Deepwiki URL via MCP, crawls all relevant pages, converts them to Markdown, and returns either one document or a list by page.
  5. ## Features
  6. - πŸ”’ **Domain Safety**: Only processes URLs from deepwiki.com
  7. - 🧹 **HTML Sanitization**: Strips headers, footers, navigation, scripts, and ads
  8. - πŸ”— **Link Rewriting**: Adjusts links to work in Markdown
  9. - πŸ“„ **Multiple Output Formats**: Get one document or structured pages
  10. - πŸš€ **Performance**: Fast crawling with adjustable concurrency and depth
  11. - **NLP**: It's to search just for the library name
  12. ## Usage
  13. Prompts you can use:
  14. ```
  15. deepwiki fetch how can i use gpt-image-1 with "vercel ai" sdk
  16. ```
  17. ```
  18. deepwiki fetch how can i create new blocks in shadcn?
  19. ```
  20. ```
  21. deepwiki fetch i want to understand how X works
  22. ```
  23. Fetch complete Documentation (Default)
  24. ```
  25. use deepwiki https://deepwiki.com/shadcn-ui/ui
  26. use deepwiki multiple pages https://deepwiki.com/shadcn-ui/ui
  27. ```
  28. Single Page
  29. ```
  30. use deepwiki fetch single page https://deepwiki.com/tailwindlabs/tailwindcss/2.2-theme-system
  31. ```
  32. Get by shortform
  33. ```
  34. use deepwiki fetch tailwindlabs/tailwindcss
  35. ```
  36. ```
  37. deepwiki fetch library
  38. deepwiki fetch url
  39. deepwiki fetch <name>/<repo>
  40. deepwiki multiple pages ...
  41. deepwiki single page url ...
  42. ```
  43. ## Cursor
  44. Add this to `.cursor/mcp.json` file.
  45. ```
  46. {
  47. "mcpServers": {
  48. "mcp-deepwiki": {
  49. "command": "npx",
  50. "args": ["-y", "mcp-deepwiki@latest"]
  51. }
  52. }
  53. }
  54. ```
  55. ![Deepwiki Logo](public/deepwiki.jpg)
  56. ### MCP Tool Integration
  57. The package registers a tool named `deepwiki_fetch` that you can use with any MCP-compatible client:
  58. ```json
  59. {
  60. "action": "deepwiki_fetch",
  61. "params": {
  62. "url": "https://deepwiki.com/user/repo",
  63. "mode": "aggregate",
  64. "maxDepth": "1"
  65. }
  66. }
  67. ```
  68. #### Parameters
  69. - `url` (required): The starting URL of the Deepwiki repository
  70. - `mode` (optional): Output mode, either "aggregate" for a single Markdown document (default) or "pages" for structured page data
  71. - `maxDepth` (optional): Maximum depth of pages to crawl (default: 10)
  72. ### Response Format
  73. #### Success Response (Aggregate Mode)
  74. ```json
  75. {
  76. "status": "ok",
  77. "data": "# Page Title\n\nPage content...\n\n---\n\n# Another Page\n\nMore content...",
  78. "totalPages": 5,
  79. "totalBytes": 25000,
  80. "elapsedMs": 1200
  81. }
  82. ```
  83. #### Success Response (Pages Mode)
  84. ```json
  85. {
  86. "status": "ok",
  87. "data": [
  88. {
  89. "path": "index",
  90. "markdown": "# Home Page\n\nWelcome to the repository."
  91. },
  92. {
  93. "path": "section/page1",
  94. "markdown": "# First Page\n\nThis is the first page content."
  95. }
  96. ],
  97. "totalPages": 2,
  98. "totalBytes": 12000,
  99. "elapsedMs": 800
  100. }
  101. ```
  102. #### Error Response
  103. ```json
  104. {
  105. "status": "error",
  106. "code": "DOMAIN_NOT_ALLOWED",
  107. "message": "Only deepwiki.com domains are allowed"
  108. }
  109. ```
  110. #### Partial Success Response
  111. ```json
  112. {
  113. "status": "partial",
  114. "data": "# Page Title\n\nPage content...",
  115. "errors": [
  116. {
  117. "url": "https://deepwiki.com/user/repo/page2",
  118. "reason": "HTTP error: 404"
  119. }
  120. ],
  121. "totalPages": 1,
  122. "totalBytes": 5000,
  123. "elapsedMs": 950
  124. }
  125. ```
  126. ### Progress Events
  127. When using the tool, you'll receive progress events during crawling:
  128. ```
  129. Fetched https://deepwiki.com/user/repo: 12500 bytes in 450ms (status: 200)
  130. Fetched https://deepwiki.com/user/repo/page1: 8750 bytes in 320ms (status: 200)
  131. Fetched https://deepwiki.com/user/repo/page2: 6200 bytes in 280ms (status: 200)
  132. ```
  133. ## Local Development - Installation
  134. ### Local Usage
  135. ```
  136. {
  137. "mcpServers": {
  138. "mcp-deepwiki": {
  139. "command": "node",
  140. "args": ["./bin/cli.mjs"]
  141. }
  142. }
  143. }
  144. ```
  145. ### From Source
  146. ```bash
  147. # Clone the repository
  148. git clone https://github.com/regenrek/deepwiki-mcp.git
  149. cd deepwiki-mcp
  150. # Install dependencies
  151. npm install
  152. # Build the package
  153. npm run build
  154. ```
  155. #### Direct API Calls
  156. For HTTP transport, you can make direct API calls:
  157. ```bash
  158. curl -X POST http://localhost:3000/mcp \
  159. -H "Content-Type: application/json" \
  160. -d '{
  161. "id": "req-1",
  162. "action": "deepwiki_fetch",
  163. "params": {
  164. "url": "https://deepwiki.com/user/repo",
  165. "mode": "aggregate"
  166. }
  167. }'
  168. ```
  169. ## Configuration
  170. ### Environment Variables
  171. - `DEEPWIKI_MAX_CONCURRENCY`: Maximum concurrent requests (default: 5)
  172. - `DEEPWIKI_REQUEST_TIMEOUT`: Request timeout in milliseconds (default: 30000)
  173. - `DEEPWIKI_MAX_RETRIES`: Maximum retry attempts for failed requests (default: 3)
  174. - `DEEPWIKI_RETRY_DELAY`: Base delay for retry backoff in milliseconds (default: 250)
  175. To configure these, create a `.env` file in the project root:
  176. ```
  177. DEEPWIKI_MAX_CONCURRENCY=10
  178. DEEPWIKI_REQUEST_TIMEOUT=60000
  179. DEEPWIKI_MAX_RETRIES=5
  180. DEEPWIKI_RETRY_DELAY=500
  181. ```
  182. ## Docker Deployment (Untested)
  183. Build and run the Docker image:
  184. ```bash
  185. # Build the image
  186. docker build -t mcp-deepwiki .
  187. # Run with stdio transport (for development)
  188. docker run -it --rm mcp-deepwiki
  189. # Run with HTTP transport (for production)
  190. docker run -d -p 3000:3000 mcp-deepwiki --http --port 3000
  191. # Run with environment variables
  192. docker run -d -p 3000:3000 \
  193. -e DEEPWIKI_MAX_CONCURRENCY=10 \
  194. -e DEEPWIKI_REQUEST_TIMEOUT=60000 \
  195. mcp-deepwiki --http --port 3000
  196. ```
  197. ## Development
  198. ```bash
  199. # Install dependencies
  200. pnpm install
  201. # Run in development mode with stdio
  202. pnpm run dev-stdio
  203. # Run tests
  204. pnpm test
  205. # Run linter
  206. pnpm run lint
  207. # Build the package
  208. pnpm run build
  209. ```
  210. ## Troubleshooting
  211. ### Common Issues
  212. 1. **Permission Denied**: If you get EACCES errors when running the CLI, make sure to make the binary executable:
  213. ```bash
  214. chmod +x ./node_modules/.bin/mcp-deepwiki
  215. ```
  216. 2. **Connection Refused**: Make sure the port is available and not blocked by a firewall:
  217. ```bash
  218. # Check if port is in use
  219. lsof -i :3000
  220. ```
  221. 3. **Timeout Errors**: For large repositories, consider increasing the timeout and concurrency:
  222. ```
  223. DEEPWIKI_REQUEST_TIMEOUT=60000 DEEPWIKI_MAX_CONCURRENCY=10 npx mcp-deepwiki
  224. ```
  225. ## Contributing
  226. We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.
  227. ## License
  228. MIT
  229. ## Links
  230. - X/Twitter: [@kregenrek](https://x.com/kregenrek)
  231. - Bluesky: [@kevinkern.dev](https://bsky.app/profile/kevinkern.dev)
  232. ## Courses
  233. - Learn Cursor AI: [Ultimate Cursor Course](https://www.instructa.ai/en/cursor-ai)
  234. - Learn to build software with AI: [instructa.ai](https://www.instructa.ai)
  235. ## See my other projects:
  236. * [AI Prompts](https://github.com/instructa/ai-prompts/blob/main/README.md) - Curated AI Prompts for Cursor AI, Cline, Windsurf and Github Copilot
  237. * [codefetch](https://github.com/regenrek/codefetch) - Turn code into Markdown for LLMs with one simple terminal command
  238. * [aidex](https://github.com/regenrek/aidex) A CLI tool that provides detailed information about AI language models, helping developers choose the right model for their needs.# tool-starter

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.