@fil-b/foc-storage-mcp 0.2.5 → 0.4.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 +22 -6
- package/dist/stdio.js +85726 -157024
- package/package.json +14 -18
package/README.md
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
[](https://nodejs.org)
|
|
8
8
|
|
|
9
|
-
**@fil-b/foc-storage-mcp**
|
|
9
|
+
**@fil-b/foc-storage-mcp** lets AI agents store and retrieve files on Filecoin's decentralized network through the Model Context Protocol (MCP), with automatic payment handling, CDN support, and dataset management.
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
-
- 🛠️ **
|
|
13
|
+
- 🛠️ **11 MCP Tools** - Upload, manage, price, and pay for storage operations
|
|
14
14
|
- 📁 **Dataset Organization** - Group related files efficiently
|
|
15
15
|
- 💳 **Automatic Payments** - Built-in USDFC handling with gasless permits
|
|
16
16
|
- ⚡ **CDN Support** - Fast retrieval for frequently accessed files
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
- `TOTAL_STORAGE_NEEDED_GiB` - Default storage capacity for calculations (default: 150 GiB)
|
|
31
31
|
- `PERSISTENCE_PERIOD_DAYS` - Data retention duration (default: 365 days)
|
|
32
32
|
- `RUNOUT_NOTIFICATION_THRESHOLD_DAYS` - Balance warning threshold (default: 45 days, **recommended >30**)
|
|
33
|
+
- `SYNAPSE_SOURCE` - Source tag identifying this client to Synapse (default: `foc-storage-mcp`)
|
|
33
34
|
|
|
34
35
|
> **Note:** Filecoin warm storage requires 30 days paid upfront. Keep balance above 30 days to maintain service.
|
|
35
36
|
|
|
@@ -158,13 +159,27 @@ Most MCP tools support this format:
|
|
|
158
159
|
|
|
159
160
|
## Pricing
|
|
160
161
|
|
|
161
|
-
|
|
162
|
+
Pricing is read from the live Synapse v1 price list. Storage is billed per epoch
|
|
163
|
+
(30 seconds) using the per-TiB monthly rate plus a recurring per-dataset service
|
|
164
|
+
fee for non-empty datasets. Uploads can also include one-time create-dataset and
|
|
165
|
+
add-pieces fees, and CDN egress is usage-based.
|
|
162
166
|
|
|
163
|
-
|
|
167
|
+
💡 Ask your agent: _"How much to store 500 GiB for 6 months?"_
|
|
164
168
|
|
|
165
|
-
|
|
169
|
+
## Validation
|
|
166
170
|
|
|
167
|
-
|
|
171
|
+
```bash
|
|
172
|
+
npm test
|
|
173
|
+
npx tsc --noEmit
|
|
174
|
+
npm run build:mcp
|
|
175
|
+
npm run smoke:mcp:readonly
|
|
176
|
+
npm run build
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`smoke:mcp:readonly` starts the built stdio server and exercises read-only MCP
|
|
180
|
+
tools for pricing, providers, balances, and datasets. It deliberately skips
|
|
181
|
+
upload, payment, withdrawal, and dataset-creation transactions; run those only
|
|
182
|
+
with an intentionally funded Calibration wallet.
|
|
168
183
|
|
|
169
184
|
## Tools
|
|
170
185
|
|
|
@@ -181,6 +196,7 @@ Ask naturally in Claude, Cursor, or any MCP client:
|
|
|
181
196
|
|
|
182
197
|
- `getBalances` - Check wallet and storage metrics
|
|
183
198
|
- `processPayment` - Deposit USDFC tokens
|
|
199
|
+
- `processWithdrawal` - Withdraw a specified USDFC amount to your wallet
|
|
184
200
|
|
|
185
201
|
**Providers & Pricing**
|
|
186
202
|
|