deepwiki

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

DeepWiki - Repository Documentation

DeepWiki - 仓库文档

Query DeepWiki for AI-generated documentation about any public GitHub repository.
查询DeepWiki以获取任意公开GitHub仓库的AI生成文档。

Overview

概述

DeepWiki (deepwiki.com) provides AI-generated documentation for GitHub repositories, including:
  • Repository structure and architecture
  • API documentation
  • Code explanations
  • Interactive diagrams
DeepWiki (deepwiki.com) 为GitHub仓库提供AI生成的文档,包括:
  • 仓库结构与架构
  • API文档
  • 代码说明
  • 交互式图表

Quick Start

快速开始

URL Pattern: Replace
github.com
with
deepwiki.com
in any repo URL:
  • github.com/vercel/next.js
    deepwiki.com/vercel/next.js
URL格式:将任意仓库URL中的
github.com
替换为
deepwiki.com
  • github.com/vercel/next.js
    deepwiki.com/vercel/next.js

MCP Server Setup

MCP服务器设置

DeepWiki provides a free MCP server with no authentication required for public repos.
DeepWiki提供免费的MCP服务器,公开仓库无需验证即可使用。

Add to Claude Code (one-time setup)

添加至Claude Code(一次性设置)

bash
claude mcp add -s user -t http deepwiki https://mcp.deepwiki.com/mcp
bash
claude mcp add -s user -t http deepwiki https://mcp.deepwiki.com/mcp

For Cursor/Windsurf

适用于Cursor/Windsurf

Add to your MCP config:
json
{
  "mcpServers": {
    "deepwiki": {
      "serverUrl": "https://mcp.deepwiki.com/sse"
    }
  }
}
添加至你的MCP配置:
json
{
  "mcpServers": {
    "deepwiki": {
      "serverUrl": "https://mcp.deepwiki.com/sse"
    }
  }
}

Available MCP Tools

可用的MCP工具

Once configured, these tools become available:
ToolPurpose
read_wiki_structure
Get documentation topics/structure for a repo
read_wiki_contents
Retrieve actual documentation content
ask_question
Ask AI-powered questions about the repo
配置完成后,以下工具将可用:
工具用途
read_wiki_structure
获取仓库的文档主题/结构
read_wiki_contents
检索实际文档内容
ask_question
提出关于仓库的AI驱动问题

Usage Examples

使用示例

Via WebFetch (works immediately)

通过WebFetch(立即可用)

bash
undefined
bash
undefined

Fetch documentation overview

Fetch documentation overview

WebFetch https://deepwiki.com/owner/repo "Summarize the architecture"
WebFetch https://deepwiki.com/owner/repo "Summarize the architecture"

Example

Example

WebFetch https://deepwiki.com/vercel/next.js "How does routing work?"
undefined
WebFetch https://deepwiki.com/vercel/next.js "How does routing work?"
undefined

Via MCP (after setup)

通过MCP(设置完成后)

Use the MCP tools directly:
  • mcp__deepwiki__read_wiki_structure
    - Get repo structure
  • mcp__deepwiki__read_wiki_contents
    - Get documentation
  • mcp__deepwiki__ask_question
    - Ask questions
直接使用MCP工具:
  • mcp__deepwiki__read_wiki_structure
    - 获取仓库结构
  • mcp__deepwiki__read_wiki_contents
    - 获取文档内容
  • mcp__deepwiki__ask_question
    - 提出问题

Fallback: GitHub + AI

备选方案:GitHub + AI

If DeepWiki lacks coverage for a repo, use GitHub API:
如果DeepWiki未覆盖某个仓库,可使用GitHub API:

Get Repository Overview

获取仓库概述

bash
gh api repos/owner/repo | jq '{description, language, topics, stars: .stargazers_count}'
bash
gh api repos/owner/repo | jq '{description, language, topics, stars: .stargazers_count}'

Get README

获取README

bash
gh api repos/owner/repo/readme --jq '.content' | base64 -d
bash
gh api repos/owner/repo/readme --jq '.content' | base64 -d

Get File Structure

获取文件结构

bash
gh api repos/owner/repo/git/trees/main?recursive=1 | \
  jq -r '.tree[] | select(.type == "blob") | .path' | head -50
bash
gh api repos/owner/repo/git/trees/main?recursive=1 | \
  jq -r '.tree[] | select(.type == "blob") | .path' | head -50

Wire Protocols

通信协议

Two protocols are supported:
  • SSE at
    https://mcp.deepwiki.com/sse
    - Official MCP spec
  • HTTP at
    https://mcp.deepwiki.com/mcp
    - Cloudflare/OpenAI compatible
支持两种协议:
  • SSE
    https://mcp.deepwiki.com/sse
    - 官方MCP规范
  • HTTP
    https://mcp.deepwiki.com/mcp
    - 兼容Cloudflare/OpenAI

Best Practices

最佳实践

  1. Use WebFetch first - Works without MCP setup
  2. Check if repo is indexed - Popular repos have better coverage
  3. Ask specific questions - DeepWiki excels at targeted queries
  4. Fall back to GitHub - For unindexed or private repos
  1. 优先使用WebFetch - 无需MCP设置即可使用
  2. 检查仓库是否已被索引 - 热门仓库的覆盖度更高
  3. 提出具体问题 - DeepWiki擅长处理针对性查询
  4. 备选GitHub - 适用于未索引或私有仓库

Limitations

局限性

  • Public repos only - Private repos require Devin account
  • Coverage varies - 50,000+ popular repos indexed
  • No authentication - Can't access private documentation
  • 仅支持公开仓库 - 私有仓库需要Devin账户
  • 覆盖度不一 - 已索引50,000+热门仓库
  • 无验证机制 - 无法访问私有文档

Resources

资源