关于 Query Mind Server
Query Mind Server 是面向 Storacha 热存储的 MCP 服务,让 AI 应用通过标准接口上传和检索文件。它借助 IPFS 和 CID 支持去中心化、可验证的数据交换与数据自主权。
主要功能
- 01向 Storacha 上传文件
- 02通过 CID 路径检索文件
- 03可选择将上传内容发布到 Filecoin
- 04提供 Storacha Agent 身份
适用场景
- 01存储和检索用于分析的文档
- 02使用 CID 在 Agent 之间共享文件
- 03管理机器学习工作流中的数据集
- 04保存 Web 应用的备份副本
MCP 相关
它向 MCP 客户端提供 Storacha 存储操作,包括文件上传、检索和身份查询。支持 stdio、SSE 和 REST 传输模式。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
http://localhost:3001/restclaude mcp add --transport http storage-server-harshs1611 http://localhost:3001/rest{"mcpServers":{"storage-server-harshs1611":{"type":"http","url":"http://localhost:3001/rest"}}}在 Cursor 中打开{"servers":{"storage-server-harshs1611":{"type":"http","url":"http://localhost:3001/rest"}}}在 VS Code 中打开{"mcpServers":{"storage-server-harshs1611":{"type":"http","url":"http://localhost:3001/rest"}}}{"mcpServers":{"storage-server-harshs1611":{"serverUrl":"http://localhost:3001/rest"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
Storacha MCP 存储服务
Storacha 热存储的模型上下文协议(MCP)服务实现,让 AI 应用能够通过标准化接口存储和检索文件。它利用 IPFS 和 CID 实现无需信任的去中心化数据交换,确保数据主权和可验证性,并与 Agent 框架及 AI 系统无缝集成。
免费存储选项,立即开始 🚀
即刻开启去中心化存储之旅!
- GitHub 用户:使用 GitHub 账号注册,即可立即获得 100MB 免费存储空间——无需信用卡!
- 邮箱用户:使用邮箱注册并添加信用卡,即可解锁 5GB 免费存储空间。
使用场景
- 文档存储与分析:安全地上传和检索 Blob 文档。
- 长期结构化数据存储:维护针对持久性和可访问性进行优化的结构化数据存储。
- Agent 与系统间的数据共享:使用 CID(内容标识符),轻松在多个 Agent 和不同系统间共享数据,实现去中心化、可验证且高效的数据交换。
- 应用集成:通过模型上下文协议,将 Storacha 存储检索功能无缝集成到应用中。
- AI 模型开发:通过提供可靠的版本管理功能和对 Storacha 中外部数据集的访问,支持 AI 模型开发。
- 大模型集成:直接连接 Storacha 存储,实现无缝数据访问,增强大语言模型(LLM)的能力。
- Web 应用备份:可靠地存储 Web 应用的备份副本,以便灾难恢复。
- 机器学习数据集:高效管理和访问机器学习工作流中使用的大型数据集。
快速安装指南
只需几个简单步骤,即可开始使用 Storacha MCP 存储服务。
-
克隆仓库
git clone https://github.com/storacha/mcp-storage-server.git && cd mcp-storage-server -
安装依赖项
pnpm install -
生成密钥和委托
-
安装 CLI
npm install -g @web3-storage/w3cli -
登录 Storacha
w3 login输出:
? How do you want to login? Via Email ❯ Via GitHub选择 Via GitHub,并使用你的 GitHub 账户进行身份验证。
-
创建 Space
w3 space create <your_space_name>将
<your_space_name>替换为新 Space 的名称。 :warning: 请务必保存恢复密钥,以便在需要时从其他设备访问你的 space。 -
创建私钥
w3 key create输出:
AgentId: did:key:z6MkhMZRW2aoJ6BQwkpMSJu68Jgqkz1FTpr1p69cpnN43YWG PrivateKey: LMgCYLkvOc8Sm0mOL4cWFLxsWP0ZPEYrLxcQqsV93/s5RLje0BKx05muAse1Hkvh+sxUW38OcHtpiN1zxfpTJ4ht4jxV0= -
设置 Agent ID 并创建委托
w3 delegation create <agent_id> \ --can 'store/add' \ --can 'filecoin/offer' \ --can 'upload/add' \ --can 'space/blob/add' \ --can 'space/index/add' --base64将 <agent_id> 替换为上一步中的 AgentId。这会授予 Agent 将文件存储到最近创建的 space 中的权限。
-
-
配置 MCP 客户端
接下来,配置你的 MCP 客户端(例如 Cursor),以使用此服务。大多数 MCP 客户端会将配置存储为以下格式的 JSON:
{ "mcpServers": { "storacha-storage-server": { "command": "node", "args": ["./dist/index.js"], "env": { // The server supports `stdio`, `sse`, and `rest` modes, the default is `stdio`. "MCP_TRANSPORT_MODE": "stdio", // The Storacha Agent private key that is authorized to store data into the Space. "PRIVATE_KEY": "<agent_private_key>", // The base64 encoded delegation that proves the Agent is allowed to store data. If not set, MUST be provided for each upload request. "DELEGATION": "<base64_delegation>", }, "shell": true, "cwd": "./", }, }, }将
<agent_private_key>替换为你在第 3 步中创建的 PrivateKey。然后,将<base64_delegation>替换为你在第 3 步中创建的委托。REST 模式和云托管
Storacha MCP 存储服务支持 REST 传输模式,与 MCP.so 云托管兼容。若要使用 REST 模式:
{ "mcpServers": { "storacha-storage-server-rest": { "url": "http://localhost:3001/rest", }, }, }有关部署到 MCP.so 云的更多信息,请参阅 integrations.md 指南。
:warning: MCP 客户端有多种配置方式,请阅读 integrations.md 指南,了解更多信息。
工具
Storacha MCP 存储服务提供以下工具,供 AI 系统与去中心化存储网络交互。
存储操作
upload
将文件上传到 Storacha Network。文件必须以 base64 编码字符串的形式提供,且文件名必须包含扩展名,以便检测 MIME 类型。
interface UploadParams {
// Base64 encoded file content
file: string;
// Filename with extension for MIME type detection
name: string;
// Optional: Whether to publish to Filecoin (default: false)
publishToFilecoin?: boolean;
// Optional: Custom delegation proof
delegation?: string;
// Optional: Custom gateway URL
gatewayUrl?: string;
}
retrieve
从 Storacha Network 检索文件。支持的文件路径格式:CID/filename、/ipfs/CID/filename 或 ipfs://CID/filename。
interface RetrieveParams {
// Path in format: CID/filename, /ipfs/CID/filename, or ipfs://CID/filename
filepath: string;
// Optional: Whether to use multiformat base64 encoding
useMultiformatBase64?: boolean;
}
identity
返回从私钥存储配置中加载的 Storacha Agent 的 DIDKey。
interface IdentityParams {
// No parameters required
}
有关详细代码示例和不同集成模式(SDK、Docker 等),请参阅 integrations.md 指南。
许可证
MIT 或 Apache 2 License
支持
如需支持,请访问 Storacha Support,或在此仓库中提交问题。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。