IPFS Storacha Network MCP server

Enables AI access to the IPFS Storacha Network for decentralized file storage, content addressing, and persistent data management through the w3cli interface.
Back to servers
Setup instructions
Provider
Alex Baker
Release date
Apr 03, 2025
Language
TypeScript
Package
Stats
2.3K downloads
10 stars

MCP IPFS Server provides a Node.js implementation of the Model Context Protocol (MCP) for interacting with the storacha.network platform. It acts as a bridge between MCP clients (like language models) and the storacha.network platform by wrapping the w3 command-line interface, enabling operations such as uploading/downloading data, managing spaces, and handling delegations.

Prerequisites

  • Node.js: Version 22.0.0 or higher
  • w3 CLI: Install and configure the Web3 Storage CLI:
    npm install -g @web3-storage/w3cli
    w3 login <[email protected]>
    # Follow email verification steps
    
  • Environment Variable: Set W3_LOGIN_EMAIL to the same email used for w3 login

Installation

Using NPX (Recommended for simple local use)

No installation needed - you can use the package directly via NPX:

npx -y mcp-ipfs

Using Docker

Pull the pre-built image:

docker pull alexbakers/mcp-ipfs

Or build it yourself:

git clone https://github.com/alexbakers/mcp-ipfs.git
cd mcp-ipfs
docker build -t alexbakers/mcp-ipfs .

Manual Installation

  1. Clone the repository and install dependencies:

    git clone https://github.com/alexbakers/mcp-ipfs.git
    cd mcp-ipfs
    npm install
    
  2. Build the TypeScript code:

    npm run build
    
  3. Run the server:

    export W3_LOGIN_EMAIL="[email protected]"
    node dist/index.js
    

Configuration with MCP Clients

Configure your MCP client to connect to this server using one of these approaches:

NPX Configuration

{
  "mcpServers": {
    "ipfs": {
      "command": "npx",
      "args": ["-y", "mcp-ipfs"],
      "env": {
        "W3_LOGIN_EMAIL": "[email protected]"
      }
    }
  }
}

Docker Configuration

{
  "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": "[email protected]"
      }
    }
  }
}

Important Note on Paths

For commands requiring filesystem paths (like w3_up):

  • NPX: Use absolute paths from your host machine.
  • Docker: Use absolute paths within the container. Mount host directories with -v flag (e.g., -v /Users/me/project:/Users/me/project), then reference the container path.

Available Tools

The server provides these MCP tools wrapping w3 functionality:

Authentication & Agent

  • w3_login: Log in to storacha.network
  • w3_reset: Reset your login
  • w3_account_ls: Check authorization status

Space Management

  • w3_space_ls: List available spaces
  • w3_space_use: Set the current space
  • w3_space_info: Get information about a space
  • w3_space_add: Add a space
  • w3_space_provision: Provision a new space

Data Management

  • w3_up: Upload data
  • w3_ls: List uploaded data
  • w3_rm: Remove data

Sharing

  • w3_open: Generate a shareable w3s.link URL

Delegations & Proofs

  • w3_delegation_create: Create a delegation
  • w3_delegation_ls: List delegations
  • w3_delegation_revoke: Revoke a delegation
  • w3_proof_add: Add a proof
  • w3_proof_ls: List proofs

Keys & Tokens

  • w3_key_create: Create a key
  • w3_bridge_generate_tokens: Generate bridge tokens

Account & Billing

  • w3_plan_get: Get plan information
  • w3_coupon_create: Create a coupon
  • w3_usage_report: Generate a usage report

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "ipfs" '{"command":"npx","args":["-y","mcp-ipfs"],"env":{"W3_LOGIN_EMAIL":"[email protected]"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "ipfs": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-ipfs"
            ],
            "env": {
                "W3_LOGIN_EMAIL": "[email protected]"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "ipfs": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-ipfs"
            ],
            "env": {
                "W3_LOGIN_EMAIL": "[email protected]"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later