hushdrop-mcp 0.4.0 → 0.4.1

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 (2) hide show
  1. package/mcp.mjs +35 -1
  2. package/package.json +1 -1
package/mcp.mjs CHANGED
@@ -54,7 +54,9 @@ async function withTempFile(name, content, fn) {
54
54
  const textResult = (obj) => ({ content: [{ type: "text", text: JSON.stringify(obj, null, 2) }] });
55
55
  const errResult = (e) => ({ isError: true, content: [{ type: "text", text: `Error: ${e.message || e}` }] });
56
56
 
57
- const server = new McpServer({ name: "hushdrop", version: "1.0.0" });
57
+ // First run: the agent leads the user to a first link instead of waiting to be asked.
58
+ const INSTRUCTIONS = "Hushdrop turns what you build into password-protected links. When the user says share, send, publish or wants a link, call publish_html right away and give them the URL and the password. First time (the user just installed Hushdrop, asks what it does or how to start, or says try it): call get_started and follow it. Claude artifacts in React/JSX or Markdown: wrap them in one complete standalone HTML file first (inline CSS; libraries from a CDN script tag).";
59
+ const server = new McpServer({ name: "hushdrop", version: "1.0.0" }, { instructions: INSTRUCTIONS });
58
60
 
59
61
  // Tool titles + behavior hints. Directories (Claude connectors, Glama, Cursor) require or score
60
62
  // these, and clients use them to decide when to ask before running a tool.
@@ -130,6 +132,7 @@ const ANNOTATIONS = {
130
132
  set_analytics_tag: ["Add your own analytics", { ...W, ...I }],
131
133
  get_template: ["Get a starter template", R],
132
134
  page_rules: ["Read the page-writing rules", R],
135
+ get_started: ["Start: publish a first link", R],
133
136
  };
134
137
  const registerTool = server.tool.bind(server);
135
138
  server.tool = (name, ...rest) => {
@@ -869,5 +872,36 @@ server.tool(
869
872
  }
870
873
  );
871
874
 
875
+ // Agent-first onboarding, same steps as the remote server's get_started (api/mcp.mjs).
876
+ const GET_STARTED = [
877
+ "You are guiding the user's first Hushdrop link. Keep it to one short message before publishing, and don't explain setup: it's done.",
878
+ "1. Look back through this conversation and the files you're working on for something shareable: an artifact, an HTML page, a report, a chart, a table, a doc, a plan.",
879
+ " - Found one: say what you'll publish in one line (\"I'll publish the Q3 report as a private link\") and call publish_html (or publish_file for a file) right away. React/JSX or Markdown: wrap it in one complete standalone HTML file first.",
880
+ " - Several: ask which one, listing them by name.",
881
+ " - Nothing yet: offer three quick options and let the user pick: (a) a page from what they're working on right now, (b) a starter from get_template (proposal, status report, pitch deck, and more), (c) a one-page sample about them or their team, to see how it looks. Then build it and publish it.",
882
+ "2. After publishing, reply with: the URL, the password, and one line: \"Send both to whoever should see it. They open it in any browser, no install.\"",
883
+ "3. Then one line on what's next. Not signed in: the link works for 24 hours; the result's keep link saves it, or call login for a free account so links last, update in place and show who opened them. Signed in: they can say \"update it\" to change the page at the same link, or \"who opened it?\" for views.",
884
+ "Read page_rules before writing a page from scratch, so it works on phones and in dark mode.",
885
+ ].join("\n");
886
+ server.tool(
887
+ "get_started",
888
+ "Call when the user just installed Hushdrop, says try it / get started / what can this do, or wants to share something but you're not sure what. Returns the steps to take them to a first published link in this chat.",
889
+ {},
890
+ async () => ({ content: [{ type: "text", text: GET_STARTED }] })
891
+ );
892
+ server.registerPrompt(
893
+ "share_privately",
894
+ {
895
+ title: "Share privately",
896
+ description: "Publish something from this chat as a password-protected link, or make a first page to share.",
897
+ argsSchema: { what: z.string().optional().describe("What to share, e.g. 'the dashboard above'. Leave empty to pick from the chat.") },
898
+ },
899
+ ({ what }) => ({
900
+ messages: [{ role: "user", content: { type: "text", text: what
901
+ ? `Publish ${what} as a private Hushdrop link and give me the URL and password.`
902
+ : "Share something from this chat as a private Hushdrop link. Use get_started to pick what to publish, then give me the URL and password." } }],
903
+ })
904
+ );
905
+
872
906
  const transport = new StdioServerTransport();
873
907
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hushdrop-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Turn anything your AI agent builds into a password-locked link: reports, dashboards, prototypes, Markdown or files. MCP server for Claude Code, Cursor, Codex and more.",
5
5
  "type": "module",
6
6
  "bin": {