@webiny/mcp 0.0.0-unstable.6844005670 → 0.0.0-unstable.7be00a75a9

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 (125) hide show
  1. package/agents/claude.d.ts +4 -2
  2. package/agents/claude.js +24 -29
  3. package/agents/claude.js.map +1 -1
  4. package/agents/cline.d.ts +4 -2
  5. package/agents/cline.js +18 -25
  6. package/agents/cline.js.map +1 -1
  7. package/agents/copilot.d.ts +4 -2
  8. package/agents/copilot.js +50 -57
  9. package/agents/copilot.js.map +1 -1
  10. package/agents/cursor.d.ts +4 -2
  11. package/agents/cursor.js +24 -29
  12. package/agents/cursor.js.map +1 -1
  13. package/agents/discover.d.ts +3 -0
  14. package/agents/discover.js +26 -0
  15. package/agents/discover.js.map +1 -0
  16. package/agents/instructions.d.ts +3 -1
  17. package/agents/instructions.js +84 -10
  18. package/agents/instructions.js.map +1 -1
  19. package/agents/kiro.d.ts +17 -0
  20. package/agents/kiro.js +28 -0
  21. package/agents/kiro.js.map +1 -0
  22. package/agents/opencode.d.ts +24 -0
  23. package/agents/opencode.js +60 -0
  24. package/agents/opencode.js.map +1 -0
  25. package/agents/shared.d.ts +5 -5
  26. package/agents/shared.js +62 -113
  27. package/agents/shared.js.map +1 -1
  28. package/agents/types.d.ts +16 -0
  29. package/agents/types.js +0 -0
  30. package/agents/windsurf.d.ts +4 -2
  31. package/agents/windsurf.js +24 -29
  32. package/agents/windsurf.js.map +1 -1
  33. package/bin.d.ts +2 -0
  34. package/bin.js +2 -0
  35. package/cli/ConfigureMcp.d.ts +7 -14
  36. package/cli/ConfigureMcp.js +34 -54
  37. package/cli/ConfigureMcp.js.map +1 -1
  38. package/cli/McpServer.d.ts +3 -10
  39. package/cli/McpServer.js +137 -202
  40. package/cli/McpServer.js.map +1 -1
  41. package/cli.d.ts +1 -0
  42. package/cli.js +61 -0
  43. package/cli.js.map +1 -0
  44. package/index.d.ts +8 -1
  45. package/index.js +4 -3
  46. package/package.json +19 -27
  47. package/skills/admin/admin-architect/SKILL.md +618 -0
  48. package/skills/admin/admin-permissions/SKILL.md +313 -0
  49. package/skills/admin/file-url-formatter.md +130 -0
  50. package/skills/admin/form-model/SKILL.md +540 -0
  51. package/skills/admin/ui-extensions/SKILL.md +239 -0
  52. package/skills/admin/website-builder/page-settings/SKILL.md +216 -0
  53. package/skills/admin/website-builder/wb-preview-url-modifier/SKILL.md +99 -0
  54. package/skills/api/api-architect/SKILL.md +678 -0
  55. package/skills/api/custom-field-type/SKILL.md +263 -0
  56. package/skills/api/event-handler-pattern/SKILL.md +299 -0
  57. package/skills/api/graphql-api/SKILL.md +409 -0
  58. package/skills/api/http-route/SKILL.md +175 -0
  59. package/skills/api/permissions/SKILL.md +373 -0
  60. package/skills/api/use-case-pattern/SKILL.md +454 -0
  61. package/skills/api/v5-to-v6-migration/SKILL.md +765 -0
  62. package/skills/api-bundle-size-limit/SKILL.md +82 -0
  63. package/skills/cli-extensions/SKILL.md +46 -48
  64. package/skills/configure-auth0/SKILL.md +302 -0
  65. package/skills/configure-okta/SKILL.md +303 -0
  66. package/skills/content-models/SKILL.md +450 -207
  67. package/skills/dependency-injection/SKILL.md +271 -156
  68. package/skills/full-stack-architect/SKILL.md +199 -0
  69. package/skills/generated/admin/SKILL.md +139 -0
  70. package/skills/generated/admin/aco/SKILL.md +28 -0
  71. package/skills/generated/admin/build-params/SKILL.md +33 -0
  72. package/skills/generated/admin/cms/SKILL.md +416 -0
  73. package/skills/generated/admin/configs/SKILL.md +23 -0
  74. package/skills/generated/admin/env-config/SKILL.md +30 -0
  75. package/skills/generated/admin/form/SKILL.md +145 -0
  76. package/skills/generated/admin/graphql-client/SKILL.md +23 -0
  77. package/skills/generated/admin/languages/SKILL.md +29 -0
  78. package/skills/generated/admin/lexical/SKILL.md +122 -0
  79. package/skills/generated/admin/local-storage/SKILL.md +42 -0
  80. package/skills/generated/admin/router/SKILL.md +48 -0
  81. package/skills/generated/admin/security/SKILL.md +96 -0
  82. package/skills/generated/admin/tenancy/SKILL.md +64 -0
  83. package/skills/generated/admin/ui/SKILL.md +627 -0
  84. package/skills/generated/admin/website-builder/SKILL.md +354 -0
  85. package/skills/generated/api/SKILL.md +144 -0
  86. package/skills/generated/api/aco/SKILL.md +202 -0
  87. package/skills/generated/api/build-params/SKILL.md +31 -0
  88. package/skills/generated/api/cms/SKILL.md +804 -0
  89. package/skills/generated/api/db/SKILL.md +34 -0
  90. package/skills/generated/api/event-publisher/SKILL.md +31 -0
  91. package/skills/generated/api/file-manager/SKILL.md +189 -0
  92. package/skills/generated/api/graphql/SKILL.md +61 -0
  93. package/skills/generated/api/key-value-store/SKILL.md +31 -0
  94. package/skills/generated/api/languages/SKILL.md +31 -0
  95. package/skills/generated/api/logger/SKILL.md +25 -0
  96. package/skills/generated/api/mailer/SKILL.md +74 -0
  97. package/skills/generated/api/opensearch/SKILL.md +39 -0
  98. package/skills/generated/api/scheduler/SKILL.md +112 -0
  99. package/skills/generated/api/security/SKILL.md +342 -0
  100. package/skills/generated/api/system/SKILL.md +34 -0
  101. package/skills/generated/api/tasks/SKILL.md +31 -0
  102. package/skills/generated/api/tenancy/SKILL.md +124 -0
  103. package/skills/generated/api/tenant-manager/SKILL.md +69 -0
  104. package/skills/generated/api/webhooks/SKILL.md +106 -0
  105. package/skills/generated/api/website-builder/SKILL.md +356 -0
  106. package/skills/generated/cli/SKILL.md +28 -0
  107. package/skills/generated/cli/command/SKILL.md +24 -0
  108. package/skills/generated/extensions/SKILL.md +43 -0
  109. package/skills/generated/infra/SKILL.md +187 -0
  110. package/skills/infrastructure-extensions/SKILL.md +88 -69
  111. package/skills/local-development/SKILL.md +23 -40
  112. package/skills/mailer-smtp/SKILL.md +98 -0
  113. package/skills/project-structure/SKILL.md +82 -57
  114. package/skills/webiny-sdk/SKILL.md +452 -110
  115. package/skills/website-builder/SKILL.md +238 -153
  116. package/ui.d.ts +24 -0
  117. package/ui.js +23 -0
  118. package/ui.js.map +1 -0
  119. package/Extension.d.ts +0 -2
  120. package/Extension.js +0 -11
  121. package/Extension.js.map +0 -1
  122. package/index.js.map +0 -1
  123. package/skills/admin-ui-extensions/SKILL.md +0 -267
  124. package/skills/custom-graphql-api/SKILL.md +0 -199
  125. package/skills/lifecycle-events/SKILL.md +0 -203
