Purpose
MCP IPFS Server (storacha.network) is a Node.js server that implements the Model Context Protocol (MCP) for interacting with the storacha.network platform through the w3 command-line interface (@web3-storage/w3cli). It enables language models and other MCP clients to manage storacha.network spaces, upload/download data, manage delegations, and perform various other tasks by seamlessly wrapping w3 commands.
Main Capabilities
This server provides MCP tools covering the extensive functionality of w3:
- 🔑 Authentication and Agents: w3_login, w3_reset, w3_account_ls (for checking authorization)
- 📦 Space Management: w3_space_ls, w3_space_use, w3_space_info, w3_space_add, w3_space_provision (Note: w3_space_create must be run manually due to interactive prompts)
- 💾 Data Management: w3_up, w3_ls, w3_rm
- 🔗 Sharing: w3_open (generates a w3s.link URL)
- 🤝 Delegation and Proofs: w3_delegation_create, w3_delegation_ls, w3_delegation_revoke, w3_proof_add, w3_proof_ls
- 🔐 Keys and Tokens: w3_key_create, w3_bridge_generate_tokens
- ⚙️ Advanced Storage (w3 can ...): Blob, CAR, Upload, Index, Access Claim, Filecoin Info management
- 💳 Account and Billing: w3_plan_get, w3_coupon_create, w3_usage_report
Usage
Prerequisites
- Node.js: version 22.0.0 or higher (node -v).
- w3 CLI: The server directly executes w3 commands. Ensure @web3-storage/w3cli is installed globally and configured: npm install -g @web3-storage/w3cli w3 login your-email@example.com # Follow the email verification steps
- Environment Variables: The w3_login tool requires the W3_LOGIN_EMAIL environment variable to be set to the same email as w3 login.
Using with MCP Clients
This server can be used with any MCP-compatible client. You need to configure the client to connect to this server.
Example: NPX (recommended for simple local use) This approach assumes npm and the prerequisites are already met.
Example: Docker First build the image (see the Build section) or use the prebuilt image alexbakers/mcp-ipfs.
Several w3 commands require absolute filesystem paths (e.g., w3_up, w3_delegation_create --output, w3_proof_add, w3_can_blob_add, w3_can_store_add).
- NPX: Provide absolute paths from the host machine.
- Docker: Provide absolute paths inside the container. If interacting with files on the host machine (e.g., uploading), you must use the -v flag to mount the relevant host directory into the container (e.g., -v /Users/me/project:/Users/me/project), then use the container path in the tool arguments (e.g., /Users/me/project/my_file.txt).
Build
Clone the repository and install dependencies. Build the TypeScript code. The server can then be run directly. Alternatively, publish it (if you have permission). Build the Docker image.
Use Cases
Suitable for scenarios where you need to manage storacha.network spaces, upload and download data, manage delegations, handle keys and tokens, and perform account and billing operations through language models or MCP clients. Especially suitable for developers who want to integrate storacha.network's w3 functionality into automated workflows or AI applications.
Limitations
- w3_space_create must be run manually because of interactive prompts.
- Some commands require absolute filesystem paths, and when using Docker, directories must be mounted correctly.
- The w3 CLI must be installed and configured in advance, and the W3_LOGIN_EMAIL environment variable must be set.
- License: MIT License, see the LICENSE file for details.