mcp-ipfs

mcp-ipfs

MCP-compatible server for IPFS and storacha.network integration via w3 CLI

11
Stars
11
Forks
11
Watchers
3
Issues
Implements the Model Context Protocol (MCP) as a Node.js server, allowing language models and other MCP clients to interact with the storacha.network platform through w3 CLI command wrapping. Facilitates authenticated data storage, space management, file uploads/downloads, delegations, keys, and advanced storage features in a seamless MCP-compatible interface. Designed to work with tools like Docker and NPX for flexible deployment. Provides well-structured MCP tool handlers and schema validation for robust API exposure.

Key Features

Model Context Protocol (MCP) compliant server implementation
Wraps w3 CLI for seamless storacha.network integration
Supports file and data uploads/downloads via IPFS
Space and account management (creation, listing, switching)
Authentication and agent tools with environment variable support
Delegation, proof management, and key generation
Advanced storage and Filecoin-specific functions
Docker and NPX deployment options
Schema-based input validation using Zod
Modular structure for easy extension

Use Cases

Enabling AI models to access decentralized storage via MCP
Managing files and datasets on storacha.network programmatically
Automating storage space provisioning and usage reporting
Integrating authenticated data sharing in model workflows
Delegating storage access across teams or users securely
Running automated scripts for uploading and retrieving files using MCP clients
Managing credentials, keys, and storage tokens in cloud environments
Developing custom interfaces for storacha.network powered by IPFS
Simplifying file and storage workflows for research and data science
Bridging language models with decentralized protocol storage infrastructure

README

πŸͺ MCP IPFS Server (storacha.network) πŸ›°οΈ

Screenshot

Publish Docker Publish NPM npm version smithery badge

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.

✨ Features

  • Wraps the w3 CLI for native integration with storacha.network.
  • Provides MCP tools covering a wide range of w3 functionality:
    • πŸ”‘ Authentication & Agent: 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 w3s.link URL)
    • 🀝 Delegations & Proofs: w3_delegation_create, w3_delegation_ls, w3_delegation_revoke, w3_proof_add, w3_proof_ls
    • πŸ” Keys & Tokens: w3_key_create, w3_bridge_generate_tokens
    • βš™οΈ Advanced Storage (w3 can ...): Blob, CAR, Upload, Index, Access Claim, Filecoin Info management
    • πŸ’³ Account & Billing: w3_plan_get, w3_coupon_create, w3_usage_report

πŸ› οΈ Prerequisites

  • Node.js: Version 22.0.0 or higher (node -v).
  • w3 CLI: The server executes w3 commands directly. Ensure @web3-storage/w3cli is installed globally and configured:
    bash
    npm install -g @web3-storage/w3cli
    w3 login <your-email@example.com>
    # Follow email verification steps
    
  • Environment Variable: The w3_login tool requires the W3_LOGIN_EMAIL environment variable to be set to the same email used for w3 login.

πŸ—οΈ Project Structure

The codebase is organized as follows:

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

πŸš€ Usage with MCP Clients

This server can be used with any MCP-compatible client. You need to configure your client to connect to this server.

Example: NPX (Recommended for simple local use)

This assumes npm and the prerequisites are met.

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

Example: Docker

Build the image first (see Build section) or use the pre-built image alexbakers/mcp-ipfs.

json
{
  "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"
      }
    }
  }
}

πŸ“ Note on Paths:

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 your host machine.
  • 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.

πŸ“¦ Build

Clone the repository and install dependencies:

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

Build the TypeScript code:

bash
npm run build

You can then run the server directly:

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

Or publish it (if you have the rights):

bash
npm publish

🐳 Docker Build

Build the Docker image:

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

πŸ“œ License

This MCP server is licensed under the MIT License. See the LICENSE file for details.

Star History

Star History Chart

Repository Owner

alexbakers
alexbakers

User

Repository Details

Language TypeScript
Default Branch main
Size 27,870 KB
Contributors 2
License MIT License
MCP Verified Sep 5, 2025

Programming Languages

TypeScript
87.9%
JavaScript
9.61%
Dockerfile
2.49%

Tags

Topics

