Skip to content

Commit ae46663

Browse files
committed
feat(docs): update MCP documentation with implementation details and examples
1 parent 104ae88 commit ae46663

File tree

2 files changed

+48
-48
lines changed
  • docs/mcp
  • i18n/en/docusaurus-plugin-content-docs/current/mcp

2 files changed

+48
-48
lines changed

docs/mcp/index.md

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,48 @@ has_children: true
66
permalink: /mcp
77
---
88

9+
在 issue [#330](https://github.com/unit-mesh/auto-dev/issues/330), 我们创建了 AutoDev 的 MCP Tool 功能。
10+
911
# Model Context Protocol (MCP)
1012

11-
> MCP is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for
12-
> AI applications. Just as USB-C provides a standardized way to connect your devices to various peripherals and
13-
> accessories, MCP provides a standardized way to connect AI models to different data sources and tools.
13+
> MCP 旨在通过提供一种标准化的接口,LLM 应用可以访问外部信息、工具和资源。
14+
15+
优点:
16+
17+
- **解耦**大模型与工具调用
18+
- 提升开发效率与**工具生态**
19+
- **跨平台与协议标准化**
20+
21+
当前 MCP Server 的组件包括:
22+
23+
- 工具(模型控制):这些是大语言模型(LLM)可以调用以执行特定操作的函数(工具),例如天气 API,本质上就是函数调用。
24+
- 资源(应用控制):这些是 LLM 可以访问的数据源,类似于 REST API 中的 GET 端点。资源仅提供数据,不执行复杂计算,没有副作用,作为上下文/请求的一部分提供给模型。
25+
- 提示词模板(用户控制):这些是预定义的模板,用于以最优方式使用工具或资源,在进行推理之前选择使用。
26+
27+
在 AutoDev 是一个编程助手,因此主要是支持工具的使用。
28+
29+
## 环境准备
30+
31+
如下是 AutoDev 使用 MCP 的示例:
32+
33+
```json
34+
{
35+
"mcpServers": {
36+
"weather": {
37+
"command": "java",
38+
"args": [
39+
"-jar",
40+
"/Volumes/source/ai/autodev-mcp-test/java-mcp/target/mcp-0.0.1-SNAPSHOT.jar"
41+
]
42+
}
43+
}
44+
}
45+
```
1446

15-
In issue [#330](https://github.com/unit-mesh/auto-dev/issues/330), we discussed the possibility of using AutoDev as a
16-
MCP server.
17-
This document will discuss the implementation details.
47+
从配置中,你会看到使用 STDIO 方式的 MCP 调用,它依赖于 command 和 args 来启动 MCP 服务器。因此,当你知道不同语言开发 MCP 服务器时,
48+
你需要有对应的运行环境,确保可以通过命令行调用。
1849

19-
Requirements: Install Node.js with Npx
50+
- 使用 Java 开发 MCP 服务器,需要安装 JDK
51+
- 使用 Node.js 开发 MCP 服务器,需要: [Install Node.js with Npx](https://nodejs.org/en/download/package-manager)
52+
- 使用 Python 开发 MCP 服务器,需要安装 UV 或者其它工具
2053

21-
- https://nodejs.org/en/download/package-manager

i18n/en/docusaurus-plugin-content-docs/current/mcp/mcp.md

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,16 @@ has_children: true
66
permalink: /mcp
77
---
88

9-
在 issue [#330](https://github.com/unit-mesh/auto-dev/issues/330), 我们创建了 AutoDev 的 MCP Tool 功能。
10-
119
# Model Context Protocol (MCP)
1210

13-
> MCP 旨在通过提供一种标准化的接口,LLM 应用可以访问外部信息、工具和资源。
14-
15-
优点:
16-
17-
- **解耦**大模型与工具调用
18-
- 提升开发效率与**工具生态**
19-
- **跨平台与协议标准化**
20-
21-
当前 MCP Server 的组件包括:
22-
23-
- 工具(模型控制):这些是大语言模型(LLM)可以调用以执行特定操作的函数(工具),例如天气 API,本质上就是函数调用。
24-
- 资源(应用控制):这些是 LLM 可以访问的数据源,类似于 REST API 中的 GET 端点。资源仅提供数据,不执行复杂计算,没有副作用,作为上下文/请求的一部分提供给模型。
25-
- 提示词模板(用户控制):这些是预定义的模板,用于以最优方式使用工具或资源,在进行推理之前选择使用。
26-
27-
在 AutoDev 是一个编程助手,因此主要是支持工具的使用。
28-
29-
## 环境准备
30-
31-
如下是 AutoDev 使用 MCP 的示例:
32-
33-
```json
34-
{
35-
"mcpServers": {
36-
"weather": {
37-
"command": "java",
38-
"args": [
39-
"-jar",
40-
"/Volumes/source/ai/autodev-mcp-test/java-mcp/target/mcp-0.0.1-SNAPSHOT.jar"
41-
]
42-
}
43-
}
44-
}
45-
```
11+
> MCP is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for
12+
> AI applications. Just as USB-C provides a standardized way to connect your devices to various peripherals and
13+
> accessories, MCP provides a standardized way to connect AI models to different data sources and tools.
4614
47-
从配置中,你会看到使用 STDIO 方式的 MCP 调用,它依赖于 command 和 args 来启动 MCP 服务器。因此,当你知道不同语言开发 MCP 服务器时,
48-
你需要有对应的运行环境,确保可以通过命令行调用。
15+
In issue [#330](https://github.com/unit-mesh/auto-dev/issues/330), we discussed the possibility of using AutoDev as a
16+
MCP server.
17+
This document will discuss the implementation details.
4918

50-
- 使用 Java 开发 MCP 服务器,需要安装 JDK
51-
- 使用 Node.js 开发 MCP 服务器,需要: [Install Node.js with Npx](https://nodejs.org/en/download/package-manager)
52-
- 使用 Python 开发 MCP 服务器,需要安装 UV 或者其它工具
19+
Requirements: Install Node.js with Npx
5320

21+
- https://nodejs.org/en/download/package-manager

0 commit comments

Comments
 (0)