Skip to content

Commit c320902

Browse files
authored
update rustfs mcp usage with docker guidance (#30)
* update rustfs mcp usage with docker guidance * update mcp reference url due to the url is 404
1 parent 90d6f40 commit c320902

File tree

6 files changed

+135
-2
lines changed

6 files changed

+135
-2
lines changed
113 KB
Loading
209 KB
Loading

docs/en/guide/mcp.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: "RustFS MCP ​User Guide​"
66
# RustFS MCP
77

88

9-
**RustFS MCP Server** is a high-performance [Model Context Protocol (MCP)](https://spec.modelcontextprotocol.org) server that provides AI/LLM tools with seamless access to S3-compatible object storage operations. Built with Rust for maximum performance and safety, it enables AI assistants like Claude Desktop to interact with cloud storage through a standardized protocol.
9+
**RustFS MCP Server** is a high-performance [Model Context Protocol (MCP)](https://www.anthropic.com/news/model-context-protocol) server that provides AI/LLM tools with seamless access to S3-compatible object storage operations. Built with Rust for maximum performance and safety, it enables AI assistants like Claude Desktop to interact with cloud storage through a standardized protocol.
1010

1111
### What is MCP?
1212

@@ -119,6 +119,73 @@ rustfs-mcp --log-level debug --region us-west-2
119119
}
120120
}
121121
```
122+
123+
### Use RustFS MCP with Docker
124+
125+
RustFS MCP provides the [official Dockerfile](https://github.com/rustfs/rustfs/tree/main/crates/mcp), which can be used to build docker image, then use the RustFS MCP with Docker.
126+
127+
```
128+
# clone rustfs repo
129+
git clone git@github.com:rustfs/rustfs.git
130+
131+
# build docker image
132+
docker build -f crates/mcp/Dockerfile -t rustfs/rustfs-mcp .
133+
```
134+
135+
After building successfully, you can use the docker to configure MCP in AI IDE.
136+
137+
#### RustFS MCP configuration in AI IDE
138+
139+
Both of the popular AI IDE or editor(Cursor, windsurf, Trae, ect) support MCP. For example, if you use Trae, add the following content to MCP configuration page:
140+
141+
```
142+
{
143+
"mcpServers": {
144+
"rustfs-mcp": {
145+
"command": "docker",
146+
"args": [
147+
"run",
148+
"--rm",
149+
"-i",
150+
"-e",
151+
"AWS_ACCESS_KEY_ID",
152+
"-e",
153+
"AWS_SECRET_ACCESS_KEY",
154+
"-e",
155+
"AWS_REGION",
156+
"-e",
157+
"AWS_ENDPOINT_URL",
158+
"rustfs/rustfs-mcp"
159+
],
160+
"env": {
161+
"AWS_ACCESS_KEY_ID": "rustfs_access_key",
162+
"AWS_SECRET_ACCESS_KEY": "rustfs_secret_key",
163+
"AWS_REGION": "cn-east-1",
164+
"AWS_ENDPOINT_URL": "rustfs_instance_url"
165+
}
166+
}
167+
}
168+
}
169+
```
170+
171+
Where `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` are rustfs access token, for more details, you can see [rustfs access token management](access-token.md).
172+
173+
If adding successfully, you can see the [available tools](#️-available-tools) on MCP page.
174+
175+
![add rustfs mcp in trae mcp configuration successfully](images/add-rustfs-mcp-succ.png)
176+
177+
You can use MCP in Trea by input the corresponding prompt. For example, input below content in chat:
178+
179+
```
180+
Please help to list all the buckets on rustfs instance, thanks!
181+
```
182+
183+
Response returned:
184+
185+
![list rustfs bucket with rustfs mcp](images/list-rustfs-bucket-with-mcp.png)
186+
187+
Trae working with **Builder with MCP** mode calls `list_buckets` tool, and lists all the buckets on instance configured. You can try other calls with the same way.
188+
122189
## 🛠️ Available Tools
123190

124191
The MCP server exposes the following tools that AI assistants can use:
113 KB
Loading
239 KB
Loading

docs/zh/guide/mcp.md

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: "RustFS MCP 使用指南​"
66
# RustFS MCP
77

88

9-
**RustFS MCP 服务器**是一个高性能的 [模型上下文协议(MCP)](https://spec.modelcontextprotocol.org) 服务器,它为 AI/LLM 工具提供对 S3 兼容对象存储操作的无缝访问。该服务器使用 Rust 构建,以实现最大的性能和安全性,它使像 Claude Desktop 这样的 AI 助手能够通过标准化协议与云存储进行交互。
9+
**RustFS MCP 服务器**是一个高性能的 [模型上下文协议(MCP)](https://www.anthropic.com/news/model-context-protocol) 服务器,它为 AI/LLM 工具提供对 S3 兼容对象存储操作的无缝访问。该服务器使用 Rust 构建,以实现最大的性能和安全性,它使像 Claude Desktop 这样的 AI 助手能够通过标准化协议与云存储进行交互。
1010

1111
### 什么是 MCP?
1212

@@ -128,6 +128,72 @@ rustfs-mcp --log-level debug --region us-west-2
128128
}
129129
```
130130

131+
### 在 Docker 中使用
132+
133+
[RustFS MCP 官方提供 Dockerfile](https://github.com/rustfs/rustfs/tree/main/crates/mcp),可以使用 Dockerfile 构建容器镜像来使用 RustFS MCP。
134+
135+
```
136+
# 克隆 RustFS 仓库代码
137+
git clone git@github.com:rustfs/rustfs.git
138+
139+
# 构建 Docker 镜像
140+
docker build -f crates/mcp/Dockerfile -t rustfs/rustfs-mcp .
141+
```
142+
143+
构建成功后可以在 AI IDE 的 MCP 配置中配置使用。
144+
145+
#### 在 AI IDE 中配置 MCP
146+
147+
目前主流的 AI IDE,诸如 Cursor、Windsurf、Trae 等都支持 MCP。比如,在 Trae 中,将如下内容添加到 MCP 配置中(**MCP --> 添加**):
148+
149+
```
150+
{
151+
"mcpServers": {
152+
"rustfs-mcp": {
153+
"command": "docker",
154+
"args": [
155+
"run",
156+
"--rm",
157+
"-i",
158+
"-e",
159+
"AWS_ACCESS_KEY_ID",
160+
"-e",
161+
"AWS_SECRET_ACCESS_KEY",
162+
"-e",
163+
"AWS_REGION",
164+
"-e",
165+
"AWS_ENDPOINT_URL",
166+
"rustfs/rustfs-mcp"
167+
],
168+
"env": {
169+
"AWS_ACCESS_KEY_ID": "rustfs_access_key",
170+
"AWS_SECRET_ACCESS_KEY": "rustfs_secret_key",
171+
"AWS_REGION": "cn-east-1",
172+
"AWS_ENDPOINT_URL": "rustfs_instance_url"
173+
}
174+
}
175+
}
176+
}
177+
```
178+
179+
> `AWS_ACCESS_KEY_ID``AWS_SECRET_ACCESS_KEY` 是 RustFS 的访问密钥,可以参考[访问密钥的管理章节](access-token.md)进行创建。
180+
181+
如果添加成功,可以在 MCP 配置页面列出[可用的工具](#️-可用工具)
182+
183+
![add rustfs mcp in trae mcp configuration successfully](images/add-rustfs-mcp-succ.png)
184+
185+
在 Trae 中,输入对应的提示词就可以使用对应的工具(Tool)了。比如在 Trae 的聊天对话框中输入:
186+
187+
```
188+
请帮我列出当前 rustfs 实例中的存储桶,谢谢!
189+
```
190+
191+
返回如下响应:
192+
193+
![list rustfs bucket with rustfs mcp](images/list-rustfs-bucket-with-mcp.png)
194+
195+
196+
Trae 使用 **Builder with MCP** 模式,调用了 `list_buckets` 工具,列出了配置 RustFS 实例中所有的存储桶。对于其他工具的调用也是一样的。
131197

132198
## 🛠️ 可用工具
133199

0 commit comments

Comments
 (0)