Filecoin Onchain Cloud MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "PRIVATE_KEY=${PRIVATE_KEY}" filecoin-onchain-cloud -- npx -y @fil-b/foc-storage-mcp
Required:PRIVATE_KEY+ 4 optional
README.md

Decentralized file storage on Filecoin Onchain Cloud

Filecoin Onchain Cloud MCP

MCP server for decentralized file storage on Filecoin Onchain Cloud

@fil-b/foc-storage-mcp provides AI agents with seamless access to Filecoin's decentralized storage network through the Model Context Protocol (MCP). Store files persistently with automatic payment handling, CDN support, and comprehensive dataset management.

Features

  • 🛠️ 10 MCP Tools - Upload, manage, and price storage operations
  • 📁 Dataset Organization - Group related files efficiently
  • 💳 Automatic Payments - Built-in USDFC handling with gasless permits
  • CDN Support - Fast retrieval for frequently accessed files
  • 💰 Cost Estimation - Calculate costs, explain pricing, convert units
  • 🤖 AI-Ready - Designed for Claude, Cursor, and MCP clients

Configuration

Requirements:

  • Node.js >= 20.10.0 (Check version: node --version)
  • PRIVATE_KEY - Your Filecoin wallet private key (0x...)

Optional:

  • FILECOIN_NETWORK - mainnet (production) or calibration (testing, default)
  • TOTAL_STORAGE_NEEDED_GiB - Default storage capacity for calculations (default: 150 GiB)
  • PERSISTENCE_PERIOD_DAYS - Data retention duration (default: 365 days)
  • RUNOUT_NOTIFICATION_THRESHOLD_DAYS - Balance warning threshold (default: 45 days, recommended >30)

Note: Filecoin warm storage requires 30 days paid upfront. Keep balance above 30 days to maintain service.

Installation

Jump to: Cursor | Claude Code | Claude Desktop | VS Code | Windsurf | Codex | Other

Cursor

After installation, update PRIVATE_KEY in your config. Learn more

Claude Code

Add to .mcp.json:

{
  "mcpServers": {
    "foc-storage": {
      "command": "npx",
      "args": ["-y", "@fil-b/foc-storage-mcp"],
      "env": {
        "PRIVATE_KEY": "your_private_key_here",
        "FILECOIN_NETWORK": "calibration"
      }
    }
  }
}

Learn more

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "foc-storage": {
      "command": "npx",
      "args": ["-y", "@fil-b/foc-storage-mcp"],
      "env": {
        "PRIVATE_KEY": "your_private_key_here",
        "FILECOIN_NETWORK": "calibration"
      }
    }
  }
}

Learn more

VS Code

Create .vscode/mcp.json:

{
  "servers": {
    "foc-storage": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@fil-b/foc-storage-mcp"],
      "env": {
        "PRIVATE_KEY": "your_private_key_here",
        "FILECOIN_NETWORK": "calibration"
      }
    }
  }
}

Enable: Settings → Chat → MCP. Click "start" in mcp.json (Agent mode only). Learn more

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "foc-storage": {
      "command": "npx",
      "args": ["-y", "@fil-b/foc-storage-mcp"],
      "env": {
        "PRIVATE_KEY": "your_private_key_here",
        "FILECOIN_NETWORK": "calibration"
      }
    }
  }
}

Restart Windsurf. Learn more

OpenAI Codex

codex mcp add foc-storage -- npx -y @fil-b/foc-storage-mcp

Edit config to add environment variables. Verify: codex mcp list. Learn more

Other Tools

Most MCP tools support this format:

{
  "mcpServers": {
    "foc-storage": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@fil-b/foc-storage-mcp"],
      "env": {
        "PRIVATE_KEY": "your_private_key_here",
        "FILECOIN_NETWORK": "calibration"
      }
    }
  }
}

Pricing

Storage: $2.50/TiB/month (pay-per-epoch: 30 seconds) • Min: $0.06/month

Example: 150 GiB for 1 year ≈ 0.44 USDFC ($0.44)

💡 Ask your agent: "How much to store 500 GiB for 6 months?"

Tools

Ask naturally in Claude, Cursor, or any MCP client:

File Operations

  • uploadFile - Upload files with auto-payment
  • getDatasets - List all stored datasets
  • getDataset - Get dataset details
  • createDataset - Create new datas

Tools (4)

uploadFileUpload files with auto-payment
getDatasetsList all stored datasets
getDatasetGet dataset details
createDatasetCreate new datasets

Environment Variables

PRIVATE_KEYrequiredYour Filecoin wallet private key
FILECOIN_NETWORKFilecoin network to use (mainnet or calibration)
TOTAL_STORAGE_NEEDED_GiBDefault storage capacity for calculations
PERSISTENCE_PERIOD_DAYSData retention duration
RUNOUT_NOTIFICATION_THRESHOLD_DAYSBalance warning threshold

Configuration

claude_desktop_config.json
{"mcpServers": {"foc-storage": {"command": "npx", "args": ["-y", "@fil-b/foc-storage-mcp"], "env": {"PRIVATE_KEY": "your_private_key_here", "FILECOIN_NETWORK": "calibration"}}}}

Try it

How much would it cost to store 500 GiB of data for 6 months?
Upload the file at ./data/project-archive.zip to my Filecoin storage.
List all my currently stored datasets and their status.
Create a new dataset named 'research-logs' for my upcoming project.

Frequently Asked Questions

What are the key features of Filecoin Onchain Cloud?

Persistent file storage on Filecoin decentralized network. Automatic payment handling with USDFC and gasless permits. Comprehensive dataset management and organization. CDN support for fast retrieval of frequently accessed files. Built-in cost estimation and pricing explanation tools.

What can I use Filecoin Onchain Cloud for?

Archiving large project datasets securely on decentralized storage. Automating storage payments for long-term data retention. Calculating storage costs for specific project requirements before uploading. Managing and organizing multiple file collections for AI-driven workflows.

How do I install Filecoin Onchain Cloud?

Install Filecoin Onchain Cloud by running: npx -y @fil-b/foc-storage-mcp

What MCP clients work with Filecoin Onchain Cloud?

Filecoin Onchain Cloud works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Filecoin Onchain Cloud docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare