@webiny/mcp 6.0.0 → 6.1.0-beta.1

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 (101) hide show
  1. package/agents/claude.d.ts +2 -2
  2. package/agents/claude.js.map +1 -1
  3. package/agents/cline.d.ts +2 -2
  4. package/agents/cline.js.map +1 -1
  5. package/agents/copilot.d.ts +2 -2
  6. package/agents/copilot.js +1 -1
  7. package/agents/copilot.js.map +1 -1
  8. package/agents/cursor.d.ts +2 -2
  9. package/agents/cursor.js.map +1 -1
  10. package/agents/instructions.js +1 -1
  11. package/agents/instructions.js.map +1 -1
  12. package/agents/kiro.d.ts +15 -0
  13. package/agents/kiro.js +33 -0
  14. package/agents/kiro.js.map +1 -0
  15. package/agents/opencode.d.ts +22 -0
  16. package/agents/opencode.js +76 -0
  17. package/agents/opencode.js.map +1 -0
  18. package/agents/shared.d.ts +5 -5
  19. package/agents/shared.js +3 -3
  20. package/agents/shared.js.map +1 -1
  21. package/agents/windsurf.d.ts +2 -2
  22. package/agents/windsurf.js.map +1 -1
  23. package/bin.d.ts +2 -0
  24. package/bin.js +4 -0
  25. package/bin.js.map +1 -0
  26. package/cli/ConfigureMcp.d.ts +7 -14
  27. package/cli/ConfigureMcp.js +24 -52
  28. package/cli/ConfigureMcp.js.map +1 -1
  29. package/cli/McpServer.d.ts +3 -10
  30. package/cli/McpServer.js +83 -109
  31. package/cli/McpServer.js.map +1 -1
  32. package/cli.d.ts +1 -0
  33. package/cli.js +60 -0
  34. package/cli.js.map +1 -0
  35. package/index.d.ts +6 -1
  36. package/index.js +7 -1
  37. package/index.js.map +1 -1
  38. package/package.json +11 -23
  39. package/skills/admin/admin-architect/SKILL.md +389 -0
  40. package/skills/admin/ui-extensions/SKILL.md +268 -0
  41. package/skills/api/api-architect/SKILL.md +189 -0
  42. package/skills/api/custom-field-type/SKILL.md +263 -0
  43. package/skills/api/event-handler-pattern/SKILL.md +131 -0
  44. package/skills/{custom-graphql-api → api/graphql-api}/SKILL.md +3 -3
  45. package/skills/api/use-case-pattern/SKILL.md +102 -0
  46. package/skills/cli-extensions/SKILL.md +45 -47
  47. package/skills/configure-auth0/SKILL.md +4 -4
  48. package/skills/configure-okta/SKILL.md +3 -3
  49. package/skills/content-models/SKILL.md +197 -196
  50. package/skills/dependency-injection/SKILL.md +9 -219
  51. package/skills/full-stack-architect/SKILL.md +195 -0
  52. package/skills/generated/admin/SKILL.md +119 -0
  53. package/skills/generated/admin/aco/SKILL.md +28 -0
  54. package/skills/generated/admin/build-params/SKILL.md +33 -0
  55. package/skills/generated/admin/cms/SKILL.md +342 -0
  56. package/skills/generated/admin/configs/SKILL.md +23 -0
  57. package/skills/generated/admin/env-config/SKILL.md +30 -0
  58. package/skills/generated/admin/form/SKILL.md +88 -0
  59. package/skills/generated/admin/graphql-client/SKILL.md +23 -0
  60. package/skills/generated/admin/lexical/SKILL.md +105 -0
  61. package/skills/generated/admin/local-storage/SKILL.md +42 -0
  62. package/skills/generated/admin/router/SKILL.md +48 -0
  63. package/skills/generated/admin/security/SKILL.md +63 -0
  64. package/skills/generated/admin/tenancy/SKILL.md +64 -0
  65. package/skills/generated/admin/ui/SKILL.md +468 -0
  66. package/skills/generated/admin/website-builder/SKILL.md +318 -0
  67. package/skills/generated/api/SKILL.md +40 -0
  68. package/skills/generated/api/aco/SKILL.md +202 -0
  69. package/skills/generated/api/build-params/SKILL.md +31 -0
  70. package/skills/generated/api/cms/SKILL.md +646 -0
  71. package/skills/generated/api/event-publisher/SKILL.md +31 -0
  72. package/skills/generated/api/file-manager/SKILL.md +189 -0
  73. package/skills/generated/api/graphql/SKILL.md +61 -0
  74. package/skills/generated/api/key-value-store/SKILL.md +31 -0
  75. package/skills/generated/api/logger/SKILL.md +25 -0
  76. package/skills/generated/api/opensearch/SKILL.md +39 -0
  77. package/skills/generated/api/scheduler/SKILL.md +112 -0
  78. package/skills/generated/api/security/SKILL.md +317 -0
  79. package/skills/generated/api/system/SKILL.md +34 -0
  80. package/skills/generated/api/tasks/SKILL.md +31 -0
  81. package/skills/generated/api/tenancy/SKILL.md +124 -0
  82. package/skills/generated/api/tenant-manager/SKILL.md +34 -0
  83. package/skills/generated/api/website-builder/SKILL.md +356 -0
  84. package/skills/generated/cli/SKILL.md +28 -0
  85. package/skills/generated/cli/command/SKILL.md +24 -0
  86. package/skills/generated/extensions/SKILL.md +43 -0
  87. package/skills/generated/infra/SKILL.md +190 -0
  88. package/skills/infrastructure-extensions/SKILL.md +3 -2
  89. package/skills/local-development/SKILL.md +2 -28
  90. package/skills/project-structure/SKILL.md +78 -56
  91. package/skills/webiny-sdk/SKILL.md +77 -76
  92. package/skills/website-builder/SKILL.md +143 -149
  93. package/ui.d.ts +24 -0
  94. package/ui.js +31 -0
  95. package/ui.js.map +1 -0
  96. package/Extension.d.ts +0 -2
  97. package/Extension.js +0 -11
  98. package/Extension.js.map +0 -1
  99. package/skills/admin-ui-extensions/SKILL.md +0 -267
  100. package/skills/api-custom-feature/SKILL.md +0 -195
  101. package/skills/lifecycle-events/SKILL.md +0 -348
