@webiny/mcp 0.0.0-unstable.6844005670
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Extension.d.ts +2 -0
- package/Extension.js +11 -0
- package/Extension.js.map +1 -0
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/agents/claude.d.ts +15 -0
- package/agents/claude.js +33 -0
- package/agents/claude.js.map +1 -0
- package/agents/cline.d.ts +17 -0
- package/agents/cline.js +29 -0
- package/agents/cline.js.map +1 -0
- package/agents/copilot.d.ts +17 -0
- package/agents/copilot.js +64 -0
- package/agents/copilot.js.map +1 -0
- package/agents/cursor.d.ts +15 -0
- package/agents/cursor.js +33 -0
- package/agents/cursor.js.map +1 -0
- package/agents/instructions.d.ts +7 -0
- package/agents/instructions.js +13 -0
- package/agents/instructions.js.map +1 -0
- package/agents/shared.d.ts +41 -0
- package/agents/shared.js +124 -0
- package/agents/shared.js.map +1 -0
- package/agents/windsurf.d.ts +15 -0
- package/agents/windsurf.js +33 -0
- package/agents/windsurf.js.map +1 -0
- package/cli/ConfigureMcp.d.ts +15 -0
- package/cli/ConfigureMcp.js +57 -0
- package/cli/ConfigureMcp.js.map +1 -0
- package/cli/McpServer.d.ts +12 -0
- package/cli/McpServer.js +239 -0
- package/cli/McpServer.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +3 -0
- package/index.js.map +1 -0
- package/package.json +49 -0
- package/skills/admin-ui-extensions/SKILL.md +267 -0
- package/skills/cli-extensions/SKILL.md +133 -0
- package/skills/content-models/SKILL.md +306 -0
- package/skills/custom-graphql-api/SKILL.md +199 -0
- package/skills/dependency-injection/SKILL.md +252 -0
- package/skills/infrastructure-extensions/SKILL.md +192 -0
- package/skills/lifecycle-events/SKILL.md +203 -0
- package/skills/local-development/SKILL.md +245 -0
- package/skills/project-structure/SKILL.md +156 -0
- package/skills/webiny-sdk/SKILL.md +271 -0
- package/skills/website-builder/SKILL.md +384 -0
|
@@ -0,0 +1,57 @@
|
|
|
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;
|
|
7
|
+
}
|
|
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
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
export default CliCommandFactory.createImplementation({
|
|
53
|
+
implementation: ConfigureMcp,
|
|
54
|
+
dependencies: [Ui]
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
//# sourceMappingURL=ConfigureMcp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CliCommandFactory","Ui","SUPPORTED","ConfigureMcp","constructor","ui","execute","name","description","examples","params","type","default","options","handler","instructions","printInstructions","target","agent","includes","error","text","join","process","exit","cwd","init","createImplementation","implementation","dependencies"],"sources":["ConfigureMcp.ts"],"sourcesContent":["import { CliCommandFactory } from \"@webiny/cli-core/exports/cli/command.js\";\nimport { Ui } from \"@webiny/cli-core/exports/cli/index.js\";\n\nexport interface IInitAgentParams {\n agent: string;\n instructions: boolean;\n}\n\nconst SUPPORTED = [\"claude\", \"cursor\", \"windsurf\", \"copilot\", \"cline\"];\n\nclass ConfigureMcp implements CliCommandFactory.Interface<IInitAgentParams> {\n constructor(private ui: Ui.Interface) {}\n\n execute(): CliCommandFactory.CommandDefinition<IInitAgentParams> {\n return {\n name: \"configure-mcp\",\n description: \"Configure MCP server for a specific agent.\",\n examples: [\n \"$0 configure-mcp claude\",\n \"$0 configure-mcp cursor\",\n \"$0 configure-mcp --instructions\"\n ],\n params: [\n {\n name: \"agent\",\n description: \"Agent name (claude, cursor, windsurf, copilot, cline)\",\n type: \"string\",\n default: \"claude\"\n }\n ],\n options: [\n {\n name: \"instructions\",\n description: \"Print MCP setup instructions\",\n type: \"boolean\",\n default: false\n }\n ],\n handler: async params => {\n if (params.instructions) {\n const { printInstructions } = await import(\"../agents/instructions.js\");\n printInstructions();\n return;\n }\n\n const target = params.agent || \"claude\";\n\n if (!SUPPORTED.includes(target)) {\n this.ui.error(`Unknown agent \"${target}\".`);\n this.ui.text(`Supported: ${SUPPORTED.join(\", \")}`);\n this.ui.text(\"For other agents run: npx webiny configure-mcp --instructions\");\n process.exit(1);\n }\n\n const cwd = process.cwd();\n const { init } = await import(`../agents/${target}.js`);\n await init({ ui: this.ui, cwd });\n }\n };\n }\n}\n\nexport default CliCommandFactory.createImplementation({\n implementation: ConfigureMcp,\n dependencies: [Ui]\n});\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,yCAAyC;AAC3E,SAASC,EAAE,QAAQ,uCAAuC;AAO1D,MAAMC,SAAS,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC;AAEtE,MAAMC,YAAY,CAA0D;EACxEC,WAAWA,CAASC,EAAgB,EAAE;IAAA,KAAlBA,EAAgB,GAAhBA,EAAgB;EAAG;EAEvCC,OAAOA,CAAA,EAA0D;IAC7D,OAAO;MACHC,IAAI,EAAE,eAAe;MACrBC,WAAW,EAAE,4CAA4C;MACzDC,QAAQ,EAAE,CACN,yBAAyB,EACzB,yBAAyB,EACzB,iCAAiC,CACpC;MACDC,MAAM,EAAE,CACJ;QACIH,IAAI,EAAE,OAAO;QACbC,WAAW,EAAE,uDAAuD;QACpEG,IAAI,EAAE,QAAQ;QACdC,OAAO,EAAE;MACb,CAAC,CACJ;MACDC,OAAO,EAAE,CACL;QACIN,IAAI,EAAE,cAAc;QACpBC,WAAW,EAAE,8BAA8B;QAC3CG,IAAI,EAAE,SAAS;QACfC,OAAO,EAAE;MACb,CAAC,CACJ;MACDE,OAAO,EAAE,MAAMJ,MAAM,IAAI;QACrB,IAAIA,MAAM,CAACK,YAAY,EAAE;UACrB,MAAM;YAAEC;UAAkB,CAAC,GAAG,MAAM,MAAM,4BAA4B,CAAC;UACvEA,iBAAiB,CAAC,CAAC;UACnB;QACJ;QAEA,MAAMC,MAAM,GAAGP,MAAM,CAACQ,KAAK,IAAI,QAAQ;QAEvC,IAAI,CAAChB,SAAS,CAACiB,QAAQ,CAACF,MAAM,CAAC,EAAE;UAC7B,IAAI,CAACZ,EAAE,CAACe,KAAK,CAAC,kBAAkBH,MAAM,IAAI,CAAC;UAC3C,IAAI,CAACZ,EAAE,CAACgB,IAAI,CAAC,cAAcnB,SAAS,CAACoB,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;UAClD,IAAI,CAACjB,EAAE,CAACgB,IAAI,CAAC,+DAA+D,CAAC;UAC7EE,OAAO,CAACC,IAAI,CAAC,CAAC,CAAC;QACnB;QAEA,MAAMC,GAAG,GAAGF,OAAO,CAACE,GAAG,CAAC,CAAC;QACzB,MAAM;UAAEC;QAAK,CAAC,GAAG,MAAM,MAAM,CAAC,aAAaT,MAAM,KAAK,CAAC;QACvD,MAAMS,IAAI,CAAC;UAAErB,EAAE,EAAE,IAAI,CAACA,EAAE;UAAEoB;QAAI,CAAC,CAAC;MACpC;IACJ,CAAC;EACL;AACJ;AAEA,eAAezB,iBAAiB,CAAC2B,oBAAoB,CAAC;EAClDC,cAAc,EAAEzB,YAAY;EAC5B0B,YAAY,EAAE,CAAC5B,EAAE;AACrB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CliCommandFactory } from "@webiny/cli-core/exports/cli/command.js";
|
|
2
|
+
export interface IMcpServerParams {
|
|
3
|
+
skills: string;
|
|
4
|
+
"additional-skills": string[];
|
|
5
|
+
}
|
|
6
|
+
declare class McpServerCommand implements CliCommandFactory.Interface<IMcpServerParams> {
|
|
7
|
+
execute(): CliCommandFactory.CommandDefinition<IMcpServerParams>;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: typeof McpServerCommand & {
|
|
10
|
+
__abstraction: import("@webiny/di").Abstraction<import("@webiny/cli-core/abstractions/features/CliCommand").ICliCommand<any>>;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
package/cli/McpServer.js
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { readFileSync, readdirSync, existsSync } from "fs";
|
|
2
|
+
import { join, resolve, dirname } from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
import { createRequire } from "module";
|
|
5
|
+
import fm from "front-matter";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
8
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
9
|
+
import { CliCommandFactory } from "@webiny/cli-core/exports/cli/command.js";
|
|
10
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
|
|
12
|
+
// ---------------------------------------------------------------------------
|
|
13
|
+
// Skill discovery
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Recursively find all SKILL.md files under `dir`.
|
|
18
|
+
*/
|
|
19
|
+
function findSkillFiles(dir) {
|
|
20
|
+
if (!existsSync(dir)) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
const results = [];
|
|
24
|
+
for (const entry of readdirSync(dir, {
|
|
25
|
+
withFileTypes: true
|
|
26
|
+
})) {
|
|
27
|
+
const fullPath = join(dir, entry.name);
|
|
28
|
+
if (entry.isDirectory()) {
|
|
29
|
+
results.push(...findSkillFiles(fullPath));
|
|
30
|
+
} else if (entry.isFile() && entry.name === "SKILL.md") {
|
|
31
|
+
results.push(fullPath);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return results;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Discover skills from multiple directories. First match wins (higher-priority dirs first).
|
|
39
|
+
*/
|
|
40
|
+
function discoverSkills(skillsDirs) {
|
|
41
|
+
const skills = new Map();
|
|
42
|
+
for (const dir of skillsDirs) {
|
|
43
|
+
for (const filePath of findSkillFiles(dir)) {
|
|
44
|
+
try {
|
|
45
|
+
const raw = readFileSync(filePath, "utf8");
|
|
46
|
+
const parsed = fm(raw);
|
|
47
|
+
const {
|
|
48
|
+
name,
|
|
49
|
+
description
|
|
50
|
+
} = parsed.attributes;
|
|
51
|
+
if (!name || !description) {
|
|
52
|
+
console.error(`[webiny-mcp] skipping ${filePath}: missing name or description`);
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (!skills.has(name)) {
|
|
56
|
+
const context = parsed.attributes.context || "webiny-extensions";
|
|
57
|
+
skills.set(name, {
|
|
58
|
+
name,
|
|
59
|
+
description,
|
|
60
|
+
context,
|
|
61
|
+
filePath
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
} catch (err) {
|
|
65
|
+
console.error(`[webiny-mcp] error reading ${filePath}:`, err);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return skills;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
73
|
+
// Helpers
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
|
|
76
|
+
function getVersion() {
|
|
77
|
+
try {
|
|
78
|
+
return createRequire(import.meta.url)("../../package.json").version;
|
|
79
|
+
} catch {
|
|
80
|
+
return "0.0.0";
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function buildCatalog(skills) {
|
|
84
|
+
const lines = [`# Webiny Skills (v${getVersion()})`, ""];
|
|
85
|
+
if (skills.size === 0) {
|
|
86
|
+
lines.push("_(No skills found. Add SKILL.md files with front-matter to a skills directory.)_");
|
|
87
|
+
return lines.join("\n");
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Group skills by context.
|
|
91
|
+
const contextDescriptions = {
|
|
92
|
+
"webiny-extensions": "Use these skills when writing Webiny extensions (usually in `extensions/`) or making changes to `webiny.config.tsx` (user project development).",
|
|
93
|
+
"webiny-packages": "Use these skills when writing code in `packages/` (core Webiny framework development)."
|
|
94
|
+
};
|
|
95
|
+
const groups = new Map();
|
|
96
|
+
for (const skill of skills.values()) {
|
|
97
|
+
const list = groups.get(skill.context) || [];
|
|
98
|
+
list.push(skill);
|
|
99
|
+
groups.set(skill.context, list);
|
|
100
|
+
}
|
|
101
|
+
for (const [context, contextSkills] of [...groups.entries()].sort((a, b) => a[0].localeCompare(b[0]))) {
|
|
102
|
+
lines.push(`## ${context}`, "");
|
|
103
|
+
const desc = contextDescriptions[context];
|
|
104
|
+
if (desc) {
|
|
105
|
+
lines.push(desc, "");
|
|
106
|
+
}
|
|
107
|
+
lines.push("| Skill | Description |");
|
|
108
|
+
lines.push("|---|---|");
|
|
109
|
+
for (const skill of contextSkills.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
110
|
+
const skillDesc = skill.description.replace(/\n/g, " ").trim();
|
|
111
|
+
lines.push(`| \`${skill.name}\` | ${skillDesc} |`);
|
|
112
|
+
}
|
|
113
|
+
lines.push("");
|
|
114
|
+
}
|
|
115
|
+
return lines.join("\n");
|
|
116
|
+
}
|
|
117
|
+
function readSkillContent(skill) {
|
|
118
|
+
const raw = readFileSync(skill.filePath, "utf8");
|
|
119
|
+
return fm(raw).body;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// ---------------------------------------------------------------------------
|
|
123
|
+
// CLI Command
|
|
124
|
+
// ---------------------------------------------------------------------------
|
|
125
|
+
|
|
126
|
+
class McpServerCommand {
|
|
127
|
+
execute() {
|
|
128
|
+
return {
|
|
129
|
+
name: "mcp-server",
|
|
130
|
+
description: "Start the Webiny MCP server (stdio transport).",
|
|
131
|
+
examples: ["$0 mcp-server", "$0 mcp-server --skills=./my-skills", "$0 mcp-server --additional-skills=./extra-skills"],
|
|
132
|
+
options: [{
|
|
133
|
+
name: "skills",
|
|
134
|
+
description: "Replace the built-in skills folder entirely. Only skills found in the given path will be served.",
|
|
135
|
+
type: "string"
|
|
136
|
+
}, {
|
|
137
|
+
name: "additional-skills",
|
|
138
|
+
description: "Add a folder on top of the built-in (or --skills) folder. Can be repeated.",
|
|
139
|
+
type: "string",
|
|
140
|
+
array: true
|
|
141
|
+
}],
|
|
142
|
+
handler: async params => {
|
|
143
|
+
const cwd = process.cwd();
|
|
144
|
+
const builtInSkillsDir = join(__dirname, "..", "skills");
|
|
145
|
+
const skillsOverride = params.skills;
|
|
146
|
+
const additionalSkillsDirs = params["additional-skills"] || [];
|
|
147
|
+
const baseDir = skillsOverride ? resolve(cwd, skillsOverride) : builtInSkillsDir;
|
|
148
|
+
|
|
149
|
+
// skillsDirs[0] = highest priority, skillsDirs[last] = lowest priority
|
|
150
|
+
const skillsDirs = [...[...additionalSkillsDirs].map(p => resolve(cwd, p)).reverse(), baseDir];
|
|
151
|
+
if (skillsOverride) {
|
|
152
|
+
console.error(`[webiny-mcp] skills override: ${baseDir}`);
|
|
153
|
+
}
|
|
154
|
+
for (const d of additionalSkillsDirs) {
|
|
155
|
+
console.error(`[webiny-mcp] additional skills: ${resolve(cwd, d)}`);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// In-memory cache: populated on first list, reused by get.
|
|
159
|
+
let skillsCache = null;
|
|
160
|
+
function getSkills() {
|
|
161
|
+
if (!skillsCache) {
|
|
162
|
+
skillsCache = discoverSkills(skillsDirs);
|
|
163
|
+
console.error(`[webiny-mcp] discovered ${skillsCache.size} skill(s)`);
|
|
164
|
+
}
|
|
165
|
+
return skillsCache;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// ---------------------------------------------------------------
|
|
169
|
+
// MCP server
|
|
170
|
+
// ---------------------------------------------------------------
|
|
171
|
+
|
|
172
|
+
const server = new McpServer({
|
|
173
|
+
name: "webiny",
|
|
174
|
+
version: getVersion()
|
|
175
|
+
});
|
|
176
|
+
server.registerTool("list_webiny_skills", {
|
|
177
|
+
title: "List Webiny Skills",
|
|
178
|
+
description: "Returns a catalog of all available Webiny skills with names and descriptions. " + "Always call this first when working on anything Webiny-related, then call " + "get_webiny_skill to load the specific skill you need.",
|
|
179
|
+
inputSchema: {},
|
|
180
|
+
annotations: {
|
|
181
|
+
readOnlyHint: true
|
|
182
|
+
}
|
|
183
|
+
}, async () => ({
|
|
184
|
+
content: [{
|
|
185
|
+
type: "text",
|
|
186
|
+
text: buildCatalog(getSkills())
|
|
187
|
+
}]
|
|
188
|
+
}));
|
|
189
|
+
|
|
190
|
+
// @ts-expect-error Incompatible Zod version
|
|
191
|
+
server.registerTool("get_webiny_skill", {
|
|
192
|
+
title: "Get Webiny Skill",
|
|
193
|
+
description: "Loads the full Webiny documentation for a specific skill. " + "Call list_webiny_skills first to see available skill names.",
|
|
194
|
+
inputSchema: {
|
|
195
|
+
topic: z.string().describe("Skill name — use exact names from list_webiny_skills")
|
|
196
|
+
},
|
|
197
|
+
annotations: {
|
|
198
|
+
readOnlyHint: true
|
|
199
|
+
}
|
|
200
|
+
}, async ({
|
|
201
|
+
topic
|
|
202
|
+
}) => {
|
|
203
|
+
const skills = getSkills();
|
|
204
|
+
const skill = skills.get(topic);
|
|
205
|
+
if (!skill) {
|
|
206
|
+
const available = [...skills.keys()].sort();
|
|
207
|
+
return {
|
|
208
|
+
content: [{
|
|
209
|
+
type: "text",
|
|
210
|
+
text: `Skill not found: "${topic}".\n\n` + `Available skills: ${available.join(", ") || "(none)"}.`
|
|
211
|
+
}],
|
|
212
|
+
isError: true
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
content: [{
|
|
217
|
+
type: "text",
|
|
218
|
+
text: readSkillContent(skill)
|
|
219
|
+
}]
|
|
220
|
+
};
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
// ---------------------------------------------------------------
|
|
224
|
+
// Start
|
|
225
|
+
// ---------------------------------------------------------------
|
|
226
|
+
|
|
227
|
+
const transport = new StdioServerTransport();
|
|
228
|
+
await server.connect(transport);
|
|
229
|
+
console.error("[webiny-mcp] server ready");
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
export default CliCommandFactory.createImplementation({
|
|
235
|
+
implementation: McpServerCommand,
|
|
236
|
+
dependencies: []
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
//# sourceMappingURL=McpServer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["readFileSync","readdirSync","existsSync","join","resolve","dirname","fileURLToPath","createRequire","fm","z","McpServer","StdioServerTransport","CliCommandFactory","__dirname","import","meta","url","findSkillFiles","dir","results","entry","withFileTypes","fullPath","name","isDirectory","push","isFile","discoverSkills","skillsDirs","skills","Map","filePath","raw","parsed","description","attributes","console","error","has","context","set","err","getVersion","version","buildCatalog","lines","size","contextDescriptions","groups","skill","values","list","get","contextSkills","entries","sort","a","b","localeCompare","desc","skillDesc","replace","trim","readSkillContent","body","McpServerCommand","execute","examples","options","type","array","handler","params","cwd","process","builtInSkillsDir","skillsOverride","additionalSkillsDirs","baseDir","map","p","reverse","d","skillsCache","getSkills","server","registerTool","title","inputSchema","annotations","readOnlyHint","content","text","topic","string","describe","available","keys","isError","transport","connect","createImplementation","implementation","dependencies"],"sources":["McpServer.ts"],"sourcesContent":["import { readFileSync, readdirSync, existsSync } from \"fs\";\nimport { join, resolve, dirname } from \"path\";\nimport { fileURLToPath } from \"url\";\nimport { createRequire } from \"module\";\nimport fm from \"front-matter\";\nimport { z } from \"zod\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { CliCommandFactory } from \"@webiny/cli-core/exports/cli/command.js\";\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport interface IMcpServerParams {\n skills: string;\n \"additional-skills\": string[];\n}\n\n// ---------------------------------------------------------------------------\n// Skill discovery\n// ---------------------------------------------------------------------------\n\ninterface SkillAttributes {\n name: string;\n description: string;\n context?: string;\n}\n\ninterface Skill {\n name: string;\n description: string;\n context: string;\n filePath: string;\n}\n\n/**\n * Recursively find all SKILL.md files under `dir`.\n */\nfunction findSkillFiles(dir: string): string[] {\n if (!existsSync(dir)) {\n return [];\n }\n const results: string[] = [];\n for (const entry of readdirSync(dir, { withFileTypes: true })) {\n const fullPath = join(dir, entry.name);\n if (entry.isDirectory()) {\n results.push(...findSkillFiles(fullPath));\n } else if (entry.isFile() && entry.name === \"SKILL.md\") {\n results.push(fullPath);\n }\n }\n return results;\n}\n\n/**\n * Discover skills from multiple directories. First match wins (higher-priority dirs first).\n */\nfunction discoverSkills(skillsDirs: string[]): Map<string, Skill> {\n const skills = new Map<string, Skill>();\n\n for (const dir of skillsDirs) {\n for (const filePath of findSkillFiles(dir)) {\n try {\n const raw = readFileSync(filePath, \"utf8\");\n const parsed = fm<SkillAttributes>(raw);\n const { name, description } = parsed.attributes;\n\n if (!name || !description) {\n console.error(`[webiny-mcp] skipping ${filePath}: missing name or description`);\n continue;\n }\n\n if (!skills.has(name)) {\n const context = parsed.attributes.context || \"webiny-extensions\";\n skills.set(name, { name, description, context, filePath });\n }\n } catch (err) {\n console.error(`[webiny-mcp] error reading ${filePath}:`, err);\n }\n }\n }\n\n return skills;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction getVersion(): string {\n try {\n return createRequire(import.meta.url)(\"../../package.json\").version;\n } catch {\n return \"0.0.0\";\n }\n}\n\nfunction buildCatalog(skills: Map<string, Skill>): string {\n const lines: string[] = [`# Webiny Skills (v${getVersion()})`, \"\"];\n\n if (skills.size === 0) {\n lines.push(\n \"_(No skills found. Add SKILL.md files with front-matter to a skills directory.)_\"\n );\n return lines.join(\"\\n\");\n }\n\n // Group skills by context.\n const contextDescriptions: Record<string, string> = {\n \"webiny-extensions\":\n \"Use these skills when writing Webiny extensions (usually in `extensions/`) or making changes to `webiny.config.tsx` (user project development).\",\n \"webiny-packages\":\n \"Use these skills when writing code in `packages/` (core Webiny framework development).\"\n };\n\n const groups = new Map<string, Skill[]>();\n for (const skill of skills.values()) {\n const list = groups.get(skill.context) || [];\n list.push(skill);\n groups.set(skill.context, list);\n }\n\n for (const [context, contextSkills] of [...groups.entries()].sort((a, b) =>\n a[0].localeCompare(b[0])\n )) {\n lines.push(`## ${context}`, \"\");\n const desc = contextDescriptions[context];\n if (desc) {\n lines.push(desc, \"\");\n }\n lines.push(\"| Skill | Description |\");\n lines.push(\"|---|---|\");\n for (const skill of contextSkills.sort((a, b) => a.name.localeCompare(b.name))) {\n const skillDesc = skill.description.replace(/\\n/g, \" \").trim();\n lines.push(`| \\`${skill.name}\\` | ${skillDesc} |`);\n }\n lines.push(\"\");\n }\n\n return lines.join(\"\\n\");\n}\n\nfunction readSkillContent(skill: Skill): string {\n const raw = readFileSync(skill.filePath, \"utf8\");\n return fm(raw).body;\n}\n\n// ---------------------------------------------------------------------------\n// CLI Command\n// ---------------------------------------------------------------------------\n\nclass McpServerCommand implements CliCommandFactory.Interface<IMcpServerParams> {\n execute(): CliCommandFactory.CommandDefinition<IMcpServerParams> {\n return {\n name: \"mcp-server\",\n description: \"Start the Webiny MCP server (stdio transport).\",\n examples: [\n \"$0 mcp-server\",\n \"$0 mcp-server --skills=./my-skills\",\n \"$0 mcp-server --additional-skills=./extra-skills\"\n ],\n options: [\n {\n name: \"skills\",\n description:\n \"Replace the built-in skills folder entirely. Only skills found in the given path will be served.\",\n type: \"string\"\n },\n {\n name: \"additional-skills\",\n description:\n \"Add a folder on top of the built-in (or --skills) folder. Can be repeated.\",\n type: \"string\",\n array: true\n }\n ],\n handler: async params => {\n const cwd = process.cwd();\n const builtInSkillsDir = join(__dirname, \"..\", \"skills\");\n const skillsOverride = params.skills;\n const additionalSkillsDirs = params[\"additional-skills\"] || [];\n\n const baseDir = skillsOverride ? resolve(cwd, skillsOverride) : builtInSkillsDir;\n\n // skillsDirs[0] = highest priority, skillsDirs[last] = lowest priority\n const skillsDirs = [\n ...[...additionalSkillsDirs].map(p => resolve(cwd, p)).reverse(),\n baseDir\n ];\n\n if (skillsOverride) {\n console.error(`[webiny-mcp] skills override: ${baseDir}`);\n }\n for (const d of additionalSkillsDirs) {\n console.error(`[webiny-mcp] additional skills: ${resolve(cwd, d)}`);\n }\n\n // In-memory cache: populated on first list, reused by get.\n let skillsCache: Map<string, Skill> | null = null;\n\n function getSkills(): Map<string, Skill> {\n if (!skillsCache) {\n skillsCache = discoverSkills(skillsDirs);\n console.error(`[webiny-mcp] discovered ${skillsCache.size} skill(s)`);\n }\n return skillsCache;\n }\n\n // ---------------------------------------------------------------\n // MCP server\n // ---------------------------------------------------------------\n\n const server = new McpServer({ name: \"webiny\", version: getVersion() });\n\n server.registerTool(\n \"list_webiny_skills\",\n {\n title: \"List Webiny Skills\",\n description:\n \"Returns a catalog of all available Webiny skills with names and descriptions. \" +\n \"Always call this first when working on anything Webiny-related, then call \" +\n \"get_webiny_skill to load the specific skill you need.\",\n inputSchema: {},\n annotations: { readOnlyHint: true }\n },\n async () => ({\n content: [{ type: \"text\", text: buildCatalog(getSkills()) }]\n })\n );\n\n // @ts-expect-error Incompatible Zod version\n server.registerTool(\n \"get_webiny_skill\",\n {\n title: \"Get Webiny Skill\",\n description:\n \"Loads the full Webiny documentation for a specific skill. \" +\n \"Call list_webiny_skills first to see available skill names.\",\n inputSchema: {\n topic: z\n .string()\n .describe(\"Skill name — use exact names from list_webiny_skills\")\n },\n annotations: { readOnlyHint: true }\n },\n async ({ topic }) => {\n const skills = getSkills();\n const skill = skills.get(topic);\n if (!skill) {\n const available = [...skills.keys()].sort();\n return {\n content: [\n {\n type: \"text\",\n text:\n `Skill not found: \"${topic}\".\\n\\n` +\n `Available skills: ${available.join(\", \") || \"(none)\"}.`\n }\n ],\n isError: true\n };\n }\n return {\n content: [{ type: \"text\", text: readSkillContent(skill) }]\n };\n }\n );\n\n // ---------------------------------------------------------------\n // Start\n // ---------------------------------------------------------------\n\n const transport = new StdioServerTransport();\n await server.connect(transport);\n console.error(\"[webiny-mcp] server ready\");\n }\n };\n }\n}\n\nexport default CliCommandFactory.createImplementation({\n implementation: McpServerCommand,\n dependencies: []\n});\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,WAAW,EAAEC,UAAU,QAAQ,IAAI;AAC1D,SAASC,IAAI,EAAEC,OAAO,EAAEC,OAAO,QAAQ,MAAM;A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,0 +1 @@
|
|
|
1
|
+
export { McpExtension } from "./Extension.js";
|
package/index.js
ADDED
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["McpExtension"],"sources":["index.ts"],"sourcesContent":["export { McpExtension } from \"./Extension.js\";\n"],"mappings":"AAAA,SAASA,YAAY","ignoreList":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webiny/mcp",
|
|
3
|
+
"version": "0.0.0-unstable.6844005670",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/webiny/webiny-js.git"
|
|
9
|
+
},
|
|
10
|
+
"description": "Webiny Model Context Protocol (MCP) server.",
|
|
11
|
+
"author": "Webiny Ltd",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public",
|
|
15
|
+
"directory": "dist"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@modelcontextprotocol/sdk": "1.27.1",
|
|
19
|
+
"@webiny/cli-core": "0.0.0-unstable.6844005670",
|
|
20
|
+
"front-matter": "4.0.2",
|
|
21
|
+
"react": "18.2.0",
|
|
22
|
+
"zod": "3.25.76"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/lodash": "4.17.24",
|
|
26
|
+
"@types/ncp": "2.0.8",
|
|
27
|
+
"@webiny/build-tools": "0.0.0-unstable.6844005670",
|
|
28
|
+
"typescript": "5.9.3"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"prepublishOnly": "cp -R ../../skills/user-skills ./dist/skills"
|
|
32
|
+
},
|
|
33
|
+
"adio": {
|
|
34
|
+
"ignoreDirs": [
|
|
35
|
+
"_templates"
|
|
36
|
+
],
|
|
37
|
+
"ignore": {
|
|
38
|
+
"src": [
|
|
39
|
+
"listr2",
|
|
40
|
+
"cloudfront"
|
|
41
|
+
],
|
|
42
|
+
"dependencies": [
|
|
43
|
+
"@pulumi/pulumi",
|
|
44
|
+
"@pulumi/aws"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"gitHead": "6844005670e84a575d0c765a6c4f9c5d59166516"
|
|
49
|
+
}
|