elementor-mcp-agent 1.1.0 → 1.3.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/package.json CHANGED
@@ -1,19 +1,20 @@
1
1
  {
2
2
  "name": "elementor-mcp-agent",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "mcpName": "io.github.Mogacode-ma/elementor-mcp-agent",
5
- "description": "Agentic MCP server for WordPress Elementor \u2014 multi-site management, safe Elementor data editing, template import/export, CSS flush, version tracking. Built for agencies running many client sites.",
5
+ "description": "Agentic MCP server for WordPress Elementor multi-site management, safe Elementor data editing, template import/export, CSS flush, version tracking. Built for agencies running many client sites.",
6
6
  "type": "module",
7
7
  "main": "./dist/server.js",
8
8
  "bin": {
9
9
  "elementor-mcp-agent": "dist/server.js"
10
10
  },
11
11
  "files": [
12
- "dist",
13
- "README.md",
14
- "LICENSE",
15
12
  "ARCHITECTURE.md",
16
- "resources"
13
+ "LICENSE",
14
+ "README.md",
15
+ "dist",
16
+ "resources",
17
+ "scripts"
17
18
  ],
18
19
  "scripts": {
19
20
  "build": "tsup",
@@ -29,6 +30,7 @@
29
30
  "test:coverage": "vitest run --coverage",
30
31
  "inspector": "npx @modelcontextprotocol/inspector node dist/server.js",
31
32
  "docs:fetch": "tsx scripts/fetch-elementor-docs.ts",
33
+ "postinstall": "node scripts/postinstall.cjs || true",
32
34
  "prepublishOnly": "npm run lint && npm run typecheck && npm run test && npm run build"
33
35
  },
34
36
  "keywords": [
@@ -48,6 +50,10 @@
48
50
  "url": "https://github.com/Mogacode-ma/elementor-mcp-agent.git"
49
51
  },
50
52
  "homepage": "https://github.com/Mogacode-ma/elementor-mcp-agent",
53
+ "funding": {
54
+ "type": "github",
55
+ "url": "https://github.com/Mogacode-ma/elementor-mcp-agent"
56
+ },
51
57
  "engines": {
52
58
  "node": ">=18.0.0"
53
59
  },
@@ -70,4 +76,4 @@
70
76
  "typescript": "^5.4.0",
71
77
  "vitest": "^2.0.0"
72
78
  }
73
- }
79
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Fetch and convert a curated set of Elementor developer docs to local Markdown
3
+ * for MCP `resources/list` exposure.
4
+ *
5
+ * This is intentionally small (handful of high-signal pages) — we're not
6
+ * trying to mirror the entire site. Quality > quantity for token budget.
7
+ *
8
+ * Run: `npm run docs:fetch`
9
+ */
10
+ const SOURCES: Array<{ slug: string; url: string; title: string }> = [
11
+ // Hand-curated set. Expand cautiously — every entry adds tokens to the LLM context window.
12
+ { slug: "introduction", url: "https://developer.elementor.com/docs/getting-started/", title: "Getting started" },
13
+ { slug: "widgets-overview", url: "https://developer.elementor.com/docs/widgets/", title: "Widgets overview" },
14
+ { slug: "hooks", url: "https://developer.elementor.com/docs/hooks/", title: "Hooks reference" },
15
+ ];
16
+
17
+ async function main() {
18
+ console.error(`Fetching ${SOURCES.length} doc pages...`);
19
+ // Skeleton — actual scraping/Markdown conversion would use a fetch + html-to-md pipeline.
20
+ // We ship a hand-written corpus in resources/elementor-docs/ by default; this script
21
+ // is the future-proofing path for automated refresh.
22
+ console.error("This script is a placeholder. The curated docs in resources/elementor-docs/");
23
+ console.error("are hand-written for v0.1.0. Automated fetching is on the roadmap.");
24
+ }
25
+
26
+ main();
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Post-install greeting — shown once after `npm install`.
4
+ *
5
+ * Discreet by design:
6
+ * - Skip on CI=true (CI/CD shouldn't see this)
7
+ * - Skip on --silent / loglevel error
8
+ * - Skip on SUPPRESS_INSTALL_MESSAGE=1
9
+ * - Skip if already shown (marker in node_modules/.cache)
10
+ *
11
+ * Old-ezine style: just an honest word to the reader. No tracking.
12
+ */
13
+ "use strict";
14
+
15
+ const fs = require("node:fs");
16
+ const path = require("node:path");
17
+
18
+ const SUPPRESS_VARS = [
19
+ process.env.CI,
20
+ process.env.SUPPRESS_INSTALL_MESSAGE,
21
+ process.env.DISABLE_OPENCOLLECTIVE,
22
+ process.env.ADBLOCK,
23
+ process.env.npm_config_loglevel === "silent" ? "1" : "",
24
+ process.env.npm_config_loglevel === "error" ? "1" : "",
25
+ process.env.npm_config_loglevel === "warn" ? "1" : "",
26
+ ];
27
+ if (SUPPRESS_VARS.some(Boolean)) process.exit(0);
28
+
29
+ try {
30
+ const root = process.env.INIT_CWD || process.cwd();
31
+ const markerDir = path.join(root, "node_modules", ".cache", "elementor-mcp-agent");
32
+ const markerFile = path.join(markerDir, "greeted");
33
+ if (fs.existsSync(markerFile)) process.exit(0);
34
+ fs.mkdirSync(markerDir, { recursive: true });
35
+ fs.writeFileSync(markerFile, new Date().toISOString());
36
+ } catch {
37
+ // If we can't write the marker, show once. No harm if shown again next install.
38
+ }
39
+
40
+ const tty = process.stderr.isTTY || process.stdout.isTTY;
41
+ const c = tty
42
+ ? { dim: "\x1b[2m", reset: "\x1b[0m", cyan: "\x1b[36m", yellow: "\x1b[33m" }
43
+ : { dim: "", reset: "", cyan: "", yellow: "" };
44
+
45
+ const lines = [
46
+ "",
47
+ ` ${c.dim}─────────────────────────────────────────────────────────${c.reset}`,
48
+ ` Thanks for installing ${c.cyan}elementor-mcp-agent${c.reset}.`,
49
+ "",
50
+ ` I hope it saves you time managing your Elementor sites`,
51
+ ` with Claude (or your favorite MCP client).`,
52
+ "",
53
+ ` To say hi, report a bug, or share what you're building:`,
54
+ ` ${c.cyan}https://github.com/Mogacode-ma/elementor-mcp-agent${c.reset}`,
55
+ "",
56
+ ` A ${c.yellow}⭐${c.reset} helps other agencies running Elementor sites find this.`,
57
+ ` A drive-by "hello" in Discussions is just as welcome.`,
58
+ "",
59
+ ` ${c.dim}— Patrick (Mogacode, Morocco)${c.reset}`,
60
+ ` ${c.dim}─────────────────────────────────────────────────────────${c.reset}`,
61
+ "",
62
+ ];
63
+
64
+ process.stderr.write(lines.join("\n"));