A Node.js server implementing the Model Context Protocol (MCP) for interacting with the storacha.network platform via the w3 command-line interface (@web3-storage/w3cli). This server empowers 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. - Wraps the w3 CLI for
Add this skill
npx mdskills install alexbakers/mcp-ipfsComprehensive MCP wrapper for storacha.network with extensive tool coverage and clear setup docs
1# ๐ช MCP IPFS Server (storacha.network) ๐ฐ๏ธ2345[](https://github.com/alexbakers/mcp-ipfs/actions/workflows/publish-docker.yml) [](https://github.com/alexbakers/mcp-ipfs/actions/workflows/publish-npm.yml) [](https://badge.fury.io/js/mcp-ipfs)6[](https://smithery.ai/server/@alexbakers/mcp-ipfs)78A Node.js server implementing the [Model Context Protocol (MCP)](https://github.com/ModelContextProtocol/specification) for interacting with the [storacha.network](https://storacha.network/) platform via the `w3` command-line interface (`@web3-storage/w3cli`).910This server empowers 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.1112## โจ Features1314- Wraps the `w3` CLI for native integration with storacha.network.15- Provides MCP tools covering a wide range of `w3` functionality:16 - ๐ **Authentication & Agent:** `w3_login`, `w3_reset`, `w3_account_ls` (for checking authorization)17 - ๐ฆ **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)18 - ๐พ **Data Management:** `w3_up`, `w3_ls`, `w3_rm`19 - ๐ **Sharing:** `w3_open` (generates w3s.link URL)20 - ๐ค **Delegations & Proofs:** `w3_delegation_create`, `w3_delegation_ls`, `w3_delegation_revoke`, `w3_proof_add`, `w3_proof_ls`21 - ๐ **Keys & Tokens:** `w3_key_create`, `w3_bridge_generate_tokens`22 - โ๏ธ **Advanced Storage (`w3 can ...`):** Blob, CAR, Upload, Index, Access Claim, Filecoin Info management23 - ๐ณ **Account & Billing:** `w3_plan_get`, `w3_coupon_create`, `w3_usage_report`2425## ๐ ๏ธ Prerequisites2627- **Node.js:** Version 22.0.0 or higher (`node -v`).28- **`w3` CLI:** The server executes `w3` commands directly. Ensure `@web3-storage/w3cli` is installed globally and configured:29 ```bash30 npm install -g @web3-storage/w3cli31 w3 login <your-email@example.com>32 # Follow email verification steps33 ```34- **Environment Variable:** The `w3_login` tool requires the `W3_LOGIN_EMAIL` environment variable to be set to the same email used for `w3 login`.3536## ๐๏ธ Project Structure3738The codebase is organized as follows:3940```41src/42โโโ index.ts # Main server entry point, MCP setup, request routing43โโโ schemas.ts # Zod schemas defining input arguments for each tool44โโโ tool_handlers.ts # Implementation logic for each MCP tool45โโโ utils.ts # Helper functions (e.g., running w3 commands, parsing JSON)46โโโ utils/47 โโโ logger.ts # Basic logger configuration48```4950## ๐ Usage with MCP Clients5152This server can be used with any MCP-compatible client. You need to configure your client to connect to this server.5354### Example: NPX (Recommended for simple local use)5556This assumes `npm` and the prerequisites are met.5758```json59{60 "mcpServers": {61 "ipfs": {62 "command": "npx",63 "args": ["-y", "mcp-ipfs"],64 "env": {65 "W3_LOGIN_EMAIL": "your-email@example.com"66 }67 }68 }69}70```7172### Example: Docker7374Build the image first (see Build section) or use the pre-built image `alexbakers/mcp-ipfs`.7576```json77{78 "mcpServers": {79 "mcp-ipfs": {80 "command": "docker",81 "args": [82 "run",83 "-i",84 "--rm",85 "-v",86 "/path/to/your/project:/path/to/your/project",87 "-e",88 "W3_LOGIN_EMAIL",89 "alexbakers/mcp-ipfs"90 ],91 "env": {92 "W3_LOGIN_EMAIL": "your-email@example.com"93 }94 }95 }96}97```9899#### ๐ Note on Paths:100101Several `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`).102103- **NPX:** Provide absolute paths from your host machine.104- **Docker:** Provide absolute paths _inside the container_. If interacting with files from your host (e.g., uploading), you **must** mount the relevant host directory into the container using the `-v` flag (e.g., `-v /Users/me/project:/Users/me/project`) and then use the _container path_ (e.g., `/Users/me/project/my_file.txt`) in the tool arguments.105106## ๐ฆ Build107108Clone the repository and install dependencies:109110```bash111git clone https://github.com/alexbakers/mcp-ipfs.git112cd mcp-ipfs113npm install114```115116Build the TypeScript code:117118```bash119npm run build120```121122You can then run the server directly:123124```bash125# Ensure W3_LOGIN_EMAIL is set in your environment126export W3_LOGIN_EMAIL="your-email@example.com"127node dist/index.js128```129130Or publish it (if you have the rights):131132```bash133npm publish134```135136### ๐ณ Docker Build137138Build the Docker image:139140```bash141# Build locally (replace with your username/repo and desired tag)142docker build -t alexbakers/mcp-ipfs .143```144145## ๐ License146147This MCP server is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.148
Full transparency โ inspect the skill content before installing.