@@ -6,9 +6,9 @@
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
10
  interface InitParams {
11
- ui: Ui.Interface;
11
+ ui: IUi;
12
12
  cwd: string;
13
13
  }
14
14
  export declare function init({ ui, cwd }: InitParams): Promise<void>;
@@ -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,"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 { IUi } from \"../ui.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\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"],"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":[]}
package/agents/cline.d.ts CHANGED
@@ -8,9 +8,9 @@
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
12
  interface InitParams {
13
- ui: Ui.Interface;
13
+ ui: IUi;
14
14
  cwd: string;
15
15
  }
16
16
  export declare function init({ ui, cwd }: InitParams): Promise<void>;
@@ -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,"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 { IUi } from \"../ui.js\";\nimport { writeMcpConfig, printDone } from \"./shared.js\";\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"],"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":[]}
@@ -8,9 +8,9 @@
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
12
  interface InitParams {
13
- ui: Ui.Interface;
13
+ ui: IUi;
14
14
  cwd: string;
15
15
  }
16
16
  export declare function init({ ui, cwd }: InitParams): Promise<void>;
package/agents/copilot.js CHANGED
@@ -21,7 +21,7 @@ function writeCopilotMcpConfig(ui, configPath) {
21
21
  }
22
22
  const entry = {
23
23
  command: "npx",
24
- args: ["webiny", "mcp-server"]
24
+ args: ["webiny-mcp", "serve"]
25
25
  };
26
26
  let config = {
27
27
  servers: {}
@@ -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":"AAA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C,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,"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 { IUi } from \"../ui.js\";\nimport { writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\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"],"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,EAAO,EAAEC,UAAkB,EAAW;EACjE,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,YAAY,EAAE,OAAO;EAAE,CAAC;EAC/D,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":[]}
@@ -6,9 +6,9 @@
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
10
  interface InitParams {
11
- ui: Ui.Interface;
11
+ ui: IUi;
12
12
  cwd: string;
13
13
  }
14
14
  export declare function init({ ui, cwd }: InitParams): Promise<void>;
@@ -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,"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 { IUi } from \"../ui.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\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"],"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":[]}
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
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).", ""];
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", "serve"]', " }", "", "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", " OpenCode opencode.json (project root, uses 'mcp' not 'mcpServers')", " 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", "serve"]', " }", " }", " }", "", "── 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)", " OpenCode AGENTS.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
10
  process.stdout.write(lines.join("\n") + "\n");
11
11
  }
12
12
 