@@ -6,9 +6,11 @@
6
6
  *
7
7
  * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp
8
8
  */
9
- import type { Ui } from "@webiny/cli-core/exports/cli/index.js";
9
+ import type { IUi } from "../ui.js";
10
+ import type { AgentPreset } from "./types.js";
11
+ export declare const preset: AgentPreset;
10
12
  interface InitParams {
11
- ui: Ui.Interface;
13
+ ui: IUi;
12
14
  cwd: string;
13
15
  }
14
16
  export declare function init({ ui, cwd }: InitParams): Promise<void>;
package/agents/claude.js CHANGED
@@ -1,33 +1,28 @@
1
- /**
2
- * Agent adapter: Claude Code
3
- *
4
- * MCP config : .mcp.json (project-level, checked into git)
5
- * Hint file : CLAUDE.md (Claude Code reads this automatically each session)
6
- *
7
- * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp
8
- */
9
-
10
1
  import { join } from "path";
11
- import { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from "./shared.js";
12
- export async function init({
13
- ui,
14
- cwd
15
- }) {
16
- ui.info("Setting up for Claude Code...");
17
- writeMcpConfig({
18
- ui,
19
- configPath: join(cwd, ".mcp.json")
20
- });
21
- writeHintFile({
22
- ui,
23
- hintPath: join(cwd, "CLAUDE.md"),
24
- content: webinyHintBlock({
25
- heading: "## Webiny"
26
- })
27
- });
28
- printDone({
29
- ui
30
- });
2
+ import { printDone, webinyHintBlock, writeHintFile, writeMcpConfig } from "./shared.js";
3
+ const preset = {
4
+ slug: "claude",
5
+ displayName: "Claude Code",
6
+ configFile: ".mcp.json",
7
+ hintFile: "CLAUDE.md"
8
+ };
9
+ async function init({ ui, cwd }) {
10
+ ui.info("Setting up for Claude Code...");
11
+ writeMcpConfig({
12
+ ui,
13
+ configPath: join(cwd, ".mcp.json")
14
+ });
15
+ writeHintFile({
16
+ ui,
17
+ hintPath: join(cwd, "CLAUDE.md"),
18
+ content: webinyHintBlock({
19
+ heading: "## Webiny"
20
+ })
21
+ });
22
+ printDone({
23
+ ui
24
+ });
31
25
  }
26
+ export { init, preset };
32
27
 
33
28
  //# sourceMappingURL=claude.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["claude.ts"],"sourcesContent":["/**\n * Agent adapter: Claude Code\n *\n * MCP config : .mcp.json (project-level, checked into git)\n * Hint file : CLAUDE.md (Claude Code reads this automatically each session)\n *\n * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp\n */\n\nimport { join } from \"path\";\nimport type { Ui } from \"@webiny/cli-core/exports/cli/index.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: Ui.Interface;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Claude Code...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \"CLAUDE.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAE3B,SAASC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAOlE,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,+BAA+B,CAAC;EAExCP,cAAc,CAAC;IACXK,EAAE;IACFG,UAAU,EAAET,IAAI,CAACO,GAAG,EAAE,WAAW;EACrC,CAAC,CAAC;EAEFL,aAAa,CAAC;IACVI,EAAE;IACFI,QAAQ,EAAEV,IAAI,CAACO,GAAG,EAAE,WAAW,CAAC;IAChCI,OAAO,EAAER,eAAe,CAAC;MAAES,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFR,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"file":"agents/claude.js","sources":["../../src/agents/claude.ts"],"sourcesContent":["/**\n * Agent adapter: Claude Code\n *\n * MCP config : .mcp.json (project-level, checked into git)\n * Hint file : CLAUDE.md (Claude Code reads this automatically each session)\n *\n * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"claude\",\n displayName: \"Claude Code\",\n configFile: \".mcp.json\",\n hintFile: \"CLAUDE.md\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Claude Code...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \"CLAUDE.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"names":["preset","init","ui","cwd","writeMcpConfig","join","writeHintFile","webinyHintBlock","printDone"],"mappings":";;AAcO,MAAMA,SAAsB;IAC/B,MAAM;IACN,aAAa;IACb,YAAY;IACZ,UAAU;AACd;AAOO,eAAeC,KAAK,EAAEC,EAAE,EAAEC,GAAG,EAAc;IAC9CD,GAAG,IAAI,CAAC;IAERE,eAAe;QACXF;QACA,YAAYG,KAAKF,KAAK;IAC1B;IAEAG,cAAc;QACVJ;QACA,UAAUG,KAAKF,KAAK;QACpB,SAASI,gBAAgB;YAAE,SAAS;QAAY;IACpD;IAEAC,UAAU;QAAEN;IAAG;AACnB"}
package/agents/cline.d.ts CHANGED
@@ -8,9 +8,11 @@
8
8
  *
9
9
  * Docs: https://docs.cline.bot/mcp-servers/configuring-mcp-servers
10
10
  */
11
- import type { Ui } from "@webiny/cli-core/exports/cli/index.js";
11
+ import type { IUi } from "../ui.js";
12
+ import type { AgentPreset } from "./types.js";
13
+ export declare const preset: AgentPreset;
12
14
  interface InitParams {
13
- ui: Ui.Interface;
15
+ ui: IUi;
14
16
  cwd: string;
15
17
  }
16
18
  export declare function init({ ui, cwd }: InitParams): Promise<void>;
package/agents/cline.js CHANGED
@@ -1,29 +1,22 @@
1
- /**
2
- * Agent adapter: Cline
3
- *
4
- * MCP config : .vscode/cline_mcp_settings.json (project-level)
5
- *
6
- * Cline reads instructions from its system prompt in settings,
7
- * so we only write the MCP config file.
8
- *
9
- * Docs: https://docs.cline.bot/mcp-servers/configuring-mcp-servers
10
- */
11
-
12
1
  import { join } from "path";
13
- import { writeMcpConfig, printDone } from "./shared.js";
14
- export async function init({
15
- ui,
16
- cwd
17
- }) {
18
- ui.info("Setting up for Cline...");
19
- writeMcpConfig({
20
- ui,
21
- configPath: join(cwd, ".vscode", "cline_mcp_settings.json")
22
- });
23
- printDone({
24
- ui,
25
- extra: "Add Webiny instructions to Cline's system prompt in settings manually."
26
- });
2
+ import { printDone, writeMcpConfig } from "./shared.js";
3
+ const preset = {
4
+ slug: "cline",
5
+ displayName: "Cline",
6
+ configFile: ".vscode/cline_mcp_settings.json",
7
+ hintNote: "system prompt in settings"
8
+ };
9
+ async function init({ ui, cwd }) {
10
+ ui.info("Setting up for Cline...");
11
+ writeMcpConfig({
12
+ ui,
13
+ configPath: join(cwd, ".vscode", "cline_mcp_settings.json")
14
+ });
15
+ printDone({
16
+ ui,
17
+ extra: "Add Webiny instructions to Cline's system prompt in settings manually."
18
+ });
27
19
  }
20
+ export { init, preset };
28
21
 
29
22
  //# sourceMappingURL=cline.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["join","writeMcpConfig","printDone","init","ui","cwd","info","configPath","extra"],"sources":["cline.ts"],"sourcesContent":["/**\n * Agent adapter: Cline\n *\n * MCP config : .vscode/cline_mcp_settings.json (project-level)\n *\n * Cline reads instructions from its system prompt in settings,\n * so we only write the MCP config file.\n *\n * Docs: https://docs.cline.bot/mcp-servers/configuring-mcp-servers\n */\n\nimport { join } from \"path\";\nimport type { Ui } from \"@webiny/cli-core/exports/cli/index.js\";\nimport { writeMcpConfig, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: Ui.Interface;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Cline...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".vscode\", \"cline_mcp_settings.json\")\n });\n\n printDone({\n ui,\n extra: \"Add Webiny instructions to Cline's system prompt in settings manually.\"\n });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAE3B,SAASC,cAAc,EAAEC,SAAS;AAOlC,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,yBAAyB,CAAC;EAElCL,cAAc,CAAC;IACXG,EAAE;IACFG,UAAU,EAAEP,IAAI,CAACK,GAAG,EAAE,SAAS,EAAE,yBAAyB;EAC9D,CAAC,CAAC;EAEFH,SAAS,CAAC;IACNE,EAAE;IACFI,KAAK,EAAE;EACX,CAAC,CAAC;AACN","ignoreList":[]}
1
+ {"version":3,"file":"agents/cline.js","sources":["../../src/agents/cline.ts"],"sourcesContent":["/**\n * Agent adapter: Cline\n *\n * MCP config : .vscode/cline_mcp_settings.json (project-level)\n *\n * Cline reads instructions from its system prompt in settings,\n * so we only write the MCP config file.\n *\n * Docs: https://docs.cline.bot/mcp-servers/configuring-mcp-servers\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeMcpConfig, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"cline\",\n displayName: \"Cline\",\n configFile: \".vscode/cline_mcp_settings.json\",\n hintNote: \"system prompt in settings\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Cline...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".vscode\", \"cline_mcp_settings.json\")\n });\n\n printDone({\n ui,\n extra: \"Add Webiny instructions to Cline's system prompt in settings manually.\"\n });\n}\n"],"names":["preset","init","ui","cwd","writeMcpConfig","join","printDone"],"mappings":";;AAgBO,MAAMA,SAAsB;IAC/B,MAAM;IACN,aAAa;IACb,YAAY;IACZ,UAAU;AACd;AAOO,eAAeC,KAAK,EAAEC,EAAE,EAAEC,GAAG,EAAc;IAC9CD,GAAG,IAAI,CAAC;IAERE,eAAe;QACXF;QACA,YAAYG,KAAKF,KAAK,WAAW;IACrC;IAEAG,UAAU;QACNJ;QACA,OAAO;IACX;AACJ"}
@@ -8,9 +8,11 @@
8
8
  *
9
9
  * Docs: https://code.visualstudio.com/docs/copilot/chat/mcp-servers
10
10
  */
11
- import type { Ui } from "@webiny/cli-core/exports/cli/index.js";
11
+ import type { IUi } from "../ui.js";
12
+ import type { AgentPreset } from "./types.js";
13
+ export declare const preset: AgentPreset;
12
14
  interface InitParams {
13
- ui: Ui.Interface;
15
+ ui: IUi;
14
16
  cwd: string;
15
17
  }
16
18
  export declare function init({ ui, cwd }: InitParams): Promise<void>;
package/agents/copilot.js CHANGED
@@ -1,64 +1,57 @@
1
- /**
2
- * Agent adapter: GitHub Copilot / VS Code
3
- *
4
- * MCP config : .vscode/mcp.json (project-level)
5
- * Hint file : .github/copilot-instructions.md
6
- *
7
- * Note: VS Code uses "servers" as the top-level key, not "mcpServers".
8
- *
9
- * Docs: https://code.visualstudio.com/docs/copilot/chat/mcp-servers
10
- */
11
-
12
- import { join, dirname } from "path";
13
- import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
14
- import { writeHintFile, webinyHintBlock, printDone } from "./shared.js";
1
+ import { dirname, join } from "path";
2
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
3
+ import { printDone, webinyHintBlock, writeHintFile } from "./shared.js";
4
+ const preset = {
5
+ slug: "copilot",
6
+ displayName: "Copilot / VS Code",
7
+ configFile: ".vscode/mcp.json",
8
+ configNote: "uses 'servers', not 'mcpServers'",
9
+ hintFile: ".github/copilot-instructions.md"
10
+ };
15
11
  function writeCopilotMcpConfig(ui, configPath) {
16
- const dir = dirname(configPath);
17
- if (!existsSync(dir)) {
18
- mkdirSync(dir, {
19
- recursive: true
12
+ const dir = dirname(configPath);
13
+ if (!existsSync(dir)) mkdirSync(dir, {
14
+ recursive: true
20
15
  });
21
- }
22
- const entry = {
23
- command: "npx",
24
- args: ["webiny", "mcp-server"]
25
- };
26
- let config = {
27
- servers: {}
28
- };
29
- if (existsSync(configPath)) {
30
- try {
31
- config = JSON.parse(readFileSync(configPath, "utf8"));
32
- config.servers ??= {};
33
- } catch {
34
- ui.warning(`Could not parse %s — will overwrite.`, configPath);
16
+ const entry = {
17
+ command: "npx",
18
+ args: [
19
+ "webiny-mcp",
20
+ "serve"
21
+ ]
22
+ };
23
+ let config = {
24
+ servers: {}
25
+ };
26
+ if (existsSync(configPath)) try {
27
+ config = JSON.parse(readFileSync(configPath, "utf8"));
28
+ config.servers ??= {};
29
+ } catch {
30
+ ui.warning("Could not parse %s — will overwrite.", configPath);
31
+ }
32
+ if (config.servers.webiny) {
33
+ ui.info(`${configPath} already has a %s entry — skipping.`, "webiny");
34
+ return false;
35
35
  }
36
- }
37
- if (config.servers.webiny) {
38
- ui.info(`${configPath} already has a %s entry — skipping.`, "webiny");
39
- return false;
40
- }
41
- config.servers.webiny = entry;
42
- writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
43
- ui.success(`Registered Webiny MCP server in %s`, configPath);
44
- return true;
36
+ config.servers.webiny = entry;
37
+ writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
38
+ ui.success("Registered Webiny MCP server in %s", configPath);
39
+ return true;
45
40
  }
46
- export async function init({
47
- ui,
48
- cwd
49
- }) {
50
- ui.info("Setting up for GitHub Copilot (VS Code)...");
51
- writeCopilotMcpConfig(ui, join(cwd, ".vscode", "mcp.json"));
52
- writeHintFile({
53
- ui,
54
- hintPath: join(cwd, ".github", "copilot-instructions.md"),
55
- content: webinyHintBlock({
56
- heading: "## Webiny"
57
- })
58
- });
59
- printDone({
60
- ui
61
- });
41
+ async function init({ ui, cwd }) {
42
+ ui.info("Setting up for GitHub Copilot (VS Code)...");
43
+ writeCopilotMcpConfig(ui, join(cwd, ".vscode", "mcp.json"));
44
+ writeHintFile({
45
+ ui,
46
+ hintPath: join(cwd, ".github", "copilot-instructions.md"),
47
+ content: webinyHintBlock({
48
+ heading: "## Webiny"
49
+ })
50
+ });
51
+ printDone({
52
+ ui
53
+ });
62
54
  }
55
+ export { init, preset };
63
56
 
64
57
  //# sourceMappingURL=copilot.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["join","dirname","readFileSync","writeFileSync","existsSync","mkdirSync","writeHintFile","webinyHintBlock","printDone","writeCopilotMcpConfig","ui","configPath","dir","recursive","entry","command","args","config","servers","JSON","parse","warning","webiny","info","stringify","success","init","cwd","hintPath","content","heading"],"sources":["copilot.ts"],"sourcesContent":["/**\n * Agent adapter: GitHub Copilot / VS Code\n *\n * MCP config : .vscode/mcp.json (project-level)\n * Hint file : .github/copilot-instructions.md\n *\n * Note: VS Code uses \"servers\" as the top-level key, not \"mcpServers\".\n *\n * Docs: https://code.visualstudio.com/docs/copilot/chat/mcp-servers\n */\n\nimport { join, dirname } from \"path\";\nimport { readFileSync, writeFileSync, existsSync, mkdirSync } from \"fs\";\nimport type { Ui } from \"@webiny/cli-core/exports/cli/index.js\";\nimport { writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: Ui.Interface;\n cwd: string;\n}\n\nfunction writeCopilotMcpConfig(ui: Ui.Interface, configPath: string): boolean {\n const dir = dirname(configPath);\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n\n const entry = { command: \"npx\", args: [\"webiny\", \"mcp-server\"] };\n let config: { servers: Record<string, unknown> } = { servers: {} };\n\n if (existsSync(configPath)) {\n try {\n config = JSON.parse(readFileSync(configPath, \"utf8\"));\n config.servers ??= {};\n } catch {\n ui.warning(`Could not parse %s — will overwrite.`, configPath);\n }\n }\n\n if (config.servers.webiny) {\n ui.info(`${configPath} already has a %s entry — skipping.`, \"webiny\");\n return false;\n }\n\n config.servers.webiny = entry;\n writeFileSync(configPath, JSON.stringify(config, null, 2) + \"\\n\");\n ui.success(`Registered Webiny MCP server in %s`, configPath);\n return true;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for GitHub Copilot (VS Code)...\");\n\n writeCopilotMcpConfig(ui, join(cwd, \".vscode\", \"mcp.json\"));\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".github\", \"copilot-instructions.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,EAAEC,OAAO,QAAQ,MAAM;AACpC,SAASC,YAAY,EAAEC,aAAa,EAAEC,UAAU,EAAEC,SAAS,QAAQ,IAAI;AAEvE,SAASC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAOlD,SAASC,qBAAqBA,CAACC,EAAgB,EAAEC,UAAkB,EAAW;EAC1E,MAAMC,GAAG,GAAGX,OAAO,CAACU,UAAU,CAAC;EAC/B,IAAI,CAACP,UAAU,CAACQ,GAAG,CAAC,EAAE;IAClBP,SAAS,CAACO,GAAG,EAAE;MAAEC,SAAS,EAAE;IAAK,CAAC,CAAC;EACvC;EAEA,MAAMC,KAAK,GAAG;IAAEC,OAAO,EAAE,KAAK;IAAEC,IAAI,EAAE,CAAC,QAAQ,EAAE,YAAY;EAAE,CAAC;EAChE,IAAIC,MAA4C,GAAG;IAAEC,OAAO,EAAE,CAAC;EAAE,CAAC;EAElE,IAAId,UAAU,CAACO,UAAU,CAAC,EAAE;IACxB,IAAI;MACAM,MAAM,GAAGE,IAAI,CAACC,KAAK,CAAClB,YAAY,CAACS,UAAU,EAAE,MAAM,CAAC,CAAC;MACrDM,MAAM,CAACC,OAAO,KAAK,CAAC,CAAC;IACzB,CAAC,CAAC,MAAM;MACJR,EAAE,CAACW,OAAO,CAAC,sCAAsC,EAAEV,UAAU,CAAC;IAClE;EACJ;EAEA,IAAIM,MAAM,CAACC,OAAO,CAACI,MAAM,EAAE;IACvBZ,EAAE,CAACa,IAAI,CAAC,GAAGZ,UAAU,qCAAqC,EAAE,QAAQ,CAAC;IACrE,OAAO,KAAK;EAChB;EAEAM,MAAM,CAACC,OAAO,CAACI,MAAM,GAAGR,KAAK;EAC7BX,aAAa,CAACQ,UAAU,EAAEQ,IAAI,CAACK,SAAS,CAACP,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;EACjEP,EAAE,CAACe,OAAO,CAAC,oCAAoC,EAAEd,UAAU,CAAC;EAC5D,OAAO,IAAI;AACf;AAEA,OAAO,eAAee,IAAIA,CAAC;EAAEhB,EAAE;EAAEiB;AAAgB,CAAC,EAAiB;EAC/DjB,EAAE,CAACa,IAAI,CAAC,4CAA4C,CAAC;EAErDd,qBAAqB,CAACC,EAAE,EAAEV,IAAI,CAAC2B,GAAG,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;EAE3DrB,aAAa,CAAC;IACVI,EAAE;IACFkB,QAAQ,EAAE5B,IAAI,CAAC2B,GAAG,EAAE,SAAS,EAAE,yBAAyB,CAAC;IACzDE,OAAO,EAAEtB,eAAe,CAAC;MAAEuB,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFtB,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"file":"agents/copilot.js","sources":["../../src/agents/copilot.ts"],"sourcesContent":["/**\n * Agent adapter: GitHub Copilot / VS Code\n *\n * MCP config : .vscode/mcp.json (project-level)\n * Hint file : .github/copilot-instructions.md\n *\n * Note: VS Code uses \"servers\" as the top-level key, not \"mcpServers\".\n *\n * Docs: https://code.visualstudio.com/docs/copilot/chat/mcp-servers\n */\n\nimport { join, dirname } from \"path\";\nimport { readFileSync, writeFileSync, existsSync, mkdirSync } from \"fs\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"copilot\",\n displayName: \"Copilot / VS Code\",\n configFile: \".vscode/mcp.json\",\n configNote: \"uses 'servers', not 'mcpServers'\",\n hintFile: \".github/copilot-instructions.md\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nfunction writeCopilotMcpConfig(ui: IUi, configPath: string): boolean {\n const dir = dirname(configPath);\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n\n const entry = { command: \"npx\", args: [\"webiny-mcp\", \"serve\"] };\n let config: { servers: Record<string, unknown> } = { servers: {} };\n\n if (existsSync(configPath)) {\n try {\n config = JSON.parse(readFileSync(configPath, \"utf8\"));\n config.servers ??= {};\n } catch {\n ui.warning(`Could not parse %s — will overwrite.`, configPath);\n }\n }\n\n if (config.servers.webiny) {\n ui.info(`${configPath} already has a %s entry — skipping.`, \"webiny\");\n return false;\n }\n\n config.servers.webiny = entry;\n writeFileSync(configPath, JSON.stringify(config, null, 2) + \"\\n\");\n ui.success(`Registered Webiny MCP server in %s`, configPath);\n return true;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for GitHub Copilot (VS Code)...\");\n\n writeCopilotMcpConfig(ui, join(cwd, \".vscode\", \"mcp.json\"));\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".github\", \"copilot-instructions.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"names":["preset","writeCopilotMcpConfig","ui","configPath","dir","dirname","existsSync","mkdirSync","entry","config","JSON","readFileSync","writeFileSync","init","cwd","join","writeHintFile","webinyHintBlock","printDone"],"mappings":";;;AAiBO,MAAMA,SAAsB;IAC/B,MAAM;IACN,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,UAAU;AACd;AAOA,SAASC,sBAAsBC,EAAO,EAAEC,UAAkB;IACtD,MAAMC,MAAMC,QAAQF;IACpB,IAAI,CAACG,WAAWF,MACZG,UAAUH,KAAK;QAAE,WAAW;IAAK;IAGrC,MAAMI,QAAQ;QAAE,SAAS;QAAO,MAAM;YAAC;YAAc;SAAQ;IAAC;IAC9D,IAAIC,SAA+C;QAAE,SAAS,CAAC;IAAE;IAEjE,IAAIH,WAAWH,aACX,IAAI;QACAM,SAASC,KAAK,KAAK,CAACC,aAAaR,YAAY;QAC7CM,OAAO,OAAO,KAAK,CAAC;IACxB,EAAE,OAAM;QACJP,GAAG,OAAO,CAAC,wCAAwCC;IACvD;IAGJ,IAAIM,OAAO,OAAO,CAAC,MAAM,EAAE;QACvBP,GAAG,IAAI,CAAC,GAAGC,WAAW,mCAAmC,CAAC,EAAE;QAC5D,OAAO;IACX;IAEAM,OAAO,OAAO,CAAC,MAAM,GAAGD;IACxBI,cAAcT,YAAYO,KAAK,SAAS,CAACD,QAAQ,MAAM,KAAK;IAC5DP,GAAG,OAAO,CAAC,sCAAsCC;IACjD,OAAO;AACX;AAEO,eAAeU,KAAK,EAAEX,EAAE,EAAEY,GAAG,EAAc;IAC9CZ,GAAG,IAAI,CAAC;IAERD,sBAAsBC,IAAIa,KAAKD,KAAK,WAAW;IAE/CE,cAAc;QACVd;QACA,UAAUa,KAAKD,KAAK,WAAW;QAC/B,SAASG,gBAAgB;YAAE,SAAS;QAAY;IACpD;IAEAC,UAAU;QAAEhB;IAAG;AACnB"}
@@ -6,9 +6,11 @@
6
6
  *
7
7
  * Docs: https://docs.cursor.com/context/model-context-protocol
8
8
  */
9
- import type { Ui } from "@webiny/cli-core/exports/cli/index.js";
9
+ import type { IUi } from "../ui.js";
10
+ import type { AgentPreset } from "./types.js";
11
+ export declare const preset: AgentPreset;
10
12
  interface InitParams {
11
- ui: Ui.Interface;
13
+ ui: IUi;
12
14
  cwd: string;
13
15
  }
14
16
  export declare function init({ ui, cwd }: InitParams): Promise<void>;
package/agents/cursor.js CHANGED
@@ -1,33 +1,28 @@
1
- /**
2
- * Agent adapter: Cursor
3
- *
4
- * MCP config : .cursor/mcp.json (project-level)
5
- * Hint file : .cursor/rules/webiny.mdc
6
- *
7
- * Docs: https://docs.cursor.com/context/model-context-protocol
8
- */
9
-
10
1
  import { join } from "path";
11
- import { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from "./shared.js";
12
- export async function init({
13
- ui,
14
- cwd
15
- }) {
16
- ui.info("Setting up for Cursor...");
17
- writeMcpConfig({
18
- ui,
19
- configPath: join(cwd, ".cursor", "mcp.json")
20
- });
21
- writeHintFile({
22
- ui,
23
- hintPath: join(cwd, ".cursor", "rules", "webiny.mdc"),
24
- content: webinyHintBlock({
25
- heading: "# Webiny"
26
- })
27
- });
28
- printDone({
29
- ui
30
- });
2
+ import { printDone, webinyHintBlock, writeHintFile, writeMcpConfig } from "./shared.js";
3
+ const preset = {
4
+ slug: "cursor",
5
+ displayName: "Cursor",
6
+ configFile: ".cursor/mcp.json",
7
+ hintFile: ".cursor/rules/*.mdc"
8
+ };
9
+ async function init({ ui, cwd }) {
10
+ ui.info("Setting up for Cursor...");
11
+ writeMcpConfig({
12
+ ui,
13
+ configPath: join(cwd, ".cursor", "mcp.json")
14
+ });
15
+ writeHintFile({
16
+ ui,
17
+ hintPath: join(cwd, ".cursor", "rules", "webiny.mdc"),
18
+ content: webinyHintBlock({
19
+ heading: "# Webiny"
20
+ })
21
+ });
22
+ printDone({
23
+ ui
24
+ });
31
25
  }
26
+ export { init, preset };
32
27
 
33
28
  //# sourceMappingURL=cursor.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["cursor.ts"],"sourcesContent":["/**\n * Agent adapter: Cursor\n *\n * MCP config : .cursor/mcp.json (project-level)\n * Hint file : .cursor/rules/webiny.mdc\n *\n * Docs: https://docs.cursor.com/context/model-context-protocol\n */\n\nimport { join } from \"path\";\nimport type { Ui } from \"@webiny/cli-core/exports/cli/index.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\ninterface InitParams {\n ui: Ui.Interface;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Cursor...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".cursor\", \"mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".cursor\", \"rules\", \"webiny.mdc\"),\n content: webinyHintBlock({ heading: \"# Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,MAAM;AAE3B,SAASC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAOlE,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,0BAA0B,CAAC;EAEnCP,cAAc,CAAC;IACXK,EAAE;IACFG,UAAU,EAAET,IAAI,CAACO,GAAG,EAAE,SAAS,EAAE,UAAU;EAC/C,CAAC,CAAC;EAEFL,aAAa,CAAC;IACVI,EAAE;IACFI,QAAQ,EAAEV,IAAI,CAACO,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,CAAC;IACrDI,OAAO,EAAER,eAAe,CAAC;MAAES,OAAO,EAAE;IAAW,CAAC;EACpD,CAAC,CAAC;EAEFR,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"file":"agents/cursor.js","sources":["../../src/agents/cursor.ts"],"sourcesContent":["/**\n * Agent adapter: Cursor\n *\n * MCP config : .cursor/mcp.json (project-level)\n * Hint file : .cursor/rules/webiny.mdc\n *\n * Docs: https://docs.cursor.com/context/model-context-protocol\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport type { AgentPreset } from \"./types.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\n\nexport const preset: AgentPreset = {\n slug: \"cursor\",\n displayName: \"Cursor\",\n configFile: \".cursor/mcp.json\",\n hintFile: \".cursor/rules/*.mdc\"\n};\n\ninterface InitParams {\n ui: IUi;\n cwd: string;\n}\n\nexport async function init({ ui, cwd }: InitParams): Promise<void> {\n ui.info(\"Setting up for Cursor...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".cursor\", \"mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".cursor\", \"rules\", \"webiny.mdc\"),\n content: webinyHintBlock({ heading: \"# Webiny\" })\n });\n\n printDone({ ui });\n}\n"],"names":["preset","init","ui","cwd","writeMcpConfig","join","writeHintFile","webinyHintBlock","printDone"],"mappings":";;AAcO,MAAMA,SAAsB;IAC/B,MAAM;IACN,aAAa;IACb,YAAY;IACZ,UAAU;AACd;AAOO,eAAeC,KAAK,EAAEC,EAAE,EAAEC,GAAG,EAAc;IAC9CD,GAAG,IAAI,CAAC;IAERE,eAAe;QACXF;QACA,YAAYG,KAAKF,KAAK,WAAW;IACrC;IAEAG,cAAc;QACVJ;QACA,UAAUG,KAAKF,KAAK,WAAW,SAAS;QACxC,SAASI,gBAAgB;YAAE,SAAS;QAAW;IACnD;IAEAC,UAAU;QAAEN;IAAG;AACnB"}
@@ -0,0 +1,3 @@
1
+ import type { AgentPreset, AgentModule } from "./types.js";
2
+ export declare function discoverAgents(): Promise<Map<string, AgentModule>>;
3
+ export declare function discoverPresets(): Promise<AgentPreset[]>;
@@ -0,0 +1,26 @@
1
+ import { readdirSync } from "fs";
2
+ import { fileURLToPath } from "url";
3
+ import { dirname, join } from "path";
4
+ let cache = null;
5
+ async function discoverAgents() {
6
+ if (cache) return cache;
7
+ const agentsDir = dirname(fileURLToPath(import.meta.url));
8
+ const files = readdirSync(agentsDir).filter((f)=>f.endsWith(".js") && !f.endsWith(".d.ts") && !f.endsWith(".js.map"));
9
+ const agents = new Map();
10
+ for (const file of files){
11
+ const mod = await import(join(agentsDir, file));
12
+ if (mod.preset && "function" == typeof mod.init) agents.set(mod.preset.slug, {
13
+ preset: mod.preset,
14
+ init: mod.init
15
+ });
16
+ }
17
+ cache = agents;
18
+ return agents;
19
+ }
20
+ async function discoverPresets() {
21
+ const agents = await discoverAgents();
22
+ return Array.from(agents.values()).map((a)=>a.preset);
23
+ }
24
+ export { discoverAgents, discoverPresets };
25
+
26
+ //# sourceMappingURL=discover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents/discover.js","sources":["../../src/agents/discover.ts"],"sourcesContent":["import { readdirSync } from \"fs\";\nimport { fileURLToPath } from \"url\";\nimport { dirname, join } from \"path\";\nimport type { AgentPreset, AgentModule } from \"./types.js\";\n\nlet cache: Map<string, AgentModule> | null = null;\n\nexport async function discoverAgents(): Promise<Map<string, AgentModule>> {\n if (cache) {\n return cache;\n }\n\n const agentsDir = dirname(fileURLToPath(import.meta.url));\n const files = readdirSync(agentsDir).filter(\n f => f.endsWith(\".js\") && !f.endsWith(\".d.ts\") && !f.endsWith(\".js.map\")\n );\n\n const agents = new Map<string, AgentModule>();\n\n for (const file of files) {\n const mod = await import(join(agentsDir, file));\n if (mod.preset && typeof mod.init === \"function\") {\n agents.set(mod.preset.slug, { preset: mod.preset, init: mod.init });\n }\n }\n\n cache = agents;\n return agents;\n}\n\nexport async function discoverPresets(): Promise<AgentPreset[]> {\n const agents = await discoverAgents();\n return Array.from(agents.values()).map(a => a.preset);\n}\n"],"names":["cache","discoverAgents","agentsDir","dirname","fileURLToPath","files","readdirSync","f","agents","Map","file","mod","join","discoverPresets","Array","a"],"mappings":";;;AAKA,IAAIA,QAAyC;AAEtC,eAAeC;IAClB,IAAID,OACA,OAAOA;IAGX,MAAME,YAAYC,QAAQC,cAAc,YAAY,GAAG;IACvD,MAAMC,QAAQC,YAAYJ,WAAW,MAAM,CACvCK,CAAAA,IAAKA,EAAE,QAAQ,CAAC,UAAU,CAACA,EAAE,QAAQ,CAAC,YAAY,CAACA,EAAE,QAAQ,CAAC;IAGlE,MAAMC,SAAS,IAAIC;IAEnB,KAAK,MAAMC,QAAQL,MAAO;QACtB,MAAMM,MAAM,MAAM,MAAM,CAACC,KAAKV,WAAWQ;QACzC,IAAIC,IAAI,MAAM,IAAI,AAAoB,cAApB,OAAOA,IAAI,IAAI,EAC7BH,OAAO,GAAG,CAACG,IAAI,MAAM,CAAC,IAAI,EAAE;YAAE,QAAQA,IAAI,MAAM;YAAE,MAAMA,IAAI,IAAI;QAAC;IAEzE;IAEAX,QAAQQ;IACR,OAAOA;AACX;AAEO,eAAeK;IAClB,MAAML,SAAS,MAAMP;IACrB,OAAOa,MAAM,IAAI,CAACN,OAAO,MAAM,IAAI,GAAG,CAACO,CAAAA,IAAKA,EAAE,MAAM;AACxD"}
@@ -3,5 +3,7 @@
3
3
  *
4
4
  * Prints a clear, copy-paste-friendly guide for wiring up the Webiny MCP
5
5
  * server in any agent not covered by the built-in adapters.
6
+ *
7
+ * The agent tables are auto-generated from preset metadata.
6
8
  */
7
- export declare function printInstructions(): void;
9
+ export declare function printInstructions(): Promise<void>;
@@ -1,13 +1,87 @@
1
- /**
2
- * --instructions / --manual
3
- *
4
- * Prints a clear, copy-paste-friendly guide for wiring up the Webiny MCP
5
- * server in any agent not covered by the built-in adapters.
6
- */
7
-
8
- export function printInstructions() {
9
- const lines = ["", "╔══════════════════════════════════════════════════════════════════╗", "║ Webiny MCP Server — Manual Setup Guide ║", "╚══════════════════════════════════════════════════════════════════╝", "", "The Webiny MCP server works with any agent that supports the Model", "Context Protocol (MCP) over stdio transport.", "", "── Step 1: Register the MCP server ───────────────────────────────", "", "Most agents accept a JSON config file. Add the following entry:", "", ' "webiny": {', ' "command": "npx",', ' "args": ["webiny", "mcp-server"]', " }", "", "Where this config lives depends on your agent:", "", " Agent Config file", " ───────────────── ──────────────────────────────────────", " Claude Code .mcp.json (project root)", " Cursor .cursor/mcp.json (project root)", " Windsurf .windsurf/mcp.json (project root)", " Copilot/VS Code .vscode/mcp.json (note: uses 'servers', not 'mcpServers')", " Cline .vscode/cline_mcp_settings.json", " Zed ~/.config/zed/settings.json (under 'context_servers')", " Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json", " or %APPDATA%\\Claude\\claude_desktop_config.json (Windows)", "", "Full example (the most common shape):", "", " {", ' "mcpServers": {', ' "webiny": {', ' "command": "npx",', ' "args": ["webiny", "mcp-server"]', " }", " }", " }", "", "── Step 2: Tell your agent about the MCP tools ───────────────────", "", "Add the following to your agent's instruction / rules file so it", "knows to reach for the Webiny tools automatically:", "", " ## Webiny", " This project uses the Webiny framework.", " A `webiny` MCP server is available.", " When helping with Webiny-related tasks:", " 1. Call `list_webiny_skills` to see available skills.", " 2. Call `get_webiny_skill` with the relevant topic before writing code.", "", "Where this instruction file lives:", "", " Agent Instruction file", " ───────────────── ──────────────────────────────────────", " Claude Code CLAUDE.md (project root)", " Cursor .cursor/rules/*.mdc", " Windsurf .windsurf/rules/*.md", " Copilot/VS Code .github/copilot-instructions.md", " Cline system prompt in settings", " Zed system prompt in settings", "", "── Step 3: Verify the server starts ──────────────────────────────", "", "Test it with the MCP Inspector before relying on it in your agent:", "", " npx @modelcontextprotocol/inspector npx webiny mcp-server", "", "Connect, click 'List Tools', and confirm you see:", " • list_webiny_skills", " • get_webiny_skill", "", "── Need a built-in adapter for your agent? ───────────────────────", "", "Open an issue or PR at: https://github.com/webiny/webiny-js", "The adapter just needs to write the right config file — see", "mcp/agents/claude.ts as a reference (~20 lines).", ""];
10
- process.stdout.write(lines.join("\n") + "\n");
1
+ import { discoverPresets } from "./discover.js";
2
+ async function printInstructions() {
3
+ const presets = await discoverPresets();
4
+ const configRows = presets.map((p)=>{
5
+ const note = p.configNote ? ` (${p.configNote})` : "";
6
+ return formatRow(p.displayName, p.configFile + note);
7
+ });
8
+ const hintRows = presets.filter((p)=>p.hintFile).map((p)=>formatRow(p.displayName, p.hintFile));
9
+ presets.filter((p)=>!p.hintFile && p.hintNote).forEach((p)=>hintRows.push(formatRow(p.displayName, p.hintNote)));
10
+ const lines = [
11
+ "",
12
+ "╔══════════════════════════════════════════════════════════════════╗",
13
+ "║ Webiny MCP Server — Manual Setup Guide ║",
14
+ "╚══════════════════════════════════════════════════════════════════╝",
15
+ "",
16
+ "The Webiny MCP server works with any agent that supports the Model",
17
+ "Context Protocol (MCP) over stdio transport.",
18
+ "",
19
+ "── Step 1: Register the MCP server ───────────────────────────────",
20
+ "",
21
+ "Most agents accept a JSON config file. Add the following entry:",
22
+ "",
23
+ ' "webiny": {',
24
+ ' "command": "npx",',
25
+ ' "args": ["webiny-mcp", "serve"]',
26
+ " }",
27
+ "",
28
+ "Where this config lives depends on your agent:",
29
+ "",
30
+ " Agent Config file",
31
+ " ───────────────── ──────────────────────────────────────",
32
+ ...configRows,
33
+ "",
34
+ "Full example (the most common shape):",
35
+ "",
36
+ " {",
37
+ ' "mcpServers": {',
38
+ ' "webiny": {',
39
+ ' "command": "npx",',
40
+ ' "args": ["webiny-mcp", "serve"]',
41
+ " }",
42
+ " }",
43
+ " }",
44
+ "",
45
+ "── Step 2: Tell your agent about the MCP tools ───────────────────",
46
+ "",
47
+ "Add the following to your agent's instruction / rules file so it",
48
+ "knows to reach for the Webiny tools automatically:",
49
+ "",
50
+ " ## Webiny",
51
+ " This project uses the Webiny framework.",
52
+ " A `webiny` MCP server is available.",
53
+ " When helping with Webiny-related tasks:",
54
+ " 1. Call `list_webiny_skills` to see available skills.",
55
+ " 2. Call `get_webiny_skill` with the relevant topic before writing code.",
56
+ "",
57
+ "Where this instruction file lives:",
58
+ "",
59
+ " Agent Instruction file",
60
+ " ───────────────── ──────────────────────────────────────",
61
+ ...hintRows,
62
+ "",
63
+ "── Step 3: Verify the server starts ──────────────────────────────",
64
+ "",
65
+ "Test it with the MCP Inspector before relying on it in your agent:",
66
+ "",
67
+ " npx @modelcontextprotocol/inspector npx webiny-mcp server",
68
+ "",
69
+ "Connect, click 'List Tools', and confirm you see:",
70
+ " • list_webiny_skills",
71
+ " • get_webiny_skill",
72
+ "",
73
+ "── Need a built-in adapter for your agent? ───────────────────────",
74
+ "",
75
+ "Open an issue or PR at: https://github.com/webiny/webiny-js",
76
+ "The adapter just needs to write the right config file — see",
77
+ "mcp/agents/claude.ts as a reference (~20 lines).",
78
+ ""
79
+ ];
80
+ process.stdout.write(lines.join("\n") + "\n");
81
+ }
82
+ function formatRow(agent, path) {
83
+ return ` ${agent.padEnd(17)} ${path}`;
11
84
  }
85
+ export { printInstructions };
12
86
 
13
87
  //# sourceMappingURL=instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["printInstructions","lines","process","stdout","write","join"],"sources":["instructions.ts"],"sourcesContent":["/**\n * --instructions / --manual\n *\n * Prints a clear, copy-paste-friendly guide for wiring up the Webiny MCP\n * server in any agent not covered by the built-in adapters.\n */\n\nexport function printInstructions(): void {\n const lines = [\n \"\",\n \"╔══════════════════════════════════════════════════════════════════╗\",\n \"║ Webiny MCP Server — Manual Setup Guide ║\",\n \"╚══════════════════════════════════════════════════════════════════╝\",\n \"\",\n \"The Webiny MCP server works with any agent that supports the Model\",\n \"Context Protocol (MCP) over stdio transport.\",\n \"\",\n \"── Step 1: Register the MCP server ───────────────────────────────\",\n \"\",\n \"Most agents accept a JSON config file. Add the following entry:\",\n \"\",\n ' \"webiny\": {',\n ' \"command\": \"npx\",',\n ' \"args\": [\"webiny\", \"mcp-server\"]',\n \" }\",\n \"\",\n \"Where this config lives depends on your agent:\",\n \"\",\n \" Agent Config file\",\n \" ───────────────── ──────────────────────────────────────\",\n \" Claude Code .mcp.json (project root)\",\n \" Cursor .cursor/mcp.json (project root)\",\n \" Windsurf .windsurf/mcp.json (project root)\",\n \" Copilot/VS Code .vscode/mcp.json (note: uses 'servers', not 'mcpServers')\",\n \" Cline .vscode/cline_mcp_settings.json\",\n \" Zed ~/.config/zed/settings.json (under 'context_servers')\",\n \" Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json\",\n \" or %APPDATA%\\\\Claude\\\\claude_desktop_config.json (Windows)\",\n \"\",\n \"Full example (the most common shape):\",\n \"\",\n \" {\",\n ' \"mcpServers\": {',\n ' \"webiny\": {',\n ' \"command\": \"npx\",',\n ' \"args\": [\"webiny\", \"mcp-server\"]',\n \" }\",\n \" }\",\n \" }\",\n \"\",\n \"── Step 2: Tell your agent about the MCP tools ───────────────────\",\n \"\",\n \"Add the following to your agent's instruction / rules file so it\",\n \"knows to reach for the Webiny tools automatically:\",\n \"\",\n \" ## Webiny\",\n \" This project uses the Webiny framework.\",\n \" A `webiny` MCP server is available.\",\n \" When helping with Webiny-related tasks:\",\n \" 1. Call `list_webiny_skills` to see available skills.\",\n \" 2. Call `get_webiny_skill` with the relevant topic before writing code.\",\n \"\",\n \"Where this instruction file lives:\",\n \"\",\n \" Agent Instruction file\",\n \" ───────────────── ──────────────────────────────────────\",\n \" Claude Code CLAUDE.md (project root)\",\n \" Cursor .cursor/rules/*.mdc\",\n \" Windsurf .windsurf/rules/*.md\",\n \" Copilot/VS Code .github/copilot-instructions.md\",\n \" Cline system prompt in settings\",\n \" Zed system prompt in settings\",\n \"\",\n \"── Step 3: Verify the server starts ──────────────────────────────\",\n \"\",\n \"Test it with the MCP Inspector before relying on it in your agent:\",\n \"\",\n \" npx @modelcontextprotocol/inspector npx webiny mcp-server\",\n \"\",\n \"Connect, click 'List Tools', and confirm you see:\",\n \" • list_webiny_skills\",\n \" • get_webiny_skill\",\n \"\",\n \"── Need a built-in adapter for your agent? ───────────────────────\",\n \"\",\n \"Open an issue or PR at: https://github.com/webiny/webiny-js\",\n \"The adapter just needs to write the right config file — see\",\n \"mcp/agents/claude.ts as a reference (~20 lines).\",\n \"\"\n ];\n\n process.stdout.write(lines.join(\"\\n\") + \"\\n\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,iBAAiBA,CAAA,EAAS;EACtC,MAAMC,KAAK,GAAG,CACV,EAAE,EACF,sEAAsE,EACtE,qEAAqE,EACrE,sEAAsE,EACtE,EAAE,EACF,oEAAoE,EACpE,8CAA8C,EAC9C,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,iEAAiE,EACjE,EAAE,EACF,eAAe,EACf,uBAAuB,EACvB,sCAAsC,EACtC,KAAK,EACL,EAAE,EACF,gDAAgD,EAChD,EAAE,EACF,kCAAkC,EAClC,6DAA6D,EAC7D,8DAA8D,EAC9D,8DAA8D,EAC9D,8DAA8D,EAC9D,wFAAwF,EACxF,sDAAsD,EACtD,6EAA6E,EAC7E,sFAAsF,EACtF,kFAAkF,EAClF,EAAE,EACF,uCAAuC,EACvC,EAAE,EACF,KAAK,EACL,qBAAqB,EACrB,mBAAmB,EACnB,2BAA2B,EAC3B,0CAA0C,EAC1C,SAAS,EACT,OAAO,EACP,KAAK,EACL,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,kEAAkE,EAClE,oDAAoD,EACpD,EAAE,EACF,aAAa,EACb,2CAA2C,EAC3C,uCAAuC,EACvC,2CAA2C,EAC3C,yDAAyD,EACzD,2EAA2E,EAC3E,EAAE,EACF,oCAAoC,EACpC,EAAE,EACF,uCAAuC,EACvC,6DAA6D,EAC7D,8DAA8D,EAC9D,0CAA0C,EAC1C,2CAA2C,EAC3C,sDAAsD,EACtD,gDAAgD,EAChD,gDAAgD,EAChD,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,6DAA6D,EAC7D,EAAE,EACF,mDAAmD,EACnD,wBAAwB,EACxB,sBAAsB,EACtB,EAAE,EACF,oEAAoE,EACpE,EAAE,EACF,6DAA6D,EAC7D,6DAA6D,EAC7D,kDAAkD,EAClD,EAAE,CACL;EAEDC,OAAO,CAACC,MAAM,CAACC,KAAK,CAACH,KAAK,CAACI,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjD","ignoreList":[]}
1
+ {"version":3,"file":"agents/instructions.js","sources":["../../src/agents/instructions.ts"],"sourcesContent":["/**\n * --instructions / --manual\n *\n * Prints a clear, copy-paste-friendly guide for wiring up the Webiny MCP\n * server in any agent not covered by the built-in adapters.\n *\n * The agent tables are auto-generated from preset metadata.\n */\n\nimport { discoverPresets } from \"./discover.js\";\n\nexport async function printInstructions(): Promise<void> {\n const presets = await discoverPresets();\n\n const configRows = presets.map(p => {\n const note = p.configNote ? ` (${p.configNote})` : \"\";\n return formatRow(p.displayName, p.configFile + note);\n });\n\n const hintRows = presets\n .filter(p => p.hintFile)\n .map(p => formatRow(p.displayName, p.hintFile!));\n presets\n .filter(p => !p.hintFile && p.hintNote)\n .forEach(p => hintRows.push(formatRow(p.displayName, p.hintNote!)));\n\n const lines = [\n \"\",\n \"╔══════════════════════════════════════════════════════════════════╗\",\n \"║ Webiny MCP Server — Manual Setup Guide ║\",\n \"╚══════════════════════════════════════════════════════════════════╝\",\n \"\",\n \"The Webiny MCP server works with any agent that supports the Model\",\n \"Context Protocol (MCP) over stdio transport.\",\n \"\",\n \"── Step 1: Register the MCP server ───────────────────────────────\",\n \"\",\n \"Most agents accept a JSON config file. Add the following entry:\",\n \"\",\n ' \"webiny\": {',\n ' \"command\": \"npx\",',\n ' \"args\": [\"webiny-mcp\", \"serve\"]',\n \" }\",\n \"\",\n \"Where this config lives depends on your agent:\",\n \"\",\n \" Agent Config file\",\n \" ───────────────── ──────────────────────────────────────\",\n ...configRows,\n \"\",\n \"Full example (the most common shape):\",\n \"\",\n \" {\",\n ' \"mcpServers\": {',\n ' \"webiny\": {',\n ' \"command\": \"npx\",',\n ' \"args\": [\"webiny-mcp\", \"serve\"]',\n \" }\",\n \" }\",\n \" }\",\n \"\",\n \"── Step 2: Tell your agent about the MCP tools ───────────────────\",\n \"\",\n \"Add the following to your agent's instruction / rules file so it\",\n \"knows to reach for the Webiny tools automatically:\",\n \"\",\n \" ## Webiny\",\n \" This project uses the Webiny framework.\",\n \" A `webiny` MCP server is available.\",\n \" When helping with Webiny-related tasks:\",\n \" 1. Call `list_webiny_skills` to see available skills.\",\n \" 2. Call `get_webiny_skill` with the relevant topic before writing code.\",\n \"\",\n \"Where this instruction file lives:\",\n \"\",\n \" Agent Instruction file\",\n \" ───────────────── ──────────────────────────────────────\",\n ...hintRows,\n \"\",\n \"── Step 3: Verify the server starts ──────────────────────────────\",\n \"\",\n \"Test it with the MCP Inspector before relying on it in your agent:\",\n \"\",\n \" npx @modelcontextprotocol/inspector npx webiny-mcp server\",\n \"\",\n \"Connect, click 'List Tools', and confirm you see:\",\n \" • list_webiny_skills\",\n \" • get_webiny_skill\",\n \"\",\n \"── Need a built-in adapter for your agent? ───────────────────────\",\n \"\",\n \"Open an issue or PR at: https://github.com/webiny/webiny-js\",\n \"The adapter just needs to write the right config file — see\",\n \"mcp/agents/claude.ts as a reference (~20 lines).\",\n \"\"\n ];\n\n process.stdout.write(lines.join(\"\\n\") + \"\\n\");\n}\n\nfunction formatRow(agent: string, path: string): string {\n return ` ${agent.padEnd(17)} ${path}`;\n}\n"],"names":["printInstructions","presets","discoverPresets","configRows","p","note","formatRow","hintRows","lines","process","agent","path"],"mappings":";AAWO,eAAeA;IAClB,MAAMC,UAAU,MAAMC;IAEtB,MAAMC,aAAaF,QAAQ,GAAG,CAACG,CAAAA;QAC3B,MAAMC,OAAOD,EAAE,UAAU,GAAG,CAAC,GAAG,EAAEA,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG;QACpD,OAAOE,UAAUF,EAAE,WAAW,EAAEA,EAAE,UAAU,GAAGC;IACnD;IAEA,MAAME,WAAWN,QACZ,MAAM,CAACG,CAAAA,IAAKA,EAAE,QAAQ,EACtB,GAAG,CAACA,CAAAA,IAAKE,UAAUF,EAAE,WAAW,EAAEA,EAAE,QAAQ;IACjDH,QACK,MAAM,CAACG,CAAAA,IAAK,CAACA,EAAE,QAAQ,IAAIA,EAAE,QAAQ,EACrC,OAAO,CAACA,CAAAA,IAAKG,SAAS,IAAI,CAACD,UAAUF,EAAE,WAAW,EAAEA,EAAE,QAAQ;IAEnE,MAAMI,QAAQ;QACV;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;WACGL;QACH;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;WACGI;QACH;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACH;IAEDE,QAAQ,MAAM,CAAC,KAAK,CAACD,MAAM,IAAI,CAAC,QAAQ;AAC5C;AAEA,SAASF,UAAUI,KAAa,EAAEC,IAAY;IAC1C,OAAO,CAAC,EAAE,EAAED,MAAM,MAAM,CAAC,IAAI,EAAE,EAAEC,MAAM;AAC3C"}