@scayver/specshot-mcp-server 0.13.0 → 0.22.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/README.md +67 -10
- package/dist/build-standard.js +1070 -743
- package/dist/client.js +53 -3
- package/dist/index.js +37 -3
- package/dist/skills.js +193 -54
- package/dist/tool-descriptions.js +73 -12
- package/dist/tools/agent-loop.js +5 -0
- package/dist/tools/brand.js +64 -0
- package/dist/tools/canvas.js +2 -2
- package/dist/tools/concepts.js +28 -1
- package/dist/tools/etch-ai.js +37 -0
- package/dist/tools/etch-audit.js +30 -0
- package/dist/tools/knowledge.js +60 -0
- package/dist/tools/library.js +71 -0
- package/dist/tools/live.js +94 -0
- package/dist/tools/offline.js +16 -0
- package/dist/tools/project-edit.js +55 -0
- package/dist/tools/references.js +106 -0
- package/dist/tools/review.js +10 -0
- package/dist/tools/search-console.js +25 -0
- package/dist/tools/seo.js +82 -0
- package/dist/tools/site.js +23 -0
- package/dist/tools/skills.js +25 -7
- package/dist/tools/tasks.js +60 -0
- package/dist/tools/wireframe.js +27 -0
- package/dist/tools/wordpress.js +33 -3
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { toolDescription } from "../tool-descriptions.js";
|
|
3
|
+
function ok(data) {
|
|
4
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
5
|
+
}
|
|
6
|
+
function fail(message) {
|
|
7
|
+
return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
|
|
8
|
+
}
|
|
9
|
+
const num = (v) => (v === undefined ? undefined : String(v));
|
|
10
|
+
const path = (projectId, rest) => `/api/mcp/projects/${encodeURIComponent(projectId)}/${rest}`;
|
|
11
|
+
async function run(work, label) {
|
|
12
|
+
try {
|
|
13
|
+
return ok(await work());
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
return fail(e instanceof Error ? e.message : label);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Project tasks for agents (docs/PROJECT-FLOW-PLAN.md, Phase 4): read a project's tasks for people,
|
|
21
|
+
* add, change and close them, and set the dates beside them (a page's due date and owner, an open
|
|
22
|
+
* round's answer-by date, the target launch), over the REST routes under /api/mcp/projects/[id]/tasks
|
|
23
|
+
* and /schedule. The hosted endpoint registers the same tools from
|
|
24
|
+
* apps/web/src/lib/mcp/tools-tasks.ts, and the descriptions come from the generated
|
|
25
|
+
* tool-descriptions.ts, so the two transports cannot drift. The server checks every argument.
|
|
26
|
+
*/
|
|
27
|
+
export function registerTaskTools(server, client) {
|
|
28
|
+
server.tool("list_project_tasks", toolDescription("list_project_tasks"), {
|
|
29
|
+
projectId: z.string(),
|
|
30
|
+
filter: z.enum(["open", "mine", "done", "all"]).optional(),
|
|
31
|
+
pageId: z.string().optional(),
|
|
32
|
+
limit: z.number().optional(),
|
|
33
|
+
offset: z.number().optional(),
|
|
34
|
+
}, async ({ projectId, filter, pageId, limit, offset }) => run(() => client.get(path(projectId, "tasks"), { filter, pageId, limit: num(limit), offset: num(offset) }), "Failed to list the project's tasks."));
|
|
35
|
+
server.tool("create_project_task", toolDescription("create_project_task"), {
|
|
36
|
+
projectId: z.string(),
|
|
37
|
+
title: z.string(),
|
|
38
|
+
notes: z.string().optional(),
|
|
39
|
+
pageId: z.string().optional(),
|
|
40
|
+
assignee: z.string().optional(),
|
|
41
|
+
contactId: z.string().optional(),
|
|
42
|
+
dueOn: z.string().optional(),
|
|
43
|
+
status: z.enum(["todo", "doing"]).optional(),
|
|
44
|
+
}, async ({ projectId, ...rest }) => run(() => client.post(path(projectId, "tasks"), rest), "Failed to add the task."));
|
|
45
|
+
server.tool("update_project_task", toolDescription("update_project_task"), {
|
|
46
|
+
projectId: z.string(),
|
|
47
|
+
taskId: z.string(),
|
|
48
|
+
title: z.string().optional(),
|
|
49
|
+
notes: z.string().optional(),
|
|
50
|
+
status: z.enum(["todo", "doing", "done", "canceled"]).optional(),
|
|
51
|
+
assignee: z.string().optional(),
|
|
52
|
+
contactId: z.string().optional(),
|
|
53
|
+
dueOn: z.string().optional(),
|
|
54
|
+
pageId: z.string().optional(),
|
|
55
|
+
}, async ({ projectId, taskId, ...rest }) => run(() => client.patch(path(projectId, `tasks/${encodeURIComponent(taskId)}`), rest), "Failed to change the task."));
|
|
56
|
+
server.tool("complete_project_task", toolDescription("complete_project_task"), { projectId: z.string(), taskId: z.string() }, async ({ projectId, taskId }) => run(() => client.post(path(projectId, `tasks/${encodeURIComponent(taskId)}/complete`), {}), "Failed to mark the task done."));
|
|
57
|
+
server.tool("set_page_schedule", toolDescription("set_page_schedule"), { projectId: z.string(), pageId: z.string(), dueOn: z.string().optional(), ownerUserId: z.string().optional() }, async ({ projectId, ...rest }) => run(() => client.patch(path(projectId, "schedule/page"), rest), "Failed to set the page's date or owner."));
|
|
58
|
+
server.tool("set_round_due_date", toolDescription("set_round_due_date"), { projectId: z.string(), roundId: z.string().optional(), dueOn: z.string() }, async ({ projectId, ...rest }) => run(() => client.patch(path(projectId, "schedule/round"), rest), "Failed to set the round's date."));
|
|
59
|
+
server.tool("set_target_launch", toolDescription("set_target_launch"), { projectId: z.string(), targetLaunchOn: z.string() }, async ({ projectId, ...rest }) => run(() => client.patch(path(projectId, "schedule/launch"), rest), "Failed to set the target launch."));
|
|
60
|
+
}
|
package/dist/tools/wireframe.js
CHANGED
|
@@ -22,6 +22,33 @@ export function registerWireframeTools(server, client) {
|
|
|
22
22
|
return fail(e instanceof Error ? e.message : "Failed to list projects.");
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
+
server.tool("list_clients", toolDescription("list_clients"), { limit: z.number().int().min(1).max(200).optional(), offset: z.number().int().min(0).optional() }, async ({ limit, offset }) => {
|
|
26
|
+
try {
|
|
27
|
+
return ok(await client.get("/api/mcp/clients", { limit: limit?.toString(), offset: offset?.toString() }));
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
return fail(e instanceof Error ? e.message : "Failed to list clients.");
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
// The server checks everything the portal's New project checks (lib/projects/create.ts): the
|
|
34
|
+
// plan's cap, the builder and starting point lists, and that a client id is this workspace's.
|
|
35
|
+
server.tool("create_project", toolDescription("create_project"), {
|
|
36
|
+
name: z.string().min(1).max(255),
|
|
37
|
+
clientName: z.string().max(255).optional(),
|
|
38
|
+
websiteUrl: z.string().max(2048).optional(),
|
|
39
|
+
brief: z.string().max(20000).optional(),
|
|
40
|
+
builderPreference: z.string().max(60).optional(),
|
|
41
|
+
category: z.string().max(80).optional(),
|
|
42
|
+
clientFolderId: z.string().optional(),
|
|
43
|
+
startingPoint: z.string().max(60).optional(),
|
|
44
|
+
}, async ({ name, clientName, websiteUrl, brief, builderPreference, category, clientFolderId, startingPoint }) => {
|
|
45
|
+
try {
|
|
46
|
+
return ok(await client.post("/api/mcp/projects", { name, clientName, websiteUrl, brief, builderPreference, category, clientFolderId, startingPoint }));
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
return fail(e instanceof Error ? e.message : "Failed to create the project.");
|
|
50
|
+
}
|
|
51
|
+
});
|
|
25
52
|
server.tool("get_project_intelligence", toolDescription("get_project_intelligence"), { projectId: z.string() }, async ({ projectId }) => {
|
|
26
53
|
try {
|
|
27
54
|
return ok(await client.get(`/api/mcp/projects/${projectId}/intelligence`));
|
package/dist/tools/wordpress.js
CHANGED
|
@@ -6,11 +6,25 @@ function ok(data) {
|
|
|
6
6
|
function fail(message) {
|
|
7
7
|
return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
|
|
8
8
|
}
|
|
9
|
+
const deploys = (projectId, rest = "") => `/api/mcp/projects/${encodeURIComponent(projectId)}/wordpress/deploys${rest ? `/${rest}` : ""}`;
|
|
10
|
+
async function run(work, label) {
|
|
11
|
+
try {
|
|
12
|
+
return ok(await work());
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
15
|
+
return fail(e instanceof Error ? e.message : label);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
9
18
|
/**
|
|
10
19
|
* SpecShot for WordPress: the sites connected to a project through the SpecShot plugin, with
|
|
11
|
-
* whether each runs Automatic.css, over the REST route /api/mcp/projects/[id]/wordpress
|
|
12
|
-
*
|
|
13
|
-
*
|
|
20
|
+
* whether each runs Automatic.css, over the REST route /api/mcp/projects/[id]/wordpress; and drafts
|
|
21
|
+
* to WordPress (the owner, 2026-11-05): send approved pages to a paired site as drafts, read the
|
|
22
|
+
* deploys and one deploy's progress, and cancel one that has not gone live, over the routes under
|
|
23
|
+
* /api/mcp/projects/[id]/wordpress/deploys. Go live and Roll back are a person's click in SpecShot;
|
|
24
|
+
* no tool reaches them. The hosted endpoint registers the same tools from
|
|
25
|
+
* apps/web/src/lib/mcp/wordpress-tools.ts, and the descriptions come from the generated
|
|
26
|
+
* tool-descriptions.ts, so the two transports cannot drift. The server runs the portal's own rules
|
|
27
|
+
* and checks every argument.
|
|
14
28
|
*/
|
|
15
29
|
export function registerWordPressTools(server, client) {
|
|
16
30
|
server.tool("list_wordpress_sites", toolDescription("list_wordpress_sites"), { projectId: z.string() }, async ({ projectId }) => {
|
|
@@ -21,4 +35,20 @@ export function registerWordPressTools(server, client) {
|
|
|
21
35
|
return fail(e instanceof Error ? e.message : "Failed to list the project's WordPress sites.");
|
|
22
36
|
}
|
|
23
37
|
});
|
|
38
|
+
server.tool("send_to_wordpress", toolDescription("send_to_wordpress"), {
|
|
39
|
+
projectId: z.string(),
|
|
40
|
+
siteId: z.string(),
|
|
41
|
+
designIds: z.array(z.string()).optional(),
|
|
42
|
+
siteRunId: z.string().optional(),
|
|
43
|
+
pageIds: z.array(z.string()).optional(),
|
|
44
|
+
postTypes: z.array(z.string()).optional(),
|
|
45
|
+
}, async ({ projectId, ...rest }) => run(() => client.post(deploys(projectId), rest), "Failed to send the pages to WordPress."));
|
|
46
|
+
server.tool("list_wordpress_deploys", toolDescription("list_wordpress_deploys"), {
|
|
47
|
+
projectId: z.string(),
|
|
48
|
+
designId: z.string().optional(),
|
|
49
|
+
pageId: z.string().optional(),
|
|
50
|
+
siteRunId: z.string().optional(),
|
|
51
|
+
}, async ({ projectId, designId, pageId, siteRunId }) => run(() => client.get(deploys(projectId), { designId, pageId, siteRunId }), "Failed to read the project's deploys to WordPress."));
|
|
52
|
+
server.tool("get_wordpress_deploy", toolDescription("get_wordpress_deploy"), { projectId: z.string(), deployId: z.string() }, async ({ projectId, deployId }) => run(() => client.get(deploys(projectId, encodeURIComponent(deployId))), "Failed to read the deploy."));
|
|
53
|
+
server.tool("cancel_wordpress_deploy", toolDescription("cancel_wordpress_deploy"), { projectId: z.string(), deployId: z.string() }, async ({ projectId, deployId }) => run(() => client.post(deploys(projectId, `${encodeURIComponent(deployId)}/cancel`), {}), "Failed to cancel the deploy."));
|
|
24
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayver/specshot-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "MCP server for SpecShot \u2014 lets Claude Code, Claude Desktop, and Cursor fetch approved design concepts with brand tokens and a ready-to-build prompt.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|