DeepWiki MCP
Query any public GitHub repository using DeepWiki's AI-powered documentation and Q&A service. No API key, no auth, free.
MCP endpoint: INLINECODE0
Scope & Boundaries
This skill handles:
- - Asking natural-language questions about any public GitHub repo
- Listing documentation topics indexed by DeepWiki
- Fetching full wiki contents for a repo
- Running queries via the included helper script
This skill does NOT handle:
- - Private repository access (requires paid Devin account)
- Modifying repositories or submitting PRs
- Real-time code analysis (DeepWiki may lag a few days behind latest commits)
- Local code search or grep (use standard file tools for that)
Inputs
| Input | Required | Description |
|---|
| Question | Yes | Natural-language question about a repo |
| Repository |
No |
owner/repo format. Defaults to
openclaw/openclaw |
| Action | No |
ask (default),
topics, or
docs |
Outputs
- - AI-grounded text answer with source references from the repo
- Or a structured list of documentation topics
- Or full wiki contents (large output)
Workflow
Step 1 — Run the helper script
The script is located in this skill's directory at scripts/deepwiki.sh.
CODEBLOCK0
Replace <skill_dir> with the directory containing this SKILL.md.
Step 2 — Interpret and relay the answer
DeepWiki returns AI-generated answers grounded in the repo's actual source code. The response typically includes:
- - Direct answer to the question
- References to specific files and code paths
- Context about related functionality
Relay the answer to the user, adding your own context if you have additional knowledge.
Step 3 — Follow up if needed
If the answer is incomplete or raises new questions:
- - Ask a more specific follow-up question
- Use
topics to find relevant documentation sections - Use
docs for broader context (but note: output can be very large)
Direct curl (fallback)
If the helper script is unavailable:
CODEBLOCK1
MCP Tools Reference
| Tool | Purpose | Arguments |
|---|
| INLINECODE10 | Ask any question, get AI-grounded answer | INLINECODE11 , INLINECODE12 |
| INLINECODE13 |
List documentation topics for a repo |
repoName |
|
read_wiki_contents | Get full wiki docs for a repo |
repoName |
Error Handling
| Problem | Detection | Action |
|---|
| Timeout (>60s) | curl hangs or no response | Retry once; DeepWiki may be under load |
| Empty response |
No
data: lines in SSE stream | Check if repo exists and is public |
| Repo not indexed | Error message about unknown repo | Try again — DeepWiki indexes on first request |
| Rate limited | HTTP 429 or error response | Wait 30s and retry |
| Script not found | File not at expected path | Use direct curl fallback |
Success Criteria
- - DeepWiki returns a substantive answer (not an error or empty response)
- Answer references actual code/files from the repository
- User's question is addressed with grounded information
Configuration
No persistent configuration required. The skill uses:
- -
exec tool to run the helper script (bash + curl + python3) - No API keys or authentication needed
- Works for any public GitHub repository
System dependencies:
| Dependency | Purpose |
|---|
| bash | Script execution |
| curl |
HTTP requests to MCP endpoint |
| python3 | JSON parsing of SSE responses |
Notes
- - Responses take 10-30s (AI generates answers server-side)
- INLINECODE19 is the most useful tool — use it first
- DeepWiki crawls repos periodically; may lag behind very recent commits
- Works for any public GitHub repo, not just OpenClaw
- For private repos, a paid Devin account is required
DeepWiki MCP
使用DeepWiki的AI驱动文档和问答服务查询任何公共GitHub仓库。无需API密钥,无需认证,完全免费。
MCP端点: https://mcp.deepwiki.com/mcp
范围与边界
此技能可处理:
- - 对任何公共GitHub仓库提出自然语言问题
- 列出DeepWiki索引的文档主题
- 获取仓库的完整Wiki内容
- 通过附带的辅助脚本运行查询
此技能不处理:
- - 私有仓库访问(需要付费Devin账户)
- 修改仓库或提交PR
- 实时代码分析(DeepWiki可能比最新提交滞后几天)
- 本地代码搜索或grep(请使用标准文件工具)
输入参数
否 | owner/repo格式。默认为openclaw/openclaw |
| 操作 | 否 | ask(默认)、topics或docs |
输出
- - 基于AI的文本答案,附带仓库来源引用
- 或结构化的文档主题列表
- 或完整的Wiki内容(输出较大)
工作流程
第1步 — 运行辅助脚本
脚本位于此技能目录的scripts/deepwiki.sh。
bash
提问(默认为openclaw/openclaw)
/scripts/deepwiki.sh ask 会话压缩是如何工作的?
询问特定仓库
/scripts/deepwiki.sh ask facebook/react 并发模式是如何工作的?
列出文档主题
/scripts/deepwiki.sh topics openclaw/openclaw
获取完整Wiki内容(输出较大 — 针对性查询请优先使用ask)
/scripts/deepwiki.sh docs openclaw/openclaw
将替换为包含此SKILL.md的目录。
第2步 — 解释并传达答案
DeepWiki返回基于仓库实际源代码的AI生成答案。响应通常包括:
- - 问题的直接答案
- 特定文件和代码路径的引用
- 相关功能的上下文信息
将答案传达给用户,如果您有额外知识,可添加自己的上下文说明。
第3步 — 必要时跟进
如果答案不完整或引发新问题:
- - 提出更具体的后续问题
- 使用topics查找相关文档章节
- 使用docs获取更广泛的上下文(但注意:输出可能非常大)
直接curl(备用方案)
如果辅助脚本不可用:
bash
curl -s -X POST https://mcp.deepwiki.com/mcp \
-H Content-Type: application/json \
-H Accept: application/json, text/event-stream \
-d {
jsonrpc: 2.0,
id: 1,
method: tools/call,
params: {
name: ask_question,
arguments: {
repoName: owner/repo,
question: 您的问题
}
}
} | grep ^data: | grep id:1 | sed s/^data: // | \
python3 -c import json,sys; d=json.load(sys.stdin); print(d[result][content][0][text])
MCP工具参考
| 工具 | 用途 | 参数 |
|---|
| askquestion | 提出任何问题,获取AI驱动的答案 | repoName、question |
| readwiki_structure |
列出仓库的文档主题 | repoName |
| readwikicontents | 获取仓库的完整Wiki文档 | repoName |
错误处理
| 问题 | 检测 | 操作 |
|---|
| 超时(>60秒) | curl挂起或无响应 | 重试一次;DeepWiki可能负载过高 |
| 空响应 |
SSE流中没有data:行 | 检查仓库是否存在且为公共 |
| 仓库未索引 | 关于未知仓库的错误消息 | 重试 — DeepWiki在首次请求时进行索引 |
| 速率限制 | HTTP 429或错误响应 | 等待30秒后重试 |
| 脚本未找到 | 文件不在预期路径 | 使用直接curl备用方案 |
成功标准
- - DeepWiki返回实质性答案(非错误或空响应)
- 答案引用了仓库中的实际代码/文件
- 用户的问题得到了基于事实信息的解答
配置
无需持久化配置。此技能使用:
- - exec工具运行辅助脚本(bash + curl + python3)
- 无需API密钥或认证
- 适用于任何公共GitHub仓库
系统依赖:
向MCP端点发送HTTP请求 |
| python3 | JSON解析SSE响应 |
备注
- - 响应需要10-30秒(AI在服务端生成答案)
- askquestion是最有用的工具 — 请优先使用
- DeepWiki定期爬取仓库;可能滞后于最近的提交
- 适用于任何公共GitHub仓库,不仅限于OpenClaw
- 对于私有仓库,需要付费的Devin账户