> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DeepWiki MCP

> 如何使用官方 DeepWiki MCP 服务器

DeepWiki MCP 服务器提供对 DeepWiki 公共存储库文档和搜索功能（Ask Devin）的程序化访问能力。

<div id="what-is-mcp">
  ## 什么是 MCP？
</div>

[Model Context Protocol](https://modelcontextprotocol.io/introduction)（MCP，模型上下文协议）是一个开放标准，使 AI 应用程序可以安全地连接到符合 MCP 标准的数据源和工具。你可以把 MCP 理解为 AI 应用程序的 USB-C 接口——一种将 AI 应用程序连接到不同服务的标准化方式。

<div id="deepwiki-mcp-server">
  ## DeepWiki MCP 服务器
</div>

DeepWiki MCP 服务器是一个免费、无需身份验证的远程服务，用于访问公共仓库。

**基础服务器 URL：** `https://mcp.deepwiki.com/`

<div id="available-tools">
  ### 可用工具
</div>

DeepWiki MCP 服务器提供三个主要工具：

1. **`read_wiki_structure`** - 获取 GitHub 仓库的文档主题列表
2. **`read_wiki_contents`** - 查看 GitHub 仓库的文档内容
3. **`ask_question`** - 就 GitHub 仓库提出任意问题，并获得结合上下文的 AI 解答

<div id="wire-protocols">
  ### 传输协议（Wire Protocols）
</div>

DeepWiki MCP 服务器支持两种传输协议：

<div id="streamable-http-mcp">
  #### 支持流式传输的 HTTP - `/mcp`
</div>

* **URL：** `https://mcp.deepwiki.com/mcp`
* 可与 Cloudflare、OpenAI 和 Claude 兼容
* **推荐用于大多数集成场景**

<div id="sse-server-sent-events-sse">
  #### SSE（服务器发送事件）- `/sse`
</div>

* **URL：** `https://mcp.deepwiki.com/sse`
* 遗留协议，正逐步弃用

<Note>
  由于 SSE 正在被弃用，建议使用 `/mcp` 端点。
</Note>

<div id="setup-instructions">
  ## 设置指示
</div>

服务器 URL 的字段名称取决于客户端：Devin Desktop 使用 `serverUrl`，而大多数其他客户端使用标准的 `url` 字段。使用错误的字段名称会导致 MCP 服务器在没有任何提示的情况下被忽略。

<div id="for-devin-desktop">
  ### 对于 Devin Desktop：
</div>

```json theme={null}
{
  "mcpServers": {
    "deepwiki": {
      "serverUrl": "https://mcp.deepwiki.com/mcp"
    }
  }
}
```

<div id="for-most-other-clients-eg-cursor">
  ### 对于大多数其他客户端 (如 Cursor) ：
</div>

```json theme={null}
{
  "mcpServers": {
    "deepwiki": {
      "url": "https://mcp.deepwiki.com/mcp"
    }
  }
}
```

<div id="for-claude-code">
  ### 适用于 Claude Code：
</div>

```bash theme={null}
claude mcp add -s user -t http deepwiki https://mcp.deepwiki.com/mcp
```

<div id="related-resources">
  ## 相关资源
</div>

* **[Devin 的 MCP 市场](/zh/work-with-devin/mcp)**
* **[将远程 MCP 服务器连接到 Claude](https://support.anthropic.com/en/articles/11175166-about-custom-integrations-using-remote-mcp)**
* **[OpenAI 关于使用 DeepWiki MCP 服务器的文档](https://platform.openai.com/docs/guides/tools-remote-mcp)**
* **[DeepWiki](/zh/work-with-devin/deepwiki)**
* **[Ask Devin](/zh/work-with-devin/ask-devin)**

<Note>
  想在私有代码库中使用 DeepWiki 能力？请在 [Devin.ai](https://devin.ai/) 注册 Devin 账号，并使用你的 Devin API 密钥配合 [Devin MCP 服务器](/zh/work-with-devin/devin-mcp)。
</Note>
