plyo-mcp 0.3.0 → 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 (2) hide show
  1. package/dist/index.js +9 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -126,8 +126,8 @@ async function pushBranch(branch) {
126
126
  function text(s) {
127
127
  return { content: [{ type: "text", text: s }] };
128
128
  }
129
- const server = new McpServer({ name: "plyo", version: "0.3.0" }, {
130
- instructions: "Plyo keeps every version of this project safe for a non-technical user. Call save_checkpoint automatically after every completed piece of work — do not wait to be asked. Pass both a plain-English note and the intent (what the user asked for, in their words). If the user started a Draft in Plyo, use start_draft with that draft's exact name to work in it — never create a duplicate.",
129
+ const server = new McpServer({ name: "plyo", version: "0.4.0" }, {
130
+ instructions: "Plyo keeps every version of this project safe for a non-technical user. Call save_checkpoint automatically after every completed piece of work — do not wait to be asked. Pass both a plain-English note and the intent (what the user asked for, in their words). If the user started a Draft in Plyo, use start_draft with that draft's exact name to work in it — never create a duplicate. Before schema changes, migrations, or anything that rewrites data, call backup_data first — it takes a restorable snapshot of the project's database.",
131
131
  });
132
132
  server.tool("list_projects", "List the user's Plyo projects (name, slug, live URL).", {}, async () => {
133
133
  const data = await api("/v1/projects");
@@ -231,6 +231,13 @@ server.tool("get_timeline", "Show the project's recent checkpoints (the timeline
231
231
  .map((c) => `${c.createdAt} — ${c.note} (${c.source}) [${c.id}]`)
232
232
  .join("\n"));
233
233
  });
234
+ server.tool("backup_data", "Take a snapshot of the project's database (and storage files) before risky data changes — schema migrations, bulk updates, deletions. The user can restore or download it from Settings → Backups.", {}, async () => {
235
+ const link = await requireLink();
236
+ const res = await api(`/v1/projects/${link.slug}/backups/run`, { method: "POST", body: "{}" });
237
+ return text(res.backup.status === "ready"
238
+ ? `Backed up: ${res.backup.summary ?? "snapshot saved"}. Safe to proceed — this can be restored from Settings → Backups.`
239
+ : `Backup started (${res.backup.status}). Check Settings → Backups before making destructive changes.`);
240
+ });
234
241
  server.tool("restore", "Restore the project to an earlier checkpoint. Never destructive: a new checkpoint is created and everything stays on the timeline.", { checkpointId: z.string().describe("Checkpoint id from get_timeline") }, async ({ checkpointId }) => {
235
242
  const link = await requireLink();
236
243
  const data = await api(`/v1/projects/${link.slug}/restore`, { method: "POST", body: JSON.stringify({ checkpointId }) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plyo-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "MCP server for Plyo \u2014 Undo and Publish for everything your AI builds. Save checkpoints, publish, restore.",
5
5
  "type": "module",
6
6
  "bin": {