@scayver/specshot-mcp-server 0.14.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 +53 -10
- package/dist/build-standard.js +135 -58
- package/dist/client.js +53 -3
- package/dist/index.js +28 -3
- package/dist/skills.js +156 -43
- package/dist/tool-descriptions.js +62 -13
- 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 +23 -1
- package/dist/tools/etch-ai.js +37 -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 +30 -4
- package/dist/tools/site.js +23 -0
- package/dist/tools/skills.js +25 -7
- package/dist/tools/wireframe.js +27 -0
- package/dist/tools/wordpress.js +33 -3
- package/package.json +1 -1
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",
|