@otskit/mcp 0.4.3 → 0.5.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/dist/index.js CHANGED
@@ -20,7 +20,7 @@ Commands:
20
20
  }
21
21
  switch (command) {
22
22
  case "serve": {
23
- const { runServer } = await import("./server-IDRHOKL7.js");
23
+ const { runServer } = await import("./server-6QAYMGCK.js");
24
24
  await runServer();
25
25
  break;
26
26
  }
@@ -71,6 +71,15 @@ function openWatchWindow(intervalMinutes = 5) {
71
71
  return { opened: true, interval_minutes: minutes, ...errorMsg ? { error: errorMsg } : {} };
72
72
  }
73
73
 
74
+ // src/tools/stamp-file.ts
75
+ import { readFileSync as readFileSync2 } from "fs";
76
+ import { OpSHA256 } from "@otskit/core";
77
+ async function stampFile(input, db, config) {
78
+ const data = new Uint8Array(readFileSync2(input.path));
79
+ const hash = Buffer.from(new OpSHA256().hash(data)).toString("hex");
80
+ return createTimestamp({ hash }, db, config);
81
+ }
82
+
74
83
  // src/tool-definitions.ts
75
84
  var TOOL_DEFINITIONS = [
76
85
  {
@@ -152,6 +161,21 @@ var TOOL_DEFINITIONS = [
152
161
  openWorldHint: false
153
162
  }
154
163
  },
164
+ {
165
+ name: "stamp_file",
166
+ description: "Stamps a file against public OpenTimestamps calendars. Computes SHA-256 of the file and stamps it on Bitcoin. IMPORTANT: the digest is sent to external calendar servers (alice.btc, bob.btc, finney, catallaxy).",
167
+ inputSchema: {
168
+ type: "object",
169
+ properties: { path: { type: "string", description: "Absolute path to the file to stamp" } },
170
+ required: ["path"]
171
+ },
172
+ annotations: {
173
+ readOnlyHint: false,
174
+ destructiveHint: false,
175
+ idempotentHint: false,
176
+ openWorldHint: true
177
+ }
178
+ },
155
179
  {
156
180
  name: "watch",
157
181
  description: "Opens a new terminal window that monitors pending stamps in real-time, polling at the given interval. The window stays open so the user can watch progress.",
@@ -201,6 +225,9 @@ async function runServer() {
201
225
  case "list_pending":
202
226
  result = listPending(args, db, config);
203
227
  break;
228
+ case "stamp_file":
229
+ result = await stampFile(args, db, config);
230
+ break;
204
231
  case "watch":
205
232
  result = openWatchWindow(args?.interval_minutes);
206
233
  break;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@otskit/mcp",
3
3
  "mcpName": "io.github.AlexAlves87/otskit-mcp",
4
- "version": "0.4.3",
4
+ "version": "0.5.0",
5
5
  "license": "MIT",
6
6
  "description": "OpenTimestamps MCP server — stamp, upgrade, verify via AI agents",
7
7
  "repository": {