@@ -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 ];\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EDC,OAAO,CAACC,MAAM,CAACC,KAAK,CAACH,KAAK,CAACI,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjD","ignoreList":[]}
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\", \"serve\"]',\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 \" OpenCode opencode.json (project root, uses 'mcp' not 'mcpServers')\",\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\", \"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 \" Claude Code CLAUDE.md (project root)\",\n \" OpenCode AGENTS.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,qCAAqC,EACrC,KAAK,EACL,EAAE,EACF,gDAAgD,EAChD,EAAE,EACF,kCAAkC,EAClC,6DAA6D,EAC7D,8DAA8D,EAC9D,8DAA8D,EAC9D,8DAA8D,EAC9D,wFAAwF,EACxF,sDAAsD,EACtD,2FAA2F,EAC3F,6EAA6E,EAC7E,sFAAsF,EACtF,kFAAkF,EAClF,EAAE,EACF,uCAAuC,EACvC,EAAE,EACF,KAAK,EACL,qBAAqB,EACrB,mBAAmB,EACnB,2BAA2B,EAC3B,yCAAyC,EACzC,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,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":[]}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Agent adapter: Kiro
3
+ *
4
+ * MCP config : .kiro/settings/mcp.json (project-level, checked into git)
5
+ * Hint file : AGENTS.md (Claude Code reads this automatically each session)
6
+ *
7
+ * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp
8
+ */
9
+ import type { IUi } from "../ui.js";
10
+ interface InitParams {
11
+ ui: IUi;
12
+ cwd: string;
13
+ }
14
+ export declare function init({ ui, cwd }: InitParams): Promise<void>;
15
+ export {};
package/agents/kiro.js ADDED
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Agent adapter: Kiro
3
+ *
4
+ * MCP config : .kiro/settings/mcp.json (project-level, checked into git)
5
+ * Hint file : AGENTS.md (Claude Code reads this automatically each session)
6
+ *
7
+ * Docs: https://docs.anthropic.com/en/docs/claude-code/mcp
8
+ */
9
+
10
+ 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 Kiro...");
17
+ writeMcpConfig({
18
+ ui,
19
+ configPath: join(cwd, ".kiro/settings/mcp.json")
20
+ });
21
+ writeHintFile({
22
+ ui,
23
+ hintPath: join(cwd, "AGENTS.md"),
24
+ content: webinyHintBlock({
25
+ heading: "## Webiny"
26
+ })
27
+ });
28
+ printDone({
29
+ ui
30
+ });
31
+ }
32
+
33
+ //# sourceMappingURL=kiro.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["kiro.ts"],"sourcesContent":["/**\n * Agent adapter: Kiro\n *\n * MCP config : .kiro/settings/mcp.json (project-level, checked into git)\n * Hint file : AGENTS.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 { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\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 Kiro...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".kiro/settings/mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \"AGENTS.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,wBAAwB,CAAC;EAEjCP,cAAc,CAAC;IACXK,EAAE;IACFG,UAAU,EAAET,IAAI,CAACO,GAAG,EAAE,yBAAyB;EACnD,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":[]}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Agent adapter: OpenCode
3
+ *
4
+ * MCP config : opencode.json (project root)
5
+ * Hint file : AGENTS.md (OpenCode reads this automatically each session)
6
+ *
7
+ * OpenCode uses a different MCP config shape than other agents:
8
+ * {
9
+ * "mcp": {
10
+ * "webiny": { "type": "local", "command": ["npx", "webiny", "mcp-server"], "enabled": true }
11
+ * }
12
+ * }
13
+ *
14
+ * Docs: https://opencode.ai/docs/mcp-servers/
15
+ */
16
+ import type { IUi } from "../ui.js";
17
+ interface InitParams {
18
+ ui: IUi;
19
+ cwd: string;
20
+ }
21
+ export declare function init({ ui, cwd }: InitParams): Promise<void>;
22
+ export {};
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Agent adapter: OpenCode
3
+ *
4
+ * MCP config : opencode.json (project root)
5
+ * Hint file : AGENTS.md (OpenCode reads this automatically each session)
6
+ *
7
+ * OpenCode uses a different MCP config shape than other agents:
8
+ * {
9
+ * "mcp": {
10
+ * "webiny": { "type": "local", "command": ["npx", "webiny", "mcp-server"], "enabled": true }
11
+ * }
12
+ * }
13
+ *
14
+ * Docs: https://opencode.ai/docs/mcp-servers/
15
+ */
16
+
17
+ import { readFileSync, writeFileSync, existsSync } from "fs";
18
+ import { join } from "path";
19
+ import { writeHintFile, webinyHintBlock, printDone } from "./shared.js";
20
+ export async function init({
21
+ ui,
22
+ cwd
23
+ }) {
24
+ ui.info("Setting up for OpenCode...");
25
+ writeOpenCodeMcpConfig({
26
+ ui,
27
+ configPath: join(cwd, "opencode.json")
28
+ });
29
+ writeHintFile({
30
+ ui,
31
+ hintPath: join(cwd, "AGENTS.md"),
32
+ content: webinyHintBlock({
33
+ heading: "## Webiny"
34
+ })
35
+ });
36
+ printDone({
37
+ ui
38
+ });
39
+ }
40
+
41
+ // ---------------------------------------------------------------------------
42
+ // OpenCode-specific MCP config writer
43
+ // ---------------------------------------------------------------------------
44
+
45
+ function writeOpenCodeMcpConfig({
46
+ ui,
47
+ configPath
48
+ }) {
49
+ const entry = {
50
+ type: "local",
51
+ command: ["npx", "webiny-mcp", "serve", "--additional-skills=./my-skills"],
52
+ enabled: true
53
+ };
54
+ let config = {
55
+ $schema: "https://opencode.ai/config.json",
56
+ mcp: {}
57
+ };
58
+ if (existsSync(configPath)) {
59
+ try {
60
+ config = JSON.parse(readFileSync(configPath, "utf8"));
61
+ config.mcp ??= {};
62
+ } catch {
63
+ ui.warning(`Could not parse %s — will overwrite.`, configPath);
64
+ }
65
+ }
66
+ if (config.mcp.webiny) {
67
+ ui.info(`%s already has a %s entry — skipping.`, configPath, "webiny");
68
+ return false;
69
+ }
70
+ config.mcp.webiny = entry;
71
+ writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
72
+ ui.success(`Registered Webiny MCP server in %s`, configPath);
73
+ return true;
74
+ }
75
+
76
+ //# sourceMappingURL=opencode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["readFileSync","writeFileSync","existsSync","join","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","writeOpenCodeMcpConfig","configPath","hintPath","content","heading","entry","type","command","enabled","config","$schema","mcp","JSON","parse","warning","webiny","stringify","success"],"sources":["opencode.ts"],"sourcesContent":["/**\n * Agent adapter: OpenCode\n *\n * MCP config : opencode.json (project root)\n * Hint file : AGENTS.md (OpenCode reads this automatically each session)\n *\n * OpenCode uses a different MCP config shape than other agents:\n * {\n * \"mcp\": {\n * \"webiny\": { \"type\": \"local\", \"command\": [\"npx\", \"webiny\", \"mcp-server\"], \"enabled\": true }\n * }\n * }\n *\n * Docs: https://opencode.ai/docs/mcp-servers/\n */\n\nimport { readFileSync, writeFileSync, existsSync } from \"fs\";\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport { writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\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 OpenCode...\");\n\n writeOpenCodeMcpConfig({ ui, configPath: join(cwd, \"opencode.json\") });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \"AGENTS.md\"),\n content: webinyHintBlock({ heading: \"## Webiny\" })\n });\n\n printDone({ ui });\n}\n\n// ---------------------------------------------------------------------------\n// OpenCode-specific MCP config writer\n// ---------------------------------------------------------------------------\n\ninterface WriteOpenCodeMcpConfigParams {\n ui: IUi;\n configPath: string;\n}\n\nfunction writeOpenCodeMcpConfig({ ui, configPath }: WriteOpenCodeMcpConfigParams): boolean {\n const entry = {\n type: \"local\",\n command: [\"npx\", \"webiny-mcp\", \"serve\", \"--additional-skills=./my-skills\"],\n enabled: true\n };\n\n let config: { $schema?: string; mcp: Record<string, unknown> } = {\n $schema: \"https://opencode.ai/config.json\",\n mcp: {}\n };\n\n if (existsSync(configPath)) {\n try {\n config = JSON.parse(readFileSync(configPath, \"utf8\"));\n config.mcp ??= {};\n } catch {\n ui.warning(`Could not parse %s — will overwrite.`, configPath);\n }\n }\n\n if (config.mcp.webiny) {\n ui.info(`%s already has a %s entry — skipping.`, configPath, \"webiny\");\n return false;\n }\n\n config.mcp.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"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,EAAEC,aAAa,EAAEC,UAAU,QAAQ,IAAI;AAC5D,SAASC,IAAI,QAAQ,MAAM;AAE3B,SAASC,aAAa,EAAEC,eAAe,EAAEC,SAAS;AAOlD,OAAO,eAAeC,IAAIA,CAAC;EAAEC,EAAE;EAAEC;AAAgB,CAAC,EAAiB;EAC/DD,EAAE,CAACE,IAAI,CAAC,4BAA4B,CAAC;EAErCC,sBAAsB,CAAC;IAAEH,EAAE;IAAEI,UAAU,EAAET,IAAI,CAACM,GAAG,EAAE,eAAe;EAAE,CAAC,CAAC;EAEtEL,aAAa,CAAC;IACVI,EAAE;IACFK,QAAQ,EAAEV,IAAI,CAACM,GAAG,EAAE,WAAW,CAAC;IAChCK,OAAO,EAAET,eAAe,CAAC;MAAEU,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFT,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB;;AAEA;AACA;AACA;;AAOA,SAASG,sBAAsBA,CAAC;EAAEH,EAAE;EAAEI;AAAyC,CAAC,EAAW;EACvF,MAAMI,KAAK,GAAG;IACVC,IAAI,EAAE,OAAO;IACbC,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,iCAAiC,CAAC;IAC1EC,OAAO,EAAE;EACb,CAAC;EAED,IAAIC,MAA0D,GAAG;IAC7DC,OAAO,EAAE,iCAAiC;IAC1CC,GAAG,EAAE,CAAC;EACV,CAAC;EAED,IAAIpB,UAAU,CAACU,UAAU,CAAC,EAAE;IACxB,IAAI;MACAQ,MAAM,GAAGG,IAAI,CAACC,KAAK,CAACxB,YAAY,CAACY,UAAU,EAAE,MAAM,CAAC,CAAC;MACrDQ,MAAM,CAACE,GAAG,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC,MAAM;MACJd,EAAE,CAACiB,OAAO,CAAC,sCAAsC,EAAEb,UAAU,CAAC;IAClE;EACJ;EAEA,IAAIQ,MAAM,CAACE,GAAG,CAACI,MAAM,EAAE;IACnBlB,EAAE,CAACE,IAAI,CAAC,uCAAuC,EAAEE,UAAU,EAAE,QAAQ,CAAC;IACtE,OAAO,KAAK;EAChB;EAEAQ,MAAM,CAACE,GAAG,CAACI,MAAM,GAAGV,KAAK;EACzBf,aAAa,CAACW,UAAU,EAAEW,IAAI,CAACI,SAAS,CAACP,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;EACjEZ,EAAE,CAACoB,OAAO,CAAC,oCAAoC,EAAEhB,UAAU,CAAC;EAC5D,OAAO,IAAI;AACf","ignoreList":[]}
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Shared helpers for agent adapters.
3
3
  */
