drops-mcp 0.1.1 → 0.1.3

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/drop.mjs +15 -1
  2. package/mcp.mjs +6 -6
  3. package/package.json +1 -1
package/drop.mjs CHANGED
@@ -546,10 +546,24 @@ async function cmdDeploy(opts) {
546
546
 
547
547
  console.log(`drop deploy — wiring backend in ${repoRoot}${dry ? " (dry run)" : ""}\n`);
548
548
 
549
+ const hasVercel = spawnSync(process.platform === "win32" ? "where" : "which", ["vercel"], { stdio: "ignore", shell: process.platform === "win32" }).status === 0;
550
+
551
+ // 0. auto-provision the Vercel project + Blob store so self-host is one command.
552
+ if (!dry && hasVercel) {
553
+ if (!existsSync(join(repoRoot, ".vercel", "project.json"))) {
554
+ console.log("linking a Vercel project…");
555
+ spawnSync("vercel", ["link", "--yes"], { cwd: repoRoot, stdio: "inherit", shell: process.platform === "win32" });
556
+ }
557
+ if (!getToken() && !opts.token) {
558
+ console.log("creating a Blob store 'drops' (if needed)…");
559
+ spawnSync("vercel", ["blob", "store", "add", "drops"], { cwd: repoRoot, stdio: "inherit", shell: process.platform === "win32" });
560
+ }
561
+ }
562
+
549
563
  // 1. token
550
564
  let token = getToken() || opts.token;
551
565
  if (!token) { token = await pullTokenFromVercel(); }
552
- if (!token) die("no BLOB_READ_WRITE_TOKEN. Create a Blob store (vercel blob store add drops), then: drop deploy --token vercel_blob_rw_...");
566
+ if (!token) die("no BLOB_READ_WRITE_TOKEN. Run 'vercel blob store add drops' (or `vercel login`), then: drop deploy --token vercel_blob_rw_...");
553
567
 
554
568
  // 2. discover the public blob host via a throwaway upload
555
569
  const { put, del } = await loadBlob();
package/mcp.mjs CHANGED
@@ -2,14 +2,14 @@
2
2
  /**
3
3
  * drops MCP server — the MCP-native publish primitive for HTML/artifacts your agents make.
4
4
  *
5
- * Open-source, self-hosted counterpart to Stacktree's MCP: an agent calls `publish_html`
6
- * and gets back a branded, password-protected, zero-knowledge link on YOUR own domain.
7
- * Every tool shells out to the battle-tested `drop` CLI (drop.mjs --json) so the MCP and
8
- * CLI share one pipeline. Nothing is hosted by a third party — it's your Vercel Blob.
5
+ * Open-source, self-hosted MCP publish primitive: an agent calls `publish_html` and gets
6
+ * back a branded, password-protected, zero-knowledge link on YOUR own domain. Every tool
7
+ * shells out to the `drop` CLI (drop.mjs --json) so the MCP and CLI share one pipeline.
8
+ * Nothing is hosted by a third party — it's your Vercel Blob.
9
9
  *
10
10
  * Wire it into an agent (stdio):
11
- * claude mcp add drops -- npx -y --prefix <repo>/skill drops-mcp # once published
12
- * # or, from a clone:
11
+ * claude mcp add drops -- npx -y drops-mcp
12
+ * # or, from a checkout:
13
13
  * claude mcp add drops -- node <repo>/skill/mcp.mjs
14
14
  *
15
15
  * Requires `drop setup` to have run (BLOB_READ_WRITE_TOKEN in ~/.drop/.env).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drops-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Open-source artifact sharing — publish HTML/Markdown/files as branded, password-protected, zero-knowledge links on your own domain, from any AI agent. CLI + MCP server. The open-source, self-hosted Stacktree alternative.",
5
5
  "type": "module",
6
6
  "bin": {