Filecoin Onchain Cloud MCP
Provides AI agents with seamless access to Filecoin's decentralized storage network for persistent file storage and dataset management. It features automatic payment handling, CDN support, and cost estimation tools for efficient storage operations.
README
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) orcalibration(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"
}
}
}
}
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"
}
}
}
}
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-paymentgetDatasets- List all stored datasetsgetDataset- Get dataset detailscreateDataset- Create new dataset container
Balance & Payments
getBalances- Check wallet and storage metricsprocessPayment- Deposit USDFC tokens
Providers & Pricing
getProviders- List storage providersestimateStoragePricing- Calculate costsgetStoragePricingInfo- Explain pricing modelsconvertStorageSize- Convert units
Usage Examples
"Check my storage balance"
"Upload presentation.pdf with CDN enabled"
"How much to store 2 TB for 1 year?"
"Create a dataset for Q4 reports"
"Show all my datasets"
Troubleshooting
Server not found: Verify npx --version, check JSON syntax, restart IDE
"PRIVATE_KEY is required": Add to env section, must start with 0x
Transaction fails: Check FIL for gas, verify network setting, confirm USDFC balance
"Invalid Version" or npm dependency errors:
- Clear npm cache:
npm cache clean --force - Clear npx cache:
npx clear-npx-cache - Update npm:
npm install -g npm@latest - As last resort, use older npm:
npm install -g npm@10
Security
- Never commit private keys or
.envfiles - Test on Calibration network before mainnet
- Keep balance >30 days (Filecoin warm storage requirement)
- Monitor balance regularly with
getBalances - Use hardware wallets for production
Links
Contributing
Contributions welcome! Open an issue for major changes.
License
MIT © @nijoe1
Built with ❤️ by @FILBuilders for the Filecoin ecosystem
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。