4
- import type { Ui } from "@webiny/cli-core/exports/cli/index.js";
4
+ import type { IUi } from "../ui.js";
5
5
  interface WriteMcpConfigParams {
6
- ui: Ui.Interface;
6
+ ui: IUi;
7
7
  configPath: string;
8
8
  }
9
9
  /**
@@ -12,13 +12,13 @@ interface WriteMcpConfigParams {
12
12
  * All agents use the same JSON shape — only the file path differs:
13
13
  * {
14
14
  * "mcpServers": {
15
- * "webiny": { "command": "npx", "args": ["webiny", "mcp-server"] }
15
+ * "webiny": { "command": "npx", "args": ["webiny-mcp", "serve"] }
16
16
  * }
17
17
  * }
18
18
  */
19
19
  export declare function writeMcpConfig({ ui, configPath }: WriteMcpConfigParams): boolean;
20
20
  interface WriteHintFileParams {
21
- ui: Ui.Interface;
21
+ ui: IUi;
22
22
  hintPath: string;
23
23
  content: string;
24
24
  marker?: string;
@@ -34,7 +34,7 @@ interface WebinyHintBlockParams {
34
34
  }
35
35
  export declare function webinyHintBlock({ heading, prefix }?: WebinyHintBlockParams): string;
36
36
  interface PrintDoneParams {
37
- ui: Ui.Interface;
37
+ ui: IUi;
38
38
  extra?: string;
39
39
  }
40
40
  export declare function printDone({ ui, extra }: PrintDoneParams): void;
package/agents/shared.js CHANGED
@@ -15,7 +15,7 @@ import { dirname } from "path";
15
15
  * All agents use the same JSON shape — only the file path differs:
16
16
  * {
17
17
  * "mcpServers": {
18
- * "webiny": { "command": "npx", "args": ["webiny", "mcp-server"] }
18
+ * "webiny": { "command": "npx", "args": ["webiny-mcp", "serve"] }
19
19
  * }
20
20
  * }
21
21
  */
@@ -26,7 +26,7 @@ export function writeMcpConfig({
26
26
  ensureDir(configPath);
27
27
  const entry = {
28
28
  command: "npx",
29
- args: ["webiny", "mcp-server", "--additional-skills=./my-skills"]
29
+ args: ["webiny-mcp", "serve", "--additional-skills=./my-skills"]
30
30
  };
31
31
  let config = {
32
32
  mcpServers: {}
@@ -104,7 +104,7 @@ export function printDone({
104
104
  ui.info("Restart your agent/editor session if it is already running.");
105
105
  ui.emptyLine();
106
106
  ui.info("To test the MCP server directly:");
107
- ui.info(" %s", "npx @modelcontextprotocol/inspector npx webiny mcp-server");
107
+ ui.info(" %s", "npx @modelcontextprotocol/inspector npx webiny-mcp serve");
108
108
  ui.emptyLine();
109
109
  }
110
110
 
@@ -1 +1 @@
1
- {"version":3,"names":["readFileSync","writeFileSync","existsSync","mkdirSync","dirname","writeMcpConfig","ui","configPath","ensureDir","entry","command","args","config","mcpServers","JSON","parse","warning","webiny","info","stringify","success","writeHintFile","hintPath","content","marker","existing","includes","trimEnd","trim","webinyHintBlock","heading","prefix","join","printDone","extra","emptyLine","filePath","dir","recursive"],"sources":["shared.ts"],"sourcesContent":["/**\n * Shared helpers for agent adapters.\n */\n\nimport { readFileSync, writeFileSync, existsSync, mkdirSync } from \"fs\";\nimport { dirname } from \"path\";\nimport type { Ui } from \"@webiny/cli-core/exports/cli/index.js\";\n\n// ---------------------------------------------------------------------------\n// MCP config helpers\n// ---------------------------------------------------------------------------\n\ninterface WriteMcpConfigParams {\n ui: Ui.Interface;\n configPath: string;\n}\n\n/**\n * Write (or patch) an MCP server registration into a JSON config file.\n *\n * All agents use the same JSON shape — only the file path differs:\n * {\n * \"mcpServers\": {\n * \"webiny\": { \"command\": \"npx\", \"args\": [\"webiny\", \"mcp-server\"] }\n * }\n * }\n */\nexport function writeMcpConfig({ ui, configPath }: WriteMcpConfigParams): boolean {\n ensureDir(configPath);\n\n const entry = {\n command: \"npx\",\n args: [\"webiny\", \"mcp-server\", \"--additional-skills=./my-skills\"]\n };\n let config: { mcpServers: Record<string, unknown> } = { mcpServers: {} };\n\n if (existsSync(configPath)) {\n try {\n config = JSON.parse(readFileSync(configPath, \"utf8\"));\n config.mcpServers ??= {};\n } catch {\n ui.warning(`Could not parse %s — will overwrite.`, configPath);\n }\n }\n\n if (config.mcpServers.webiny) {\n ui.info(`%s already has a %s entry — skipping.`, configPath, \"webiny\");\n return false;\n }\n\n config.mcpServers.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\n// ---------------------------------------------------------------------------\n// Hint file helpers\n// ---------------------------------------------------------------------------\n\ninterface WriteHintFileParams {\n ui: Ui.Interface;\n hintPath: string;\n content: string;\n marker?: string;\n}\n\n/**\n * Append Webiny instructions to a markdown hint file (CLAUDE.md,\n * copilot-instructions.md, etc.) if not already present.\n */\nexport function writeHintFile({\n ui,\n hintPath,\n content,\n marker = \"list_webiny_skills\"\n}: WriteHintFileParams): boolean {\n ensureDir(hintPath);\n\n if (existsSync(hintPath)) {\n const existing = readFileSync(hintPath, \"utf8\");\n if (existing.includes(marker)) {\n ui.info(`%s already contains Webiny instructions — skipping.`, hintPath);\n return false;\n }\n writeFileSync(hintPath, existing.trimEnd() + \"\\n\\n\" + content.trim() + \"\\n\");\n } else {\n writeFileSync(hintPath, content.trim() + \"\\n\");\n }\n\n ui.success(`Wrote Webiny instructions to ${hintPath}`);\n return true;\n}\n\n// ---------------------------------------------------------------------------\n// Common hint block (same concept across all agents, slightly different wrapping)\n// ---------------------------------------------------------------------------\n\ninterface WebinyHintBlockParams {\n heading?: string;\n prefix?: string;\n}\n\nexport function webinyHintBlock({\n heading = \"## Webiny\",\n prefix = \"\"\n}: WebinyHintBlockParams = {}): string {\n return [\n heading,\n \"\",\n `${prefix}This project uses the Webiny framework.`,\n `${prefix}A \\`webiny\\` MCP server is available.`,\n `${prefix}When helping with Webiny-related tasks:`,\n `${prefix}1. Call \\`list_webiny_skills\\` to see available skills.`,\n `${prefix}2. Call \\`get_webiny_skill\\` with the relevant topic before writing code.`,\n \"\"\n ].join(\"\\n\");\n}\n\n// ---------------------------------------------------------------------------\n// Done message\n// ---------------------------------------------------------------------------\n\ninterface PrintDoneParams {\n ui: Ui.Interface;\n extra?: string;\n}\n\nexport function printDone({ ui, extra }: PrintDoneParams): void {\n ui.emptyLine();\n if (extra) {\n ui.warning(extra);\n }\n ui.info(\"Restart your agent/editor session if it is already running.\");\n ui.emptyLine();\n ui.info(\"To test the MCP server directly:\");\n ui.info(\" %s\", \"npx @modelcontextprotocol/inspector npx webiny mcp-server\");\n ui.emptyLine();\n}\n\n// ---------------------------------------------------------------------------\n// Internal\n// ---------------------------------------------------------------------------\n\nfunction ensureDir(filePath: string): void {\n const dir = dirname(filePath);\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n}\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,YAAY,EAAEC,aAAa,EAAEC,UAAU,EAAEC,SAAS,QAAQ,IAAI;AACvE,SAASC,OAAO,QAAQ,MAAM;;AAG9B;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA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,CAAC6B,SAAS,CAAC,CAAC;AAClB;;AAEA;AACA;AACA;;AAEA,SAAS3B,SAASA,CAAC4B,QAAgB,EAAQ;EACvC,MAAMC,GAAG,GAAGjC,OAAO,CAACgC,QAAQ,CAAC;EAC7B,IAAI,CAAClC,UAAU,CAACmC,GAAG,CAAC,EAAE;IAClBlC,SAAS,CAACkC,GAAG,EAAE;MAAEC,SAAS,EAAE;IAAK,CAAC,CAAC;EACvC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["readFileSync","writeFileSync","existsSync","mkdirSync","dirname","writeMcpConfig","ui","configPath","ensureDir","entry","command","args","config","mcpServers","JSON","parse","warning","webiny","info","stringify","success","writeHintFile","hintPath","content","marker","existing","includes","trimEnd","trim","webinyHintBlock","heading","prefix","join","printDone","extra","emptyLine","filePath","dir","recursive"],"sources":["shared.ts"],"sourcesContent":["/**\n * Shared helpers for agent adapters.\n */\n\nimport { readFileSync, writeFileSync, existsSync, mkdirSync } from \"fs\";\nimport { dirname } from \"path\";\nimport type { IUi } from \"../ui.js\";\n\n// ---------------------------------------------------------------------------\n// MCP config helpers\n// ---------------------------------------------------------------------------\n\ninterface WriteMcpConfigParams {\n ui: IUi;\n configPath: string;\n}\n\n/**\n * Write (or patch) an MCP server registration into a JSON config file.\n *\n * All agents use the same JSON shape — only the file path differs:\n * {\n * \"mcpServers\": {\n * \"webiny\": { \"command\": \"npx\", \"args\": [\"webiny-mcp\", \"serve\"] }\n * }\n * }\n */\nexport function writeMcpConfig({ ui, configPath }: WriteMcpConfigParams): boolean {\n ensureDir(configPath);\n\n const entry = {\n command: \"npx\",\n args: [\"webiny-mcp\", \"serve\", \"--additional-skills=./my-skills\"]\n };\n let config: { mcpServers: Record<string, unknown> } = { mcpServers: {} };\n\n if (existsSync(configPath)) {\n try {\n config = JSON.parse(readFileSync(configPath, \"utf8\"));\n config.mcpServers ??= {};\n } catch {\n ui.warning(`Could not parse %s — will overwrite.`, configPath);\n }\n }\n\n if (config.mcpServers.webiny) {\n ui.info(`%s already has a %s entry — skipping.`, configPath, \"webiny\");\n return false;\n }\n\n config.mcpServers.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\n// ---------------------------------------------------------------------------\n// Hint file helpers\n// ---------------------------------------------------------------------------\n\ninterface WriteHintFileParams {\n ui: IUi;\n hintPath: string;\n content: string;\n marker?: string;\n}\n\n/**\n * Append Webiny instructions to a markdown hint file (CLAUDE.md,\n * copilot-instructions.md, etc.) if not already present.\n */\nexport function writeHintFile({\n ui,\n hintPath,\n content,\n marker = \"list_webiny_skills\"\n}: WriteHintFileParams): boolean {\n ensureDir(hintPath);\n\n if (existsSync(hintPath)) {\n const existing = readFileSync(hintPath, \"utf8\");\n if (existing.includes(marker)) {\n ui.info(`%s already contains Webiny instructions — skipping.`, hintPath);\n return false;\n }\n writeFileSync(hintPath, existing.trimEnd() + \"\\n\\n\" + content.trim() + \"\\n\");\n } else {\n writeFileSync(hintPath, content.trim() + \"\\n\");\n }\n\n ui.success(`Wrote Webiny instructions to ${hintPath}`);\n return true;\n}\n\n// ---------------------------------------------------------------------------\n// Common hint block (same concept across all agents, slightly different wrapping)\n// ---------------------------------------------------------------------------\n\ninterface WebinyHintBlockParams {\n heading?: string;\n prefix?: string;\n}\n\nexport function webinyHintBlock({\n heading = \"## Webiny\",\n prefix = \"\"\n}: WebinyHintBlockParams = {}): string {\n return [\n heading,\n \"\",\n `${prefix}This project uses the Webiny framework.`,\n `${prefix}A \\`webiny\\` MCP server is available.`,\n `${prefix}When helping with Webiny-related tasks:`,\n `${prefix}1. Call \\`list_webiny_skills\\` to see available skills.`,\n `${prefix}2. Call \\`get_webiny_skill\\` with the relevant topic before writing code.`,\n \"\"\n ].join(\"\\n\");\n}\n\n// ---------------------------------------------------------------------------\n// Done message\n// ---------------------------------------------------------------------------\n\ninterface PrintDoneParams {\n ui: IUi;\n extra?: string;\n}\n\nexport function printDone({ ui, extra }: PrintDoneParams): void {\n ui.emptyLine();\n if (extra) {\n ui.warning(extra);\n }\n ui.info(\"Restart your agent/editor session if it is already running.\");\n ui.emptyLine();\n ui.info(\"To test the MCP server directly:\");\n ui.info(\" %s\", \"npx @modelcontextprotocol/inspector npx webiny-mcp serve\");\n ui.emptyLine();\n}\n\n// ---------------------------------------------------------------------------\n// Internal\n// ---------------------------------------------------------------------------\n\nfunction ensureDir(filePath: string): void {\n const dir = dirname(filePath);\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n}\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,YAAY,EAAEC,aAAa,EAAEC,UAAU,EAAEC,SAAS,QAAQ,IAAI;AACvE,SAASC,OAAO,QAAQ,MAAM;;AAG9B;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAC;EAAEC,EAAE;EAAEC;AAAiC,CAAC,EAAW;EAC9EC,SAAS,CAACD,UAAU,CAAC;EAErB,MAAME,KAAK,GAAG;IACVC,OAAO,EAAE,KAAK;IACdC,IAAI,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,iCAAiC;EACnE,CAAC;EACD,IAAIC,MAA+C,GAAG;IAAEC,UAAU,EAAE,CAAC;EAAE,CAAC;EAExE,IAAIX,UAAU,CAACK,UAAU,CAAC,EAAE;IACxB,IAAI;MACAK,MAAM,GAAGE,IAAI,CAACC,KAAK,CAACf,YAAY,CAACO,UAAU,EAAE,MAAM,CAAC,CAAC;MACrDK,MAAM,CAACC,UAAU,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAC,MAAM;MACJP,EAAE,CAACU,OAAO,CAAC,sCAAsC,EAAET,UAAU,CAAC;IAClE;EACJ;EAEA,IAAIK,MAAM,CAACC,UAAU,CAACI,MAAM,EAAE;IAC1BX,EAAE,CAACY,IAAI,CAAC,uCAAuC,EAAEX,UAAU,EAAE,QAAQ,CAAC;IACtE,O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MAAM,uCAAuC,EAChD,GAAGA,MAAM,yCAAyC,EAClD,GAAGA,MAAM,yDAAyD,EAClE,GAAGA,MAAM,2EAA2E,EACpF,EAAE,CACL,CAACC,IAAI,CAAC,IAAI,CAAC;AAChB;;AAEA;AACA;AACA;;AAOA,OAAO,SAASC,SAASA,CAAC;EAAE3B,EAAE;EAAE4B;AAAuB,CAAC,EAAQ;EAC5D5B,EAAE,CAAC6B,SAAS,CAAC,CAAC;EACd,IAAID,KAAK,EAAE;IACP5B,EAAE,CAACU,OAAO,CAACkB,KAAK,CAAC;EACrB;EACA5B,EAAE,CAACY,IAAI,CAAC,6DAA6D,CAAC;EACtEZ,EAAE,CAAC6B,SAAS,CAAC,CAAC;EACd7B,EAAE,CAACY,IAAI,CAAC,kCAAkC,CAAC;EAC3CZ,EAAE,CAACY,IAAI,CAAC,MAAM,EAAE,0DAA0D,CAAC;EAC3EZ,EAAE,CAAC6B,SAAS,CAAC,CAAC;AAClB;;AAEA;AACA;AACA;;AAEA,SAAS3B,SAASA,CAAC4B,QAAgB,EAAQ;EACvC,MAAMC,GAAG,GAAGjC,OAAO,CAACgC,QAAQ,CAAC;EAC7B,IAAI,CAAClC,UAAU,CAACmC,GAAG,CAAC,EAAE;IAClBlC,SAAS,CAACkC,GAAG,EAAE;MAAEC,SAAS,EAAE;IAAK,CAAC,CAAC;EACvC;AACJ","ignoreList":[]}
@@ -6,9 +6,9 @@
6
6
  *
7
7
  * Docs: https://docs.codeium.com/windsurf/mcp
8
8
  */
9
- import type { Ui } from "@webiny/cli-core/exports/cli/index.js";
9
+ import type { IUi } from "../ui.js";
10
10
  interface InitParams {
11
- ui: Ui.Interface;
11
+ ui: IUi;
12
12
  cwd: string;
13
13
  }
14
14
  export declare function init({ ui, cwd }: InitParams): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["windsurf.ts"],"sourcesContent":["/**\n * Agent adapter: Windsurf (Codeium)\n *\n * MCP config : .windsurf/mcp.json (project-level)\n * Hint file : .windsurf/rules/webiny.md\n *\n * Docs: https://docs.codeium.com/windsurf/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 Windsurf...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".windsurf\", \"mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".windsurf\", \"rules\", \"webiny.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,4BAA4B,CAAC;EAErCP,cAAc,CAAC;IACXK,EAAE;IACFG,UAAU,EAAET,IAAI,CAACO,GAAG,EAAE,WAAW,EAAE,UAAU;EACjD,CAAC,CAAC;EAEFL,aAAa,CAAC;IACVI,EAAE;IACFI,QAAQ,EAAEV,IAAI,CAACO,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC;IACtDI,OAAO,EAAER,eAAe,CAAC;MAAES,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFR,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
1
+ {"version":3,"names":["join","writeMcpConfig","writeHintFile","webinyHintBlock","printDone","init","ui","cwd","info","configPath","hintPath","content","heading"],"sources":["windsurf.ts"],"sourcesContent":["/**\n * Agent adapter: Windsurf (Codeium)\n *\n * MCP config : .windsurf/mcp.json (project-level)\n * Hint file : .windsurf/rules/webiny.md\n *\n * Docs: https://docs.codeium.com/windsurf/mcp\n */\n\nimport { join } from \"path\";\nimport type { IUi } from \"../ui.js\";\nimport { writeMcpConfig, writeHintFile, webinyHintBlock, printDone } from \"./shared.js\";\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 Windsurf...\");\n\n writeMcpConfig({\n ui,\n configPath: join(cwd, \".windsurf\", \"mcp.json\")\n });\n\n writeHintFile({\n ui,\n hintPath: join(cwd, \".windsurf\", \"rules\", \"webiny.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,4BAA4B,CAAC;EAErCP,cAAc,CAAC;IACXK,EAAE;IACFG,UAAU,EAAET,IAAI,CAACO,GAAG,EAAE,WAAW,EAAE,UAAU;EACjD,CAAC,CAAC;EAEFL,aAAa,CAAC;IACVI,EAAE;IACFI,QAAQ,EAAEV,IAAI,CAACO,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC;IACtDI,OAAO,EAAER,eAAe,CAAC;MAAES,OAAO,EAAE;IAAY,CAAC;EACrD,CAAC,CAAC;EAEFR,SAAS,CAAC;IAAEE;EAAG,CAAC,CAAC;AACrB","ignoreList":[]}
package/bin.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/bin.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import "./cli.js";
3
+
4
+ //# sourceMappingURL=bin.js.map
package/bin.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["bin.js"],"sourcesContent":["#!/usr/bin/env node\nimport \"./cli.js\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
@@ -1,15 +1,8 @@
1
- import { CliCommandFactory } from "@webiny/cli-core/exports/cli/command.js";
2
- import { Ui } from "@webiny/cli-core/exports/cli/index.js";
3
- export interface IInitAgentParams {
4
- agent: string;
5
- instructions: boolean;
1
+ import type { IUi } from "../ui.js";
2
+ export interface IConfigureMcpParams {
3
+ agent?: string;
4
+ instructions?: boolean;
5
+ ui?: IUi;
6
+ cwd?: string;
6
7
  }
7
- declare class ConfigureMcp implements CliCommandFactory.Interface<IInitAgentParams> {
8
- private ui;
9
- constructor(ui: Ui.Interface);
10
- execute(): CliCommandFactory.CommandDefinition<IInitAgentParams>;
11
- }
12
- declare const _default: typeof ConfigureMcp & {
13
- __abstraction: import("@webiny/di").Abstraction<import("@webiny/cli-core/abstractions/features/CliCommand.js").ICliCommand<any>>;
14
- };
15
- export default _default;
8
+ export declare function configureMcp(params?: IConfigureMcpParams): Promise<void>;
@@ -1,57 +1,29 @@
1
- import { CliCommandFactory } from "@webiny/cli-core/exports/cli/command.js";
2
- import { Ui } from "@webiny/cli-core/exports/cli/index.js";
3
- const SUPPORTED = ["claude", "cursor", "windsurf", "copilot", "cline"];
4
- class ConfigureMcp {
5
- constructor(ui) {
6
- this.ui = ui;
1
+ import { ConsoleUi } from "../ui.js";
2
+ const SUPPORTED = ["claude", "cursor", "windsurf", "copilot", "cline", "opencode", "kiro"];
3
+ export async function configureMcp(params = {}) {
4
+ const ui = params.ui ?? new ConsoleUi();
5
+ const cwd = params.cwd ?? process.cwd();
6
+ if (params.instructions) {
7
+ const {
8
+ printInstructions
9
+ } = await import("../agents/instructions.js");
10
+ printInstructions();
11
+ return;
7
12
  }
8
- execute() {
9
- return {
10
- name: "configure-mcp",
11
- description: "Configure MCP server for a specific agent.",
12
- examples: ["$0 configure-mcp claude", "$0 configure-mcp cursor", "$0 configure-mcp --instructions"],
13
- params: [{
14
- name: "agent",
15
- description: "Agent name (claude, cursor, windsurf, copilot, cline)",
16
- type: "string",
17
- default: "claude"
18
- }],
19
- options: [{
20
- name: "instructions",
21
- description: "Print MCP setup instructions",
22
- type: "boolean",
23
- default: false
24
- }],
25
- handler: async params => {
26
- if (params.instructions) {
27
- const {
28
- printInstructions
29
- } = await import("../agents/instructions.js");
30
- printInstructions();
31
- return;
32
- }
33
- const target = params.agent || "claude";
34
- if (!SUPPORTED.includes(target)) {
35
- this.ui.error(`Unknown agent "${target}".`);
36
- this.ui.text(`Supported: ${SUPPORTED.join(", ")}`);
37
- this.ui.text("For other agents run: npx webiny configure-mcp --instructions");
38
- process.exit(1);
39
- }
40
- const cwd = process.cwd();
41
- const {
42
- init
43
- } = await import(`../agents/${target}.js`);
44
- await init({
45
- ui: this.ui,
46
- cwd
47
- });
48
- }
49
- };
13
+ const target = params.agent || "claude";
14
+ if (!SUPPORTED.includes(target)) {
15
+ ui.error(`Unknown agent "${target}".`);
16
+ ui.text(`Supported: ${SUPPORTED.join(", ")}`);
17
+ ui.text("For other agents, run: npx webiny-mcp configure --instructions");
18
+ process.exit(1);
50
19
  }
20
+ const {
21
+ init
22
+ } = await import(`../agents/${target}.js`);
23
+ await init({
24
+ ui,
25
+ cwd
26
+ });
51
27
  }
52
- export default CliCommandFactory.createImplementation({
53
- implementation: ConfigureMcp,
54
- dependencies: [Ui]
55
- });
56
28
 
57
29
  //# sourceMappingURL=ConfigureMcp.js.map