@fil-b/foc-storage-mcp 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -177
- package/dist/stdio.js +64875 -152381
- package/package.json +7 -9
package/README.md
CHANGED
|
@@ -1,72 +1,32 @@
|
|
|
1
1
|
# Filecoin Onchain Cloud MCP
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
[
|
|
3
|
+
> ⚠️ **DEPRECATED — This repository is archived and no longer maintained.**
|
|
4
|
+
>
|
|
5
|
+
> 👉 **Use [`foc-cli`](https://github.com/FIL-Builders/foc-cli) instead.**
|
|
6
|
+
>
|
|
7
|
+
> `foc-cli` is the official successor. It includes everything this MCP server did, plus a full CLI, AI agent skills, and richer tooling for Filecoin Onchain Cloud.
|
|
8
|
+
|
|
9
|
+
[](https://github.com/FIL-Builders/foc-cli)
|
|
10
|
+
[](https://github.com/FIL-Builders/foc-cli)
|
|
6
11
|
[](https://opensource.org/licenses/MIT)
|
|
7
|
-
[](https://nodejs.org)
|
|
8
|
-
|
|
9
|
-
**@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.
|
|
10
|
-
|
|
11
|
-
## Features
|
|
12
|
-
|
|
13
|
-
- 🛠️ **10 MCP Tools** - Upload, manage, and price storage operations
|
|
14
|
-
- 📁 **Dataset Organization** - Group related files efficiently
|
|
15
|
-
- 💳 **Automatic Payments** - Built-in USDFC handling with gasless permits
|
|
16
|
-
- ⚡ **CDN Support** - Fast retrieval for frequently accessed files
|
|
17
|
-
- 💰 **Cost Estimation** - Calculate costs, explain pricing, convert units
|
|
18
|
-
- 🤖 **AI-Ready** - Designed for Claude, Cursor, and MCP clients
|
|
19
|
-
|
|
20
|
-
## Configuration
|
|
21
|
-
|
|
22
|
-
**Requirements:**
|
|
23
|
-
|
|
24
|
-
- Node.js >= 20.10.0 ([Check version](https://nodejs.org/): `node --version`)
|
|
25
|
-
- `PRIVATE_KEY` - Your Filecoin wallet private key (0x...)
|
|
26
|
-
|
|
27
|
-
**Optional:**
|
|
28
|
-
|
|
29
|
-
- `FILECOIN_NETWORK` - `mainnet` (production) or `calibration` (testing, default)
|
|
30
|
-
- `TOTAL_STORAGE_NEEDED_GiB` - Default storage capacity for calculations (default: 150 GiB)
|
|
31
|
-
- `PERSISTENCE_PERIOD_DAYS` - Data retention duration (default: 365 days)
|
|
32
|
-
- `RUNOUT_NOTIFICATION_THRESHOLD_DAYS` - Balance warning threshold (default: 45 days, **recommended >30**)
|
|
33
12
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## Installation
|
|
37
|
-
|
|
38
|
-
**Jump to:** [Cursor](#cursor) | [Claude Code](#claude-code) | [Claude Desktop](#claude-desktop) | [VS Code](#vs-code) | [Windsurf](#windsurf) | [Codex](#openai-codex) | [Other](#other-tools)
|
|
39
|
-
|
|
40
|
-
### Cursor
|
|
41
|
-
|
|
42
|
-
[](https://cursor.com/en-US/install-mcp?name=foc-storage&config=eyJlbnYiOnsiUFJJVkFURV9LRVkiOiJ5b3VyX3ByaXZhdGVfa2V5X2hlcmUiLCJGSUxFQ09JTl9ORVRXT1JLIjoiY2FsaWJyYXRpb24ifSwiY29tbWFuZCI6Im5weCAteSBAZmlsLWIvZm9jLXN0b3JhZ2UtbWNwIn0%3D)
|
|
43
|
-
|
|
44
|
-
After installation, update `PRIVATE_KEY` in your config. [Learn more](https://cursor.com/de/docs/context/mcp)
|
|
13
|
+
---
|
|
45
14
|
|
|
46
|
-
|
|
15
|
+
## 📣 Migration Notice
|
|
47
16
|
|
|
48
|
-
|
|
17
|
+
`@fil-b/foc-storage-mcp` has been replaced by **[`foc-cli`](https://github.com/FIL-Builders/foc-cli)** — a single package that provides:
|
|
49
18
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"args": ["-y", "@fil-b/foc-storage-mcp"],
|
|
56
|
-
"env": {
|
|
57
|
-
"PRIVATE_KEY": "your_private_key_here",
|
|
58
|
-
"FILECOIN_NETWORK": "calibration"
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
```
|
|
19
|
+
- ✅ **MCP server** — same agent-facing tools you had here, kept in sync with the SDK
|
|
20
|
+
- ✅ **CLI** — direct terminal access (`npx foc-cli upload ./file.pdf`)
|
|
21
|
+
- ✅ **AI agent skills** via [skills.sh](https://skills.sh) — works with Claude Code, Cursor, Copilot, Codex, Windsurf, and 20+ AI tools
|
|
22
|
+
- ✅ **Active maintenance** — built on the latest [Synapse SDK](https://github.com/FilOzone/synapse-sdk)
|
|
23
|
+
- ✅ **Expanded features** — multi-upload, redundant copies, structured output (`--json`, `--format yaml`), schema introspection, and more
|
|
64
24
|
|
|
65
|
-
|
|
25
|
+
If you were using this MCP server, switching takes one command.
|
|
66
26
|
|
|
67
|
-
###
|
|
27
|
+
### Quick migration
|
|
68
28
|
|
|
69
|
-
|
|
29
|
+
**Before** (this archived repo):
|
|
70
30
|
|
|
71
31
|
```json
|
|
72
32
|
{
|
|
@@ -74,164 +34,109 @@ Add to `claude_desktop_config.json`:
|
|
|
74
34
|
"foc-storage": {
|
|
75
35
|
"command": "npx",
|
|
76
36
|
"args": ["-y", "@fil-b/foc-storage-mcp"],
|
|
77
|
-
"env": {
|
|
78
|
-
"PRIVATE_KEY": "your_private_key_here",
|
|
79
|
-
"FILECOIN_NETWORK": "calibration"
|
|
80
|
-
}
|
|
37
|
+
"env": { "PRIVATE_KEY": "0x...", "FILECOIN_NETWORK": "calibration" }
|
|
81
38
|
}
|
|
82
39
|
}
|
|
83
40
|
}
|
|
84
41
|
```
|
|
85
42
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
### VS Code
|
|
43
|
+
**After** (`foc-cli`):
|
|
89
44
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
{
|
|
94
|
-
"servers": {
|
|
95
|
-
"foc-storage": {
|
|
96
|
-
"type": "stdio",
|
|
97
|
-
"command": "npx",
|
|
98
|
-
"args": ["-y", "@fil-b/foc-storage-mcp"],
|
|
99
|
-
"env": {
|
|
100
|
-
"PRIVATE_KEY": "your_private_key_here",
|
|
101
|
-
"FILECOIN_NETWORK": "calibration"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Enable: Settings → Chat → MCP. Click "start" in `mcp.json` (Agent mode only). [Learn more](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)
|
|
109
|
-
|
|
110
|
-
### Windsurf
|
|
111
|
-
|
|
112
|
-
Edit `~/.codeium/windsurf/mcp_config.json`:
|
|
45
|
+
```bash
|
|
46
|
+
# Auto-detect your agent and install
|
|
47
|
+
npx foc-cli mcp add
|
|
113
48
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"mcpServers": {
|
|
117
|
-
"foc-storage": {
|
|
118
|
-
"command": "npx",
|
|
119
|
-
"args": ["-y", "@fil-b/foc-storage-mcp"],
|
|
120
|
-
"env": {
|
|
121
|
-
"PRIVATE_KEY": "your_private_key_here",
|
|
122
|
-
"FILECOIN_NETWORK": "calibration"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
49
|
+
# Or target a specific agent
|
|
50
|
+
npx foc-cli mcp add --agent claude-code
|
|
127
51
|
```
|
|
128
52
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
### OpenAI Codex
|
|
53
|
+
Or install as an AI agent skill (recommended for Claude Code, Cursor, and similar):
|
|
132
54
|
|
|
133
55
|
```bash
|
|
134
|
-
|
|
56
|
+
npx skills add FIL-Builders/foc-cli
|
|
135
57
|
```
|
|
136
58
|
|
|
137
|
-
|
|
59
|
+
See the [foc-cli README](https://github.com/FIL-Builders/foc-cli) for full setup and command reference.
|
|
138
60
|
|
|
139
|
-
###
|
|
61
|
+
### Tool mapping
|
|
140
62
|
|
|
141
|
-
|
|
63
|
+
Every tool from this MCP server has an equivalent in `foc-cli`:
|
|
142
64
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## Pricing
|
|
65
|
+
| Old MCP tool (`@fil-b/foc-storage-mcp`) | New in `foc-cli` |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `uploadFile` | `foc-cli upload <path>` / MCP `upload` tool |
|
|
68
|
+
| `getDatasets` | `foc-cli dataset list` |
|
|
69
|
+
| `getDataset` | `foc-cli dataset details -d <id>` |
|
|
70
|
+
| `createDataset` | `foc-cli dataset create` |
|
|
71
|
+
| `getBalances` | `foc-cli wallet balance` / `wallet summary` |
|
|
72
|
+
| `processPayment` | `foc-cli wallet deposit <amount>` |
|
|
73
|
+
| `getProviders` | `foc-cli provider list` |
|
|
74
|
+
| `estimateStoragePricing` | `foc-cli wallet costs --extraBytes <n> --extraRunway <months>` |
|
|
75
|
+
| `getStoragePricingInfo` | `foc-cli docs --prompt "pricing"` |
|
|
76
|
+
| `convertStorageSize` | Handled natively by CLI flags |
|
|
160
77
|
|
|
161
|
-
|
|
78
|
+
---
|
|
162
79
|
|
|
163
|
-
|
|
80
|
+
## About this archive
|
|
164
81
|
|
|
165
|
-
|
|
82
|
+
The sections below describe `@fil-b/foc-storage-mcp` as it was when this repository was active. They are preserved for reference only — **no further updates, bug fixes, or security patches will be issued**. Please migrate to [`foc-cli`](https://github.com/FIL-Builders/foc-cli).
|
|
166
83
|
|
|
167
|
-
|
|
84
|
+
<details>
|
|
85
|
+
<summary><strong>Click to expand original README</strong></summary>
|
|
168
86
|
|
|
169
|
-
|
|
87
|
+
### What it was
|
|
170
88
|
|
|
171
|
-
|
|
89
|
+
`@fil-b/foc-storage-mcp` provided AI agents with access to Filecoin's decentralized storage network through the Model Context Protocol (MCP). It supported file upload with automatic USDFC payment handling, dataset organization, CDN-backed retrieval, and cost estimation.
|
|
172
90
|
|
|
173
|
-
|
|
91
|
+
### Original tools (10)
|
|
174
92
|
|
|
175
|
-
|
|
176
|
-
- `getDatasets` - List all stored datasets
|
|
177
|
-
- `getDataset` - Get dataset details
|
|
178
|
-
- `createDataset` - Create new dataset container
|
|
93
|
+
**File operations**
|
|
179
94
|
|
|
180
|
-
|
|
95
|
+
- `uploadFile` — Upload files with auto-payment
|
|
96
|
+
- `getDatasets` — List all stored datasets
|
|
97
|
+
- `getDataset` — Get dataset details
|
|
98
|
+
- `createDataset` — Create new dataset container
|
|
181
99
|
|
|
182
|
-
|
|
183
|
-
- `processPayment` - Deposit USDFC tokens
|
|
100
|
+
**Balance & payments**
|
|
184
101
|
|
|
185
|
-
|
|
102
|
+
- `getBalances` — Check wallet and storage metrics
|
|
103
|
+
- `processPayment` — Deposit USDFC tokens
|
|
186
104
|
|
|
187
|
-
|
|
188
|
-
- `estimateStoragePricing` - Calculate costs
|
|
189
|
-
- `getStoragePricingInfo` - Explain pricing models
|
|
190
|
-
- `convertStorageSize` - Convert units
|
|
105
|
+
**Providers & pricing**
|
|
191
106
|
|
|
192
|
-
|
|
107
|
+
- `getProviders` — List storage providers
|
|
108
|
+
- `estimateStoragePricing` — Calculate costs
|
|
109
|
+
- `getStoragePricingInfo` — Explain pricing models
|
|
110
|
+
- `convertStorageSize` — Convert units
|
|
193
111
|
|
|
194
|
-
|
|
195
|
-
"Check my storage balance"
|
|
196
|
-
"Upload presentation.pdf with CDN enabled"
|
|
197
|
-
"How much to store 2 TB for 1 year?"
|
|
198
|
-
"Create a dataset for Q4 reports"
|
|
199
|
-
"Show all my datasets"
|
|
200
|
-
```
|
|
112
|
+
### Original configuration
|
|
201
113
|
|
|
202
|
-
|
|
114
|
+
**Requirements:** Node.js >= 20.10.0, `PRIVATE_KEY` env var (Filecoin wallet, `0x...`)
|
|
203
115
|
|
|
204
|
-
**
|
|
116
|
+
**Optional env vars:**
|
|
205
117
|
|
|
206
|
-
|
|
118
|
+
- `FILECOIN_NETWORK` — `mainnet` or `calibration` (default)
|
|
119
|
+
- `TOTAL_STORAGE_NEEDED_GiB` — default 150
|
|
120
|
+
- `PERSISTENCE_PERIOD_DAYS` — default 365
|
|
121
|
+
- `RUNOUT_NOTIFICATION_THRESHOLD_DAYS` — default 45 (recommended >30; Filecoin warm storage requires 30 days paid upfront)
|
|
207
122
|
|
|
208
|
-
|
|
123
|
+
### Original pricing
|
|
209
124
|
|
|
210
|
-
|
|
125
|
+
Storage was billed at $2.50/TiB/month, paid per-epoch (30s), with a minimum of $0.06/month. Example: 150 GiB for 1 year ≈ 0.44 USDFC.
|
|
211
126
|
|
|
212
|
-
|
|
213
|
-
2. Clear npx cache: `npx clear-npx-cache`
|
|
214
|
-
3. Update npm: `npm install -g npm@latest`
|
|
215
|
-
4. As last resort, use older npm: `npm install -g npm@10`
|
|
127
|
+
These economics are unchanged in `foc-cli`, which uses the same Filecoin Warm Storage Service (FWSS) under the hood.
|
|
216
128
|
|
|
217
|
-
|
|
129
|
+
</details>
|
|
218
130
|
|
|
219
|
-
|
|
220
|
-
- Test on Calibration network before mainnet
|
|
221
|
-
- Keep balance >30 days (Filecoin warm storage requirement)
|
|
222
|
-
- Monitor balance regularly with `getBalances`
|
|
223
|
-
- Use hardware wallets for production
|
|
131
|
+
---
|
|
224
132
|
|
|
225
133
|
## Links
|
|
226
134
|
|
|
227
|
-
- [
|
|
228
|
-
- [
|
|
229
|
-
- [Filecoin Docs](https://docs.filecoin.
|
|
230
|
-
- [MCP Protocol](https://modelcontextprotocol.io/)
|
|
231
|
-
|
|
232
|
-
## Contributing
|
|
233
|
-
|
|
234
|
-
Contributions welcome! Open an issue for major changes.
|
|
135
|
+
- 🚀 **Replacement:** [FIL-Builders/foc-cli](https://github.com/FIL-Builders/foc-cli)
|
|
136
|
+
- 📦 NPM (replacement): [foc-cli](https://www.npmjs.com/package/foc-cli)
|
|
137
|
+
- 📚 [Filecoin Onchain Cloud Docs](https://docs.filecoin.cloud)
|
|
138
|
+
- 🤖 [MCP Protocol](https://modelcontextprotocol.io/)
|
|
139
|
+
- 🛠 [Skills.sh](https://skills.sh)
|
|
235
140
|
|
|
236
141
|
## License
|
|
237
142
|
|
|
@@ -239,4 +144,4 @@ MIT © [@nijoe1](https://github.com/nijoe1)
|
|
|
239
144
|
|
|
240
145
|
---
|
|
241
146
|
|
|
242
|
-
Built with ❤️ by @FILBuilders for the Filecoin ecosystem
|
|
147
|
+
Built with ❤️ by [@FILBuilders](https://github.com/FIL-Builders) for the Filecoin ecosystem.
|