Skip to main content
Glama

mcp-ipfs

by alexbakers

🪐 MCP IPFS 服务器(storacha.network)🛰️

截屏

一个实现模型上下文协议 (MCP) 的Node.js 服务器,用于通过w3命令行界面 ( @web3-storage/w3cli ) 与storacha.network平台进行交互。

该服务器通过无缝包装w3命令,使语言模型🤖和其他 MCP 客户端能够管理 storacha.network 空间、上传/下载数据、管理委托以及执行各种其他任务。

✨ 特点

  • 包装w3 CLI 以实现与 storacha.network 的本地集成。
  • 提供涵盖广泛w3功能的 MCP 工具:
    • 🔑身份验证和代理: w3_loginw3_resetw3_account_ls (用于检查授权)
    • 📦空间管理: w3_space_lsw3_space_usew3_space_infow3_space_addw3_space_provision (注意:由于交互式提示,必须手动运行w3_space_create
    • 💾数据管理: w3_upw3_lsw3_rm
    • 🔗分享: w3_open (生成 w3s.link URL)
    • 🤝委托与证明: w3_delegation_createw3_delegation_lsw3_delegation_revokew3_proof_addw3_proof_ls
    • 🔐密钥和令牌: w3_key_createw3_bridge_generate_tokens
    • ⚙️高级存储( w3 can ... ): Blob、CAR、上传、索引、访问声明、Filecoin 信息管理
    • 💳账户和账单: w3_plan_getw3_coupon_createw3_usage_report

🛠️ 先决条件

  • **Node.js:**版本 22.0.0 或更高版本( node -v )。
  • **w3 CLI:**服务器直接执行w3命令。确保已全局安装@web3-storage/w3cli并配置:
    npm install -g @web3-storage/w3cli w3 login <your-email@example.com> # Follow email verification steps
  • 环境变量: w3_login工具需要将W3_LOGIN_EMAIL环境变量设置为与w3 login使用的相同的电子邮件。

🏗️ 项目结构

代码库组织如下:

src/ ├── index.ts # Main server entry point, MCP setup, request routing ├── schemas.ts # Zod schemas defining input arguments for each tool ├── tool_handlers.ts # Implementation logic for each MCP tool ├── utils.ts # Helper functions (e.g., running w3 commands, parsing JSON) └── utils/ └── logger.ts # Basic logger configuration

🚀 与 MCP 客户端一起使用

此服务器可与任何兼容 MCP 的客户端一起使用。您需要配置客户端才能连接到此服务器。

例如:NPX(建议本地简单使用)

这假设npm和先决条件都已满足。

{ "mcpServers": { "ipfs": { "command": "npx", "args": ["-y", "mcp-ipfs"], "env": { "W3_LOGIN_EMAIL": "your-email@example.com" } } } }

示例:Docker

首先构建图像(参见构建部分)或使用预先构建的图像alexbakers/mcp-ipfs

{ "mcpServers": { "mcp-ipfs": { "command": "docker", "args": [ "run", "-i", "--rm", "-v", "/path/to/your/project:/path/to/your/project", "-e", "W3_LOGIN_EMAIL", "alexbakers/mcp-ipfs" ], "env": { "W3_LOGIN_EMAIL": "your-email@example.com" } } } }
📝 关于路径的注意事项:

一些w3命令需要绝对文件系统路径(例如, w3_upw3_delegation_create --outputw3_proof_addw3_can_blob_addw3_can_store_add )。

  • **NPX:**提供主机的绝对路径。
  • Docker: 在容器内提供绝对路径。如果需要与主机上的文件进行交互(例如上传),则必须使用-v标志(例如-v /Users/me/project:/Users/me/project )将相关的主机目录挂载到容器中,然后在工具参数中使用容器路径(例如/Users/me/project/my_file.txt )。

📦构建

克隆存储库并安装依赖项:

git clone https://github.com/alexbakers/mcp-ipfs.git cd mcp-ipfs npm install

构建 TypeScript 代码:

npm run build

然后您可以直接运行服务器:

# Ensure W3_LOGIN_EMAIL is set in your environment export W3_LOGIN_EMAIL="your-email@example.com" node dist/index.js

或者发布它(如果您有权利):

npm publish

🐳 Docker 构建

构建 Docker 镜像:

# Build locally (replace with your username/repo and desired tag) docker build -t alexbakers/mcp-ipfs .

📜 许可证

此 MCP 服务器采用 MIT 许可证。详情请参阅许可证文件。

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

🪐 MCP IPFS 服务器

该服务器通过无缝包装 w3 命令,使语言模型🤖和其他 MCP 客户端能够管理 storacha.network 空间、上传/下载数据、管理委托以及执行各种其他任务。

  1. ✨ 特点
    1. 🛠️ 先决条件
      1. 🏗️ 项目结构
        1. 🚀 与 MCP 客户端一起使用
          1. 例如:NPX(建议本地简单使用)
          2. 示例:Docker
        2. 📦构建
          1. 🐳 Docker 构建
        3. 📜 许可证

          Related MCP Servers

          • A
            security
            F
            license
            A
            quality
            A MCP Server used to collect MCP Servers over the internet.
            Last updated -
            3
            18
            Python
            • Apple
          • A
            security
            A
            license
            A
            quality
            An MCP server that provides tools for reading, writing, and editing files on the local filesystem.
            Last updated -
            1
            1,524
            Python
            Apache 2.0
            • Apple
          • A
            security
            A
            license
            A
            quality
            The server integrates with the free IMF data API and provides various features to facilitate data retrieval and analysis. The server is built using the FastMCP framework and offers the following functionalities:
            Last updated -
            10
            4
            Python
            Apache 2.0
          • A
            security
            F
            license
            A
            quality
            An MCP server designed to work with FFmpeg for media processing tasks, offering enhanced performance and secure communication for handling media processing requests.
            Last updated -
            2
            14
            12
            TypeScript

          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/alexbakers/mcp-ipfs'

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