ai decentralized ipfs mcp mcp-server model-context-protocol model-context-protocol-servers storage storage-service

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • cloudflare/mcp-server-cloudflare

    cloudflare/mcp-server-cloudflare

    Connect Cloudflare services to Model Context Protocol (MCP) clients for AI-powered management.

    Cloudflare MCP Server enables integration between Cloudflare's suite of services and clients using the Model Context Protocol (MCP). It provides multiple specialized servers that allow AI models to access, analyze, and manage configurations, logs, analytics, and other features across Cloudflare's platform. Users can leverage natural language interfaces in compatible MCP clients to read data, gain insights, and perform automated actions on their Cloudflare accounts. This project aims to streamline the orchestration of security, development, monitoring, and infrastructure tasks through standardized MCP connections.

    • ⭐ 2,919
    • MCP
    • cloudflare/mcp-server-cloudflare
  • awslabs/mcp

    awslabs/mcp

    Specialized MCP servers for seamless AWS integration in AI and development environments.

    AWS MCP Servers is a suite of specialized servers implementing the open Model Context Protocol (MCP) to bridge large language model (LLM) applications with AWS services, tools, and data sources. It provides a standardized way for AI assistants, IDEs, and developer tools to access up-to-date AWS documentation, perform cloud operations, and automate workflows with context-aware intelligence. Featuring a broad catalog of domain-specific servers, quick installation for popular platforms, and both local and remote deployment options, it enhances cloud-native development, infrastructure management, and workflow automation for AI-driven tools. The project includes Docker, Lambda, and direct integration instructions for environments such as Amazon Q CLI, Cursor, Windsurf, Kiro, and VS Code.

    • ⭐ 6,220
    • MCP
    • awslabs/mcp
  • k8s-mcp-server

    k8s-mcp-server

    Securely enable Claude to run Kubernetes CLI tools via Anthropic's Model Context Protocol.

    K8s MCP Server provides a Docker-based implementation of Anthropic's Model Context Protocol (MCP), allowing Claude to securely execute Kubernetes CLI tools such as kubectl, helm, istioctl, and argocd within a containerized environment. It integrates with Claude Desktop so users can interact with their Kubernetes clusters using natural language. The server emphasizes security by operating as a non-root user and offering strict command validation, while also supporting major cloud providers like AWS, Google Cloud, and Azure. Easy configuration and support for various Unix tools further enhance its capabilities.

    • ⭐ 166
    • MCP
    • alexei-led/k8s-mcp-server
  • mcp-server-js

    mcp-server-js

    Enable secure, AI-driven process automation and code execution on YepCode via Model Context Protocol.

    YepCode MCP Server acts as a Model Context Protocol (MCP) server that facilitates seamless communication between AI platforms and YepCode’s workflow automation infrastructure. It allows AI assistants and clients to execute code, manage environment variables, and interact with storage through standardized tools. The server can expose YepCode processes directly as MCP tools and supports both hosted and local installations via NPX or Docker. Enterprise-grade security and real-time interaction make it suitable for integrating advanced automation into AI-powered environments.

    • ⭐ 31
    • MCP
    • yepcode/mcp-server-js
  • mcp-server-templates

    mcp-server-templates

    Deploy Model Context Protocol servers instantly with zero configuration.

    MCP Server Templates enables rapid, zero-configuration deployment of production-ready Model Context Protocol (MCP) servers using Docker containers and a comprehensive CLI tool. It provides a library of ready-made templates for common integrationsβ€”including filesystems, GitHub, GitLab, and Zendeskβ€”and features intelligent caching, smart tool discovery, and flexible configuration options via JSON, YAML, environment variables, or CLI. Perfect for AI developers, data scientists, and DevOps teams, it streamlines the process of setting up and managing MCP servers and has evolved into the MCP Platform for enhanced capabilities.

    • ⭐ 5
    • MCP
    • Data-Everything/mcp-server-templates
  • mcp

    mcp

    Universal remote MCP server connecting AI clients to productivity tools.

    WayStation MCP acts as a remote Model Context Protocol (MCP) server, enabling seamless integration between AI clients like Claude or Cursor and a wide range of productivity applications, such as Notion, Monday, Airtable, Jira, and more. It supports multiple secure connection transports and offers both general and user-specific preauthenticated endpoints. The platform emphasizes ease of integration, OAuth2-based authentication, and broad app compatibility. Users can manage their integrations through a user dashboard, simplifying complex workflow automations for AI-powered productivity.

    • ⭐ 27
    • MCP
    • waystation-ai/mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results