# Docs MCP 服务器

> Source: https://strapi.nodejs.cn/cms/ai/docs-mcp-server

🌐 Docs MCP server

Docs MCP 服务器向 AI 编码工具公开 Strapi 文档。将其连接到你的 IDE，即可在开发环境中直接获得针对 Strapi 的代码建议和答案。

🌐 A Docs MCP server exposes the Strapi documentation to AI coding tools. Connect it to your IDE to get Strapi-aware code suggestions and answers directly in your development environment.

Docs [MCP](https://modelcontextprotocol.io)（模型上下文协议）服务器由 [Kapa](https://kapa.ai) 提供支持，这也是文档网站上 **Ask AI** 按钮背后的服务。它使用完整的 Strapi 文档，包括指南、API 参考和代码示例。Docs MCP 服务器是 Strapi 提供的 [开发者 AI 工具](/cms/ai/for-developers) 的一部分。

🌐 The Docs [MCP](https://modelcontextprotocol.io) (Model Context Protocol) server is powered by [Kapa](https://kapa.ai), the same service behind the **Ask AI** button on the documentation website. It draws from the full Strapi documentation, including guides, API references, and code examples. The Docs MCP server is part of the [AI tools for developers](/cms/ai/for-developers) that Strapi offers.

:::strapi MCP servers for Strapi

Strapi 提供 2 种不同的 MCP 服务器：

🌐 Strapi offers 2 different MCP servers:

- 本页介绍的 Docs MCP 服务器，
- 以及用于内容管理的 Strapi MCP 服务器，详见其[专用功能页面](/cms/features/strapi-mcp-server)。

:::

## 兼容工具 {#compatible-tools}

🌐 Compatible tools

MCP 服务器兼容任何支持 MCP 协议的工具，包括：

🌐 The MCP server works with any tool that supports the MCP protocol, including:

- [光标](https://cursor.com)
- [VS Code](https://code.visualstudio.com) 与 GitHub Copilot
- [克劳德代码](https://docs.anthropic.com/en/docs/claude-code)
- [风帆冲浪](https://codeium.com/windsurf)
- 任何其他兼容 MCP 的 IDE 或工具

## 连接详情 {#connection-details}

🌐 Connection details

打开 Ask AI 窗口时，你应该会在右上角看到一个 **使用 MCP** 下拉菜单。点击它并选择你想要连接的工具：

🌐 When opening the Ask AI window, you should see a **Use MCP** dropdown in the top right corner. Click on it and choose which tool you'd like to connect:

如果需要手动配置 MCP 服务器：

🌐 If manual MCP server configuration is required:

1. 从下拉菜单中点击 **复制 MCP URL**。服务器 URL 应该是：`https://strapi-docs.mcp.kapa.ai`
2. 将服务器添加到你的 IDE 的 MCP 配置文件中：

    添加到你的 `.cursor/mcp.json` 文件中：

    ```json title=".cursor/mcp.json"
    {
      "mcpServers": {
        "strapi-docs": {
          "url": "https://strapi-docs.mcp.kapa.ai"
        }
      }
    }
    ```
    添加到你的 `.vscode/mcp.json` 文件中：

    ```json title=".vscode/mcp.json"
    {
      "servers": {
        "strapi-docs": {
          "type": "http",
          "url": "https://strapi-docs.mcp.kapa.ai"
        }
      }
    }
    ```
    添加到你的 `~/.codeium/windsurf/mcp_config.json` 文件中：

    ```json title="~/.codeium/windsurf/mcp_config.json"
    {
      "mcpServers": {
        "strapi-docs": {
          "serverUrl": "https://strapi-docs.mcp.kapa.ai"
        }
      }
    }
    ```

一旦连接，你的 AI 编码助手可以直接查询 Strapi 文档来回答问题、提供实现建议并验证 API 的使用。

🌐 Once connected, your AI coding assistant can query the Strapi documentation directly to answer questions, suggest implementations, and verify API usage.

:::tip

对于与文档相关的问题，请在提示开头使用 `Use the strapi-docs MCP server to answer:`。这将确保工具查询 docs.strapi.io，而不是基于其可能已过时的训练数据返回答案。

🌐 For docs-related questions, start your prompts with `Use the strapi-docs MCP server to answer:`. This will ensure the tool queries docs.strapi.io instead of returning answers based on its training data, which can be outdated.

:::
