DeepWiki Markdown Converter MCP server

Converts DeepWiki repositories into well-formatted Markdown, maintaining links between pages while removing headers, footers, navigation elements, and ads for clean documentation extraction.
Back to servers
Provider
Kevin Kern
Release date
Apr 29, 2025
Language
TypeScript
Package
Stats
10.1K downloads
594 stars

The Deepwiki MCP Server is an unofficial tool that helps retrieve and format documentation from Deepwiki. It crawls pages from specified Deepwiki URLs, converts them to Markdown format, and returns either a complete document or a structured list of pages, making documentation retrieval quick and efficient.

Installation

Using NPX

The easiest way to install and use the Deepwiki MCP Server is with npx:

npx -y mcp-deepwiki@latest

Cursor Integration

To integrate with Cursor, add the following to your .cursor/mcp.json file:

{
  "mcpServers": {
    "mcp-deepwiki": {
      "command": "npx",
      "args": ["-y", "mcp-deepwiki@latest"]
    }
  }
}

Installing from Source

If you prefer to install from source:

# Clone the repository
git clone https://github.com/regenrek/deepwiki-mcp.git
cd deepwiki-mcp

# Install dependencies
npm install

# Build the package
npm run build

Environment Configuration

You can customize the server behavior with these environment variables:

DEEPWIKI_MAX_CONCURRENCY=10
DEEPWIKI_REQUEST_TIMEOUT=60000
DEEPWIKI_MAX_RETRIES=5
DEEPWIKI_RETRY_DELAY=500

Usage

Basic Commands

You can use various prompts to fetch documentation:

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

Fetching Complete Documentation

To fetch complete documentation (default behavior):

use deepwiki https://deepwiki.com/shadcn-ui/ui
use deepwiki multiple pages https://deepwiki.com/shadcn-ui/ui

Fetching a Single Page

To fetch just a single page:

use deepwiki fetch single page https://deepwiki.com/tailwindlabs/tailwindcss/2.2-theme-system

Using Shortform

You can also use shorthand notation:

use deepwiki fetch tailwindlabs/tailwindcss

Other useful command formats:

deepwiki fetch library
deepwiki fetch url
deepwiki fetch <name>/<repo>
deepwiki multiple pages ...
deepwiki single page url ...

API Integration

Direct Tool Integration

The package registers a tool named deepwiki_fetch that you can use with any MCP-compatible client:

{
  "action": "deepwiki_fetch",
  "params": {
    "url": "https://deepwiki.com/user/repo",
    "mode": "aggregate",
    "maxDepth": "1"
  }
}

Parameters

  • url (required): The starting URL of the Deepwiki repository
  • mode (optional): Output mode, either "aggregate" for a single Markdown document (default) or "pages" for structured page data
  • maxDepth (optional): Maximum depth of pages to crawl (default: 10)

HTTP API Calls

For HTTP transport, you can make direct API calls:

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "id": "req-1",
    "action": "deepwiki_fetch",
    "params": {
      "url": "https://deepwiki.com/user/repo",
      "mode": "aggregate"
    }
  }'

Response Formats

Aggregate Mode (Default)

{
  "status": "ok",
  "data": "# Page Title\n\nPage content...\n\n---\n\n# Another Page\n\nMore content...",
  "totalPages": 5,
  "totalBytes": 25000,
  "elapsedMs": 1200
}

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
}

Troubleshooting

Common Issues

  1. Permission Denied: If you get EACCES errors when running the CLI, make sure to make the binary executable:

    chmod +x ./node_modules/.bin/mcp-deepwiki
    
  2. Connection Refused: Make sure the port is available and not blocked by a firewall:

    # Check if port is in use
    lsof -i :3000
    
  3. Timeout Errors: For large repositories, consider increasing the timeout and concurrency:

    DEEPWIKI_REQUEST_TIMEOUT=60000 DEEPWIKI_MAX_CONCURRENCY=10 npx mcp-deepwiki
    

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later