Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions ai/model-context-protocol.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,33 @@

The Model Context Protocol (MCP) is an open protocol that creates standardized connections between AI applications and external services, like documentation. Mintlify generates an MCP server from your documentation, preparing your content for the broader AI ecosystem where any MCP client like Claude, Cursor, Goose, ChatGPT, and others can connect to your documentation.

Your MCP server exposes a search tool for AI applications to query your documentation. Your users must connect your MCP server to their tools.
Your MCP server exposes tools for AI applications to interact with your documentation. Your users must connect your MCP server to their tools.

### How MCP servers work

When an AI application connects to your documentation MCP server, it can search your documentation directly in response to a user's prompt instead of relying on information from its training data or making a generic web search. Your MCP server provides access to all indexed content on your documentation site.
When an AI application connects to your documentation MCP server, it can search your documentation and retrieve full page content directly in response to a user's prompt instead of relying on information from its training data or making a generic web search. Your MCP server provides access to all indexed content on your documentation site.

- AI applications can proactively search your documentation while generating a response even if not explicitly asked to search your documentation for an answer.
- AI applications determine when to use the search tool based on the context of the conversation and the relevance of your documentation.
- Each search, also known as a tool call, happens during the generation process, so the AI application searches up-to-date information from your documentation to generate its response.
- AI applications determine when to use the available tools based on the context of the conversation and the relevance of your documentation.
- Each tool call happens during the generation process, so the AI application accesses up-to-date information from your documentation to generate its response.

### Available tools

Your MCP server provides the following tools:

- **Search**: Searches your documentation and returns matching results with titles, links, and content snippets. Each result includes a page path that can be used with the get page tool.

Check warning on line 27 in ai/model-context-protocol.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L27

In general, use active voice instead of passive voice ('be used').
- **Get page**: Retrieves the full content of a specific documentation page by its path. Use this tool to read the complete content of a page after finding it through search.

<Tip>
Some AI tools like Claude support both MCP and Skills. MCP gives the AI access to your documentation content, while Skills instruct the AI how to use that content effectively. They're complementary. MCP provides the data and Skills provide the instructions.
</Tip>

### Search parameters
### Search filtering parameters

The MCP search tool supports optional parameters that AI applications use to control and refine search results.

- **`pageSize`**: Number of results to return, between 1 and 50. Defaults to 10.
- **`scoreThreshold`**: Minimum relevance score between 0 and 1. Only returns results at or above this threshold. Use this to filter out low-relevance matches.

Check warning on line 39 in ai/model-context-protocol.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/model-context-protocol.mdx#L39

Use 'preceding' instead of 'above'.
- **`version`**: Filter results to a specific documentation version. For example, `'v0.7'`. Only returns content tagged with the specified version or content available across all versions.
- **`language`**: Filter results to a specific language code. For example, `'en'`, `'zh'`, or `'es'`. Only returns content in the specified language or content available across all languages.

Expand Down
17 changes: 13 additions & 4 deletions zh/ai/model-context-protocol.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,26 @@ import { PreviewButton } from "/snippets/previewbutton.jsx"

Model Context Protocol (MCP,模型上下文协议) 是一个开放协议,用于在 AI 应用与外部服务 (例如文档) 之间建立标准化连接。Mintlify 会基于你的文档生成一个 MCP 服务器,为更广泛的 AI 生态系统做好准备,让任何 MCP 客户端例如 Claude、Cursor、Goose、ChatGPT 等都可以连接到你的文档。

你的 MCP 服务器会向 AI 应用提供一个搜索工具,以便在你的文档中发起搜索请求。你的用户必须将你的 MCP 服务器连接到他们的工具中。
你的 MCP 服务器会向 AI 应用提供工具,以便与你的文档进行交互。你的用户必须将你的 MCP 服务器连接到他们的工具中。

<div id="how-mcp-servers-work">
### MCP 服务器的工作方式
</div>

当某个 AI 应用接入你的文档 MCP 服务器后,它可以直接根据用户提示搜索你的文档,而不是依赖其训练数据中的信息或执行通用的网页搜索。你的 MCP 服务器会提供对文档站点上所有已建立索引内容的访问权限。
当某个 AI 应用接入你的文档 MCP 服务器后,它可以直接根据用户提示搜索你的文档并获取完整页面内容,而不是依赖其训练数据中的信息或执行通用的网页搜索。你的 MCP 服务器会提供对文档站点上所有已建立索引内容的访问权限。

* AI 应用可以在生成回复时主动搜索你的文档,即使没有被明确要求搜索你的文档来获取答案。
* AI 应用会根据对话的 context 以及你的文档与当前话题的相关性来决定何时使用搜索工具。
* 每次搜索 (也称为一次工具调用) 都发生在生成过程中,因此 AI 应用会从你的文档中检索最新信息来生成回复。
* AI 应用会根据对话的 context 以及你的文档与当前话题的相关性来决定何时使用可用的工具。
* 每次工具调用都发生在生成过程中,因此 AI 应用会从你的文档中获取最新信息来生成回复。

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

你的 MCP 服务器提供以下工具:

* **搜索**:搜索你的文档并返回匹配结果,包括标题、链接和内容片段。每个结果都包含一个页面路径,可与获取页面工具配合使用。
* **获取页面**:通过路径获取特定文档页面的完整内容。在通过搜索找到页面后,使用此工具阅读页面的完整内容。

<Tip>
某些 AI 工具 (例如 Claude) 同时支持 MCP 和 Skills。MCP 让 AI 能够访问你的文档内容,而 Skills 则指导 AI 如何高效使用这些内容。两者是互补的:MCP 提供数据,Skills 提供指令。
Expand Down
Loading