Skip to main content
Glama

Storacha MCP Storage Server

Official
by storacha

Storacha MCP 存储服务器

Storacha 热存储的模型上下文协议 (MCP) 服务器实现,允许 AI 应用程序通过标准化接口存储和检索文件。它使用 IPFS 和 CID 实现去信任化、去中心化的数据交换,确保数据主权、可验证性以及与代理框架和 AI 系统的无缝集成。

免费存储选项开始🚀

立即开启您的去中心化存储之旅!

  • GitHub 用户:使用您的 GitHub 帐户注册并立即获得100MB 的免费存储空间- 无需信用卡!
  • 电子邮件用户:使用您的电子邮件注册并添加信用卡以解锁5GB 的免费存储空间

用例

  • 文档存储和分析:安全地上传和检索 Blob 文档。
  • 长期结构化数据存储:维护针对长寿命和可访问性进行优化的结构化数据存储。
  • 代理和系统之间的数据共享:使用**CID(内容标识符)**轻松在多个代理和不同系统之间共享数据,实现分散、可验证和高效的数据交换。
  • 应用程序集成:通过模型上下文协议将 Storacha 存储检索无缝集成到应用程序中。
  • AI 模型开发:通过提供可靠的版本控制和对存储在 Storacha 中的外部数据集的访问来支持 AI 模型。
  • LLM 集成:通过直接连接 Storacha Storage 实现无缝数据访问,增强大型语言模型 (LLM)。
  • Web 应用程序备份:可靠地存储 Web 应用程序的备份副本,以用于灾难恢复。
  • 机器学习数据集:有效管理和访问机器学习工作流中使用的大型数据集。

快速安装指南

只需几个简单的步骤即可开始使用 Storacha MCP 存储服务器。

  1. 克隆存储库
    git clone https://github.com/storacha/mcp-storage-server.git && cd mcp-storage-server
  2. 安装依赖项
    pnpm install
  3. 生成密钥和委托
    • 安装 CLI
      npm install -g @web3-storage/w3cli
    • 登录Storacha
      w3 login
      输出:
      ? How do you want to login? Via Email ❯ Via GitHub
      选择通过 GitHub并使用您的 GitHub 帐户进行身份验证。
    • 创建空间
      w3 space create <your_space_name>
      <your_space_name>替换为您的新空间的名称:确保您保存恢复密钥,以便您可以在需要时从其他设备访问您的空间。
    • 创建私钥
      w3 key create
      输出:
      AgentId: did:key:z6MkhMZRW2aoJ6BQwkpMSJu68Jgqkz1FTpr1p69cpnN43YWG PrivateKey: LMgCYLkvOc8Sm0mOL4cWFLxsWP0ZPEYrLxcQqsV93/s5RLje0BKx05muAse1Hkvh+sxUW38OcHtpiN1zxfpTJ4ht4jxV0=
    • 设置代理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 将文件存储到最近创建的空间的权限
  4. 配置 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指南。

: 有几种方法可以配置 MCP 客户端,请阅读integrations.md指南以获取更多信息。

工具

Storacha MCP 存储服务器为 AI 系统与去中心化存储网络交互提供了以下工具。

存储操作

上传

将文件上传到 Storacha 网络。该文件必须以 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; }
取回

从 Storacha 网络检索文件。支持的文件路径格式: CID/filename/ipfs/CID/filenameipfs://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; }
身份

返回从私钥存储配置加载的Storacha Agent的DIDKey

interface IdentityParams { // No parameters required }

请参阅integrations.md指南,了解详细的代码示例和不同的集成模式(SDK、Docker 等)。

执照

MIT 或 Apache 2 许可证

支持

如需支持,请访问Storacha 支持或在此存储库中打开问题。

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

使 AI 应用程序能够通过标准化模型上下文协议接口与分散存储进行交互,从而允许文件上传、检索和身份管理。

  1. 免费存储选项开始🚀
    1. 用例
      1. 快速安装指南
        1. REST 模式和云托管
      2. 工具
        1. 存储操作
      3. 执照
        1. 支持

          Related MCP Servers

          • A
            security
            F
            license
            A
            quality
            Enables AI models to perform file system operations (reading, creating, and listing files) on a local file system through a standardized Model Context Protocol interface.
            Last updated -
            3
            JavaScript
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that enables AI applications to interact with Dropbox, providing tools for file operations, metadata retrieval, searching, and account management through Dropbox's API.
            Last updated -
            TypeScript
            MIT License
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that extends AI capabilities by providing file system access and management functionalities to Claude or other AI assistants.
            Last updated -
            3
            TypeScript
            • Apple
          • A
            security
            A
            license
            A
            quality
            A secure Model Context Protocol server that provides controlled filesystem access within predefined directories, enabling AI models to perform file and directory operations with strict path validation.
            Last updated -
            16
            25
            7
            TypeScript
            MIT License
            • Linux
            • Apple

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/storacha/mcp-storage-server'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server