@fil-b/foc-storage-mcp 0.1.0 → 0.1.2

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 CHANGED
@@ -38,7 +38,7 @@ Add the following configuration to your MCP client:
38
38
  "mcpServers": {
39
39
  "foc-storage": {
40
40
  "command": "npx",
41
- "args": ["@fil-b/foc-storage-mcp"],
41
+ "args": ["-y", "@fil-b/foc-storage-mcp"],
42
42
  "env": {
43
43
  "PRIVATE_KEY": "your_private_key_here"
44
44
  }
@@ -404,7 +404,9 @@ var getDatasets = async (withCDN = false, includeAll = false, onlyDatasetId = vo
404
404
  if (dataset.withCDN) {
405
405
  return `https://${userAddress}.calibration.filbeam.io/${pieceCid}`;
406
406
  } else {
407
- return `${serviceURL}/piece/${pieceCid}`;
407
+ const endsWithSlash = serviceURL.endsWith("/");
408
+ const serviceURLWithoutSlash = endsWithSlash ? serviceURL.slice(0, -1) : serviceURL;
409
+ return `${serviceURLWithoutSlash}/piece/${pieceCid}`;
408
410
  }
409
411
  };
410
412
  const datasetSizeInfo = data.pieces.reduce((acc, piece) => {
@@ -716,7 +718,10 @@ var uploadFile = createTool2({
716
718
  if (context.withCDN) {
717
719
  return `https://${await synapse.getSigner().getAddress()}.calibration.filbeam.io/${pieceCid2}`;
718
720
  } else {
719
- return `${(await storageService.getProviderInfo()).products.PDP?.data.serviceURL || ""}/piece/${pieceCid2}`;
721
+ const serviceURL = (await storageService.getProviderInfo()).products.PDP?.data.serviceURL || "";
722
+ const endsWithSlash = serviceURL.endsWith("/");
723
+ const serviceURLWithoutSlash = endsWithSlash ? serviceURL.slice(0, -1) : serviceURL;
724
+ return `${serviceURLWithoutSlash}/piece/${pieceCid2}`;
720
725
  }
721
726
  };
722
727
  const retrievalUrl = await getRetrievalUrl(pieceCid.toV1().toString());
@@ -1352,7 +1357,7 @@ var focStorageResources = {
1352
1357
  // src/mastra/index.ts
1353
1358
  var mcpServer = new MCPServer({
1354
1359
  name: "FOC Storage MCP",
1355
- version: "0.1.0",
1360
+ version: "0.1.1",
1356
1361
  description: "Professional-grade MCP server for decentralized file storage on Filecoin Onchain Cloud. Powered by the FOC-Synapse SDK, this server provides AI agents with seamless access to Filecoin's distributed storage network. Upload files with automatic payment handling, organize content in datasets, monitor storage balances, and manage providers - all through intuitive MCP tools. Supports both standard storage and CDN-enabled fast retrieval. Perfect for building AI applications that need persistent, censorship-resistant storage.",
1357
1362
  tools: focStorageTools,
1358
1363
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fil-b/foc-storage-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "main": "dist/mcp-server.js",
5
5
  "bin": {
6
6
  "foc-storage-mcp": "./dist/mcp-server.js"