Skip to content

update rustfs mcp usage with docker guidance #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 10, 2025
Merged
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
Binary file added docs/en/guide/images/add-rustfs-mcp-succ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 68 additions & 1 deletion docs/en/guide/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "RustFS MCP ​User Guide​"
# RustFS MCP


**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.
**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.

### What is MCP?

Expand Down Expand Up @@ -119,6 +119,73 @@ rustfs-mcp --log-level debug --region us-west-2
}
}
```

### Use RustFS MCP with Docker

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.

```
# clone rustfs repo
git clone [email protected]:rustfs/rustfs.git

# build docker image
docker build -f crates/mcp/Dockerfile -t rustfs/rustfs-mcp .
```

After building successfully, you can use the docker to configure MCP in AI IDE.

#### RustFS MCP configuration in AI IDE

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:

```
{
"mcpServers": {
"rustfs-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"AWS_ACCESS_KEY_ID",
"-e",
"AWS_SECRET_ACCESS_KEY",
"-e",
"AWS_REGION",
"-e",
"AWS_ENDPOINT_URL",
"rustfs/rustfs-mcp"
],
"env": {
"AWS_ACCESS_KEY_ID": "rustfs_access_key",
"AWS_SECRET_ACCESS_KEY": "rustfs_secret_key",
"AWS_REGION": "cn-east-1",
"AWS_ENDPOINT_URL": "rustfs_instance_url"
}
}
}
}
```

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).

If adding successfully, you can see the [available tools](#️-available-tools) on MCP page.

![add rustfs mcp in trae mcp configuration successfully](images/add-rustfs-mcp-succ.png)

You can use MCP in Trea by input the corresponding prompt. For example, input below content in chat:

```
Please help to list all the buckets on rustfs instance, thanks!
```

Response returned:

![list rustfs bucket with rustfs mcp](images/list-rustfs-bucket-with-mcp.png)

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.

## 🛠️ Available Tools

The MCP server exposes the following tools that AI assistants can use:
Expand Down
Binary file added docs/zh/guide/images/add-rustfs-mcp-succ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 67 additions & 1 deletion docs/zh/guide/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "RustFS MCP 使用指南​"
# RustFS MCP


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

### 什么是 MCP?

Expand Down Expand Up @@ -128,6 +128,72 @@ rustfs-mcp --log-level debug --region us-west-2
}
```

### 在 Docker 中使用

[RustFS MCP 官方提供 Dockerfile](https://github.com/rustfs/rustfs/tree/main/crates/mcp),可以使用 Dockerfile 构建容器镜像来使用 RustFS MCP。

```
# 克隆 RustFS 仓库代码
git clone [email protected]:rustfs/rustfs.git

# 构建 Docker 镜像
docker build -f crates/mcp/Dockerfile -t rustfs/rustfs-mcp .
```

构建成功后可以在 AI IDE 的 MCP 配置中配置使用。

#### 在 AI IDE 中配置 MCP

目前主流的 AI IDE,诸如 Cursor、Windsurf、Trae 等都支持 MCP。比如,在 Trae 中,将如下内容添加到 MCP 配置中(**MCP --> 添加**):

```
{
"mcpServers": {
"rustfs-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"AWS_ACCESS_KEY_ID",
"-e",
"AWS_SECRET_ACCESS_KEY",
"-e",
"AWS_REGION",
"-e",
"AWS_ENDPOINT_URL",
"rustfs/rustfs-mcp"
],
"env": {
"AWS_ACCESS_KEY_ID": "rustfs_access_key",
"AWS_SECRET_ACCESS_KEY": "rustfs_secret_key",
"AWS_REGION": "cn-east-1",
"AWS_ENDPOINT_URL": "rustfs_instance_url"
}
}
}
}
```

> `AWS_ACCESS_KEY_ID` 和 `AWS_SECRET_ACCESS_KEY` 是 RustFS 的访问密钥,可以参考[访问密钥的管理章节](access-token.md)进行创建。

如果添加成功,可以在 MCP 配置页面列出[可用的工具](#️-可用工具)。

![add rustfs mcp in trae mcp configuration successfully](images/add-rustfs-mcp-succ.png)

在 Trae 中,输入对应的提示词就可以使用对应的工具(Tool)了。比如在 Trae 的聊天对话框中输入:

```
请帮我列出当前 rustfs 实例中的存储桶,谢谢!
```

返回如下响应:

![list rustfs bucket with rustfs mcp](images/list-rustfs-bucket-with-mcp.png)


Trae 使用 **Builder with MCP** 模式,调用了 `list_buckets` 工具,列出了配置 RustFS 实例中所有的存储桶。对于其他工具的调用也是一样的。

## 🛠️ 可用工具

Expand Down