@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.
Files changed (3) hide show
  1. package/README.md +22 -6
  2. package/dist/stdio.js +85726 -157024
  3. package/package.json +14 -18
package/README.md CHANGED
@@ -6,11 +6,11 @@
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
  [![Node Version](https://img.shields.io/node/v/@fil-b/foc-storage-mcp)](https://nodejs.org)
8
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.
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
- - 🛠️ **10 MCP Tools** - Upload, manage, and price storage operations
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
- **Storage:** $2.50/TiB/month (pay-per-epoch: 30 seconds) Min: $0.06/month
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
- **CDN Egress:** $7/TiB downloaded 1 USDFC = ~146 GiB credits
167
+ 💡 Ask your agent: _"How much to store 500 GiB for 6 months?"_
164
168
 
165
- **Example:** 150 GiB for 1 year ≈ 0.44 USDFC ($0.44)
169
+ ## Validation
166
170
 
167
- 💡 Ask your agent: _"How much to store 500 GiB for 6 months?"_
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