mcp-ipfs

by alexbakers
Verified

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.

Integrations

  • Provides a Docker deployment option with path mapping capabilities to enable file operations between the host and container when using storage-related commands.

  • Integrates with storacha.network (powered by IPFS technology) to manage spaces, upload/download data, share content via w3s.link URLs, manage delegations, create proofs, handle authentication, and access usage/billing information.

  • Implemented as a Node.js server that wraps the w3 command-line interface, enabling language models to interact with storacha.network functionality through structured API calls.

🪐 MCP IPFS 서버(storacha.network) 🛰️

w3 명령줄 인터페이스( @web3-storage/w3cli )를 통해 storacha.network 플랫폼과 상호작용하기 위한 모델 컨텍스트 프로토콜(MCP)을 구현하는 Node.js 서버입니다.

이 서버는 언어 모델🤖 및 기타 MCP 클라이언트가 storacha.network 공간을 관리하고, 데이터를 업로드/다운로드하고, 위임을 관리하고, w3 명령을 원활하게 래핑하여 다양한 다른 작업을 수행할 수 있도록 지원합니다.

✨ 특징

  • storacha.network와의 기본 통합을 위해 w3 CLI를 래핑합니다.
  • 광범위한 w3 기능을 포괄하는 MCP 도구를 제공합니다.
    • 🔑 인증 및 에이전트: w3_login , w3_reset , w3_account_ls (권한 확인용)
    • 📦 공간 관리: w3_space_ls , w3_space_use , w3_space_info , w3_space_add , w3_space_provision (참고: 대화형 프롬프트로 인해 w3_space_create 수동으로 실행해야 함)
    • 💾 데이터 관리: w3_up , w3_ls , w3_rm
    • 🔗 공유: w3_open (w3s.link URL 생성)
    • 🤝 위임 및 증명: w3_delegation_create , w3_delegation_ls , w3_delegation_revoke , w3_proof_add , w3_proof_ls
    • 🔐 키 및 토큰: w3_key_create , w3_bridge_generate_tokens
    • ⚙️ 고급 저장소( w3 can ... ): Blob, CAR, 업로드, 인덱스, 액세스 클레임, Filecoin 정보 관리
    • 💳 계정 및 청구: w3_plan_get , w3_coupon_create , w3_usage_report

🛠️ 필수 조건

  • Node.js: 버전 22.0.0 이상( node -v ).
  • w3 CLI: 서버가 w3 명령을 직접 실행합니다. @web3-storage/w3cli 전역으로 설치되고 구성되어 있는지 확인하세요.지엑스피1
  • 환경 변수: 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_up , w3_delegation_create --output , w3_proof_add , w3_can_blob_add , w3_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 이미지를 빌드합니다.

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

📜 라이센스

이 MCP 서버는 MIT 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 라이선스 파일을 참조하세요.

You must be authenticated.

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

🪐 MCP IPFS 서버

이 서버는 언어 모델🤖 및 기타 MCP 클라이언트가 storacha.network 공간을 관리하고, 데이터를 업로드/다운로드하고, 위임을 관리하고, w3 명령을 원활하게 래핑하여 다양한 다른 작업을 수행할 수 있도록 지원합니다.

  1. ✨ Features
    1. 🛠️ Prerequisites
      1. 🏗️ Project Structure
        1. 🚀 Usage with MCP Clients
          1. Example: NPX (Recommended for simple local use)
          2. Example: Docker
        2. 📦 Build
          1. 🐳 Docker Build
        3. 📜 License
          ID: 1kj9uihg56