@kywi-software/mcp 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,294 @@
1
+ # Kywi Patterns — building sites end users can maintain
2
+
3
+ Guidance for agents building Kywi sites. These are opinions, not rules — a
4
+ developer can overrule any of them — but they encode what Kywi is *for*: sites
5
+ that get handed to non-developers who keep them alive without you. Follow them
6
+ unless the project has a stated reason not to.
7
+
8
+ ## The core principle
9
+
10
+ **If a non-developer might ever want to change it, model it in the CMS — don't
11
+ hardcode it.** Every hardcoded testimonial array, pasted-in logo grid, or
12
+ copy-edited JSX headline is a future support request. The test before writing
13
+ any markup: *"When the site owner wants this different next month, do they
14
+ edit content in the admin, or do they need a developer?"* If the answer is
15
+ "developer," reach for one of the patterns below instead.
16
+
17
+ Static code is for structure and brand chrome. Content — anything with words,
18
+ images, prices, names, dates — belongs in Kywi.
19
+
20
+ ## Before you build: design the content model and get sign-off
21
+
22
+ The most expensive failure in a CMS build is a poorly planned content model —
23
+ types bolted on mid-build, collections discovered after their items were
24
+ entered as free-form pages, taxonomy retrofitted onto a hundred nodes. Content
25
+ entry is the costly part; planning is cheap. So **start every new site (or any
26
+ significant new content area) by proposing the content model and getting the
27
+ owner's sign-off before creating types or entering content.**
28
+
29
+ Produce a short `CONTENT-MODEL.md` at the project root covering:
30
+
31
+ - **Content inventory → types.** Every repeated shape, with its proposed type
32
+ (built-in page vs. custom), fields (name, field type, required), and
33
+ relationships. One table per type.
34
+ - **Site tree sketch.** Top-level pages and a folder per collection (§1).
35
+ - **Feeds.** Name, source type, taxonomy filter, sort/limit, and which pages
36
+ display each one.
37
+ - **Taxonomy.** The category sets and expected tags (§3).
38
+ - **Reusable components.** The sections that will appear on multiple pages (§4).
39
+ - **Maintenance notes.** Who edits what; whether review workflow (§9), i18n
40
+ (§11), or scheduling (§10) apply.
41
+ - **Open questions** for the owner.
42
+
43
+ Present it, iterate, and get explicit approval — then build in playbook order.
44
+ Keep the file updated as the model evolves; it's the site's living map.
45
+
46
+ Proportionality applies (this is guidance, not law): a single-page brochure
47
+ site needs a few sentences of confirmation, not a document. But anything
48
+ involving custom types, collections, or more than a handful of pages deserves
49
+ the full proposal — ten minutes of sign-off beats re-entering fifty nodes.
50
+
51
+ ## Quick decisions
52
+
53
+ | You're about to… | Do this instead |
54
+ |---|---|
55
+ | Hardcode a list (testimonials, logos, posts, products, team) | Folder of nodes + a Feed + the Feed Display module (§1) |
56
+ | Create one-off pages with identical field shapes | A custom content type + one node per item (§2) |
57
+ | Filter/group content by topic, industry, audience | Categories & tags, queried by feeds (§3) |
58
+ | Copy-paste a CTA/banner/snippet across pages | Save it as a reusable component (§4) |
59
+ | Write page sections as JSX | Build them as layout sections/modules the owner can edit (§5) |
60
+ | Hand-code a `<form>` | Build it in the Forms admin, place the Form module (§6) |
61
+ | Drop images into `/public` | Upload to the Media library (§7) |
62
+ | Build segment-specific or experimental UI unprompted | Ask the owner first — offer personalization/A-B with examples (§8) |
63
+ | Let everyone publish straight to the live site | Configure groups + review workflow (§9) |
64
+ | "Launch this next Tuesday" by deploying on Tuesday | Scheduled publishing / a changeset (§10) |
65
+
66
+ ---
67
+
68
+ ## 1. Collections: folders + feeds + Feed Display
69
+
70
+ **The workhorse pattern.** Any repeating set of items that appears somewhere on
71
+ the site — customer logos, testimonials, recent blog posts, products, portfolio
72
+ pieces, team members, FAQs, press mentions — is a collection, and collections
73
+ are never hardcoded.
74
+
75
+ - **Structure:** a folder in the Site Tree per collection (`/testimonials`,
76
+ `/customers`, `/work`), one content node per item. Items that need their own
77
+ public page (blog posts, portfolio pieces) live at real paths; items that are
78
+ only ever displayed in aggregate (logos, quotes) still get nodes — their pages
79
+ just aren't linked.
80
+ - **Query:** create a Feed (admin → Feeds): pick the content type, filter by
81
+ taxonomy, sort, and limit ("6 most recent posts", "testimonials tagged
82
+ `homepage`").
83
+ - **Display:** place the **Feed Display** module wherever the collection should
84
+ render — home page hero strip, interior sidebars, a `/blog` index. One feed
85
+ can feed many pages.
86
+ - **Why it wins:** the owner adds a testimonial by creating one node. Every
87
+ page showing that feed updates. No layout edits, no deploys.
88
+
89
+ Advanced: product catalogs and portfolios are the same pattern with a richer
90
+ custom type (§2) and taxonomy-driven feeds per category (§3). Multiple feeds
91
+ over one collection give different slices (featured vs. all, per-category).
92
+
93
+ ## 2. Structured data: custom content types
94
+
95
+ When several nodes share the same shape — recipes (ingredients, steps, prep
96
+ time), team profiles (role, bio, headshot, links), products (price, SKU,
97
+ gallery), case studies (client, industry, outcome) — define a **custom content
98
+ type** so the shape is enforced and the data is queryable, instead of burying
99
+ it in free-form body text.
100
+
101
+ **Default: create types in the admin (Type Designer), not in kywi.config.ts.**
102
+ Admin-created types are runtime-managed: the site owner can add a field next
103
+ year ("dietary tags on recipes") without a developer or a migration. Reserve
104
+ config-defined types (`contentTypes` in `kywi.config.ts`) for schema the
105
+ *developer* must own — shapes that code depends on, reviewed in git, migrated
106
+ by `kywi migrate`. When in doubt, admin-created.
107
+
108
+ - Fields available include text, textarea, rich text, date, image, URL, email,
109
+ JSON, and relationship (with a target type — e.g. a recipe's `author` →
110
+ profile). Title can be made optional per type.
111
+ - **Combine with §1:** the type gives you structure; a feed over the type gives
112
+ you the listing (`/recipes` index, an intranet's people directory); each
113
+ node's own page is the detail view. Listing + detail with zero custom code.
114
+ - Don't shadow built-in fields (slug, body) with custom ones — Kywi will block
115
+ it; use the built-ins.
116
+
117
+ ## 3. Taxonomy: categories & tags
118
+
119
+ Categories and tags are the cross-cutting organization layer over §1 and §2.
120
+ Use **categories** for a site's stable sections (Recipes: Breakfast / Dinner /
121
+ Dessert) and **tags** for freeform, evolving labels (gluten-free, quick,
122
+ featured).
123
+
124
+ - Feeds filter by taxonomy, so "show featured testimonials on the home page"
125
+ is: tag the nodes `featured`, point the feed at the tag. The owner curates
126
+ the home page by tagging — never by editing the page.
127
+ - Prefer taxonomy-driven feeds over separate folders when items belong to
128
+ multiple groupings (a recipe is both `quick` and `vegetarian`; a folder can
129
+ only hold it once).
130
+
131
+ ## 4. Reusable components: edit once, propagate everywhere
132
+
133
+ Anything designed once and used on multiple pages — CTA bands, promo banners,
134
+ newsletter signup blocks, campaign snippets, "as seen in" strips — should be a
135
+ **reusable component**, not copy-pasted sections.
136
+
137
+ - In the layout editor, select the module and **Save as Component**; insert it
138
+ elsewhere from the component picker. Placed instances are **live
139
+ references**: editing the source component updates every page that uses it.
140
+ - **Detach** an instance when a page genuinely needs a one-off variant — it
141
+ becomes an independent copy from that point on.
142
+ - Rule of thumb: the second time you paste the same section, stop and make it
143
+ a component. The owner should be able to update the sitewide CTA in one
144
+ place, ten minutes before their webinar.
145
+
146
+ ## 5. Page layouts & modules — not hardcoded JSX
147
+
148
+ Pages the owner should be able to restructure — landing pages, the home page,
149
+ campaign pages — should be built **in the layout editor** (sections, columns,
150
+ modules), rendered through Kywi's layout renderer. A scaffolded app already
151
+ renders saved layouts on every content page; keep it that way.
152
+
153
+ - The built-in module palette (hero, cards, CTA, testimonial, feed display,
154
+ pricing, FAQ, forms, comments, media…) covers most marketing-site needs.
155
+ - Brand-specific blocks the palette lacks: build a **custom module** once
156
+ (`defineModule` in `kywi.config.ts` + a React component registered in the
157
+ host's module map — the scaffold's `lib/modules.tsx` shows the shape). The
158
+ developer owns the component; the owner places and configures instances.
159
+ - Create **saved layouts** (Layouts admin) as page templates — "Landing page",
160
+ "Case study" — so new pages start from a consistent skeleton instead of a
161
+ blank canvas.
162
+ - Hand-written JSX pages are fine for genuinely fixed chrome (a bespoke 404,
163
+ legal boilerplate shells) — but if marketing will ever want to swap a
164
+ headline, it's a layout page.
165
+
166
+ ## 6. Forms: always the Forms builder
167
+
168
+ Never hand-code a `<form>`. Build forms in the Forms admin (fields, multi-step,
169
+ success message, notification emails, optional reCAPTCHA via Settings →
170
+ Security) and place them with the **Form / Form Embed** modules, which submit
171
+ through Kywi's pipeline into admin → Submissions.
172
+
173
+ - The owner edits fields, recipients, and the thank-you message without code.
174
+ - Submissions are stored, browsable, and exportable — a hand-rolled form that
175
+ emails someone is data loss with extra steps.
176
+
177
+ ## 7. Media: the library, not /public
178
+
179
+ All owner-managed imagery — logos, hero images, headshots, product shots —
180
+ goes through the Media library (upload, alt text, automatic variants,
181
+ on-demand resize). Reserve `/public` for build-time brand assets (favicon,
182
+ font files) that only change when the code does.
183
+
184
+ The difference matters at handover: the owner can swap a hero image in the
185
+ library; they cannot ship a new `/public` file.
186
+
187
+ ## 8. Personalization & A/B testing — offer it, don't default to it
188
+
189
+ Kywi ships a full personalization stack: **audiences** (rule-based, plus an
190
+ optional self-identification widget), **page variants** targeted per audience,
191
+ and **A/B experiments** with stable per-visitor assignment and recorded
192
+ exposures. Most sites don't need it on day one — and unrequested
193
+ personalization is complexity the owner didn't ask to maintain.
194
+
195
+ **The agent's job is to surface the capability, not to assume it.** When
196
+ scoping a build, ask the owner whether any of these fit, with examples:
197
+
198
+ - *"Should returning visitors see a different home-page hero than first-timers
199
+ (e.g. 'Welcome back — pick up where you left off')?"*
200
+ - *"Do you serve distinct segments (agencies vs. freelancers, industries,
201
+ regions) that should get tailored messaging on key pages?"*
202
+ - *"Would you like visitors to self-identify (e.g. 'I'm a developer / I'm a
203
+ marketer') and see content ordered for them?"*
204
+ - *"Is there a headline, CTA, or pricing presentation you'd like to A/B test
205
+ before committing?"*
206
+
207
+ If yes, principles: personalize **sections and modules**, not whole sites; the
208
+ default variant must stand alone (personalization is progressive enhancement);
209
+ one experiment per conversion goal, and let it conclude before layering more.
210
+ If no, skip it — the machinery is there when they grow into it.
211
+
212
+ ## 9. Editorial workflow: drafts, review, versions
213
+
214
+ For any site with more than one author — or an owner who wants a safety net —
215
+ configure the workflow rather than letting everything publish directly:
216
+
217
+ - **Groups & permissions:** editors write (`draft → Submit for Review`),
218
+ a smaller group approves and publishes. Content-level permissions can gate
219
+ specific sections (e.g. only Legal edits `/legal/*`).
220
+ - Published pages accept **pending revisions** — edits go through review while
221
+ the live page keeps serving — so review doesn't mean taking pages down.
222
+ - Every save records a **version** with restore; approvers see field-level
223
+ diffs. Mention this at handover: "you can always roll back."
224
+
225
+ Solo-owner sites can publish directly — but still enable it before the team
226
+ grows past one.
227
+
228
+ ## 10. Scheduling & changesets
229
+
230
+ - Content has schedule fields: publish at a future time, unpublish/expire
231
+ automatically. The background scheduler handles both — "post this Monday 9am"
232
+ is a field, not a calendar reminder.
233
+ - **Changesets** batch related edits (a product launch touching six pages) and
234
+ publish them together, optionally on a schedule. Use one whenever a launch
235
+ spans multiple nodes — partial launches are worse than late ones.
236
+
237
+ ## 11. Multilingual sites
238
+
239
+ If the owner needs more than one language, declare `locales` in
240
+ `kywi.config.ts` up front — the scaffold routes locale prefixes (`/es/...`),
241
+ falls back to the default locale, and emits hreflang alternates. Translations
242
+ are per-node in the admin. Retrofitting i18n is far costlier than declaring it
243
+ early, so ask at scoping time.
244
+
245
+ ## 12. SEO & the Agent Experience layer
246
+
247
+ - Fill the **SEO tab** on every page that matters (meta title/description,
248
+ og:image); the scaffold maps it into the public head and emits JSON-LD.
249
+ - The AX layer serves `llms.txt`, `llms-full.txt`, `sitemap.xml`, and
250
+ `robots.txt` at the site root out of the box — a Kywi site is legible to
251
+ agents and crawlers by default. Don't remove these routes; they're part of
252
+ the product's value.
253
+
254
+ ## Other capabilities worth knowing
255
+
256
+ - **Comments:** a moderated Comments module (submissions land pending) for
257
+ blogs/community pages — ask the owner if discussion fits.
258
+ - **Webhooks** (Web Services → Webhooks): notify external systems on content
259
+ events (rebuild a static mirror, ping Slack, sync a CRM) — signed, retried.
260
+ - **API keys** with enforced scopes: hand a read-only key to a partner or a
261
+ frontend without exposing write access.
262
+
263
+ ## Build-order playbook (new site)
264
+
265
+ 0. **Propose the content model and get sign-off** ("Before you build", above)
266
+ — nothing else starts until the owner approves it.
267
+ 1. **Model first:** custom content types for every repeated shape (§2).
268
+ 2. **Structure:** site tree — pages, folders per collection (§1).
269
+ 3. **Taxonomy:** categories/tags the feeds will need (§3).
270
+ 4. **Media:** upload the brand's assets to the library (§7).
271
+ 5. **Templates:** saved layouts + reusable components for the recurring
272
+ sections (§4, §5); custom modules only where the palette falls short.
273
+ 6. **Wire collections:** feeds + Feed Display placements (§1).
274
+ 7. **Forms:** contact/newsletter/etc. in the builder (§6).
275
+ 8. **Workflow:** groups, permissions, review path (§9).
276
+ 9. **Ask about** personalization/A-B (§8), comments, webhooks, i18n (§11).
277
+ 10. **SEO pass** (§12), then hand over: show the owner where *their* edits
278
+ live — content nodes, feeds, components — and confirm nothing they'll want
279
+ to change requires you.
280
+
281
+ ## Anti-patterns (smells)
282
+
283
+ - Creating types and entering content before the owner signed off on a
284
+ content model.
285
+ - A hardcoded array of testimonials/logos/posts in a page component.
286
+ - The same CTA JSX pasted on four pages.
287
+ - A `<form>` that POSTs to a hand-rolled route (or nowhere).
288
+ - Marketing imagery in `/public`.
289
+ - A "blog" that is a folder of `.mdx` files the owner can't edit.
290
+ - One-off content types created in config for shapes the owner will evolve.
291
+ - Personalization built speculatively, with no owner request behind it.
292
+ - Direct-publish-only workflow on a multi-author site.
293
+
294
+ Every one of these has a section above. If you catch yourself mid-smell, refactor to the pattern before handover — it's minutes now, migrations later.
package/README.md CHANGED
@@ -64,6 +64,17 @@ directly), `KYWI_API_URL` / `KYWI_MCP_DEV_KEY` (API mode), and
64
64
  `KYWI_MCP_MODE` (`filesystem` | `api` | `auto`, default `auto` — picks
65
65
  filesystem mode when `configPath` is writable, otherwise API mode).
66
66
 
67
+ ## Building patterns for agents
68
+
69
+ Both servers register a `get_building_patterns` tool that returns
70
+ [`AGENT-PATTERNS.md`](./AGENT-PATTERNS.md) — Kywi's official guidance for building
71
+ sites end users can maintain (model content in the CMS instead of hardcoding it;
72
+ use collections/feeds, custom types, the Forms builder, reusable components, and
73
+ the layout editor). An agent should call it before authoring content or
74
+ scaffolding a project. The doc is a verbatim copy of
75
+ `docs/agents/AGENT-PATTERNS.md` in the monorepo, kept in sync by
76
+ `scripts/sync-agent-patterns.mjs`.
77
+
67
78
  ## What's in the package
68
79
 
69
80
  - `.` — shared config types (`defineMcpConfig`, `McpConfig`).
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/developer/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAQtD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CA6B9E"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/developer/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAStD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CA+B9E"}
@@ -1,6 +1,7 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { createKywiSdk, KywiHttpClient } from '@kywi-software/sdk';
3
3
  import { detectMode } from './auto-detect.js';
4
+ import { registerPatternsTool } from '../patterns.js';
4
5
  import { registerReadOnlyTools } from './tools/read-only.js';
5
6
  import { registerConfigMutationTools } from './tools/config-mutation.js';
6
7
  import { registerScaffoldingTools } from './tools/scaffolding.js';
@@ -10,6 +11,8 @@ export function createDeveloperMcpServer(config) {
10
11
  const server = new McpServer({ name: '@kywi-software/mcp/developer', version: '0.1.0' }, { capabilities: { tools: {} } });
11
12
  const mode = detectMode(config);
12
13
  const http = config.baseUrl ? new KywiHttpClient({ baseUrl: config.baseUrl, apiKey: config.apiKey }) : undefined;
14
+ // Kywi's building-patterns guide — available in every mode.
15
+ registerPatternsTool(server);
13
16
  registerReadOnlyTools(server, { mode, configPath: config.configPath, http });
14
17
  if (mode === 'filesystem' && config.configPath) {
15
18
  registerConfigMutationTools(server, { configPath: config.configPath });
@@ -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A;AACf,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ /** The building-patterns markdown, read once and cached. */
3
+ export declare function readBuildingPatterns(): string;
4
+ /** Tool handler: returns the raw building-patterns markdown as text. */
5
+ export declare function handleGetBuildingPatterns(): {
6
+ content: [{
7
+ type: 'text';
8
+ text: string;
9
+ }];
10
+ };
11
+ /** Register the `get_building_patterns` tool on an MCP server. */
12
+ export declare function registerPatternsTool(server: McpServer): void;
13
+ //# sourceMappingURL=patterns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../src/patterns.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AA0BxE,4DAA4D;AAC5D,wBAAgB,oBAAoB,IAAI,MAAM,CAK7C;AAED,wEAAwE;AACxE,wBAAgB,yBAAyB,IAAI;IAC3C,OAAO,EAAE,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAC1C,CAEA;AAUD,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAM5D"}
@@ -0,0 +1,46 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { dirname, join } from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ /**
5
+ * Exposes Kywi's building-patterns guide to agents over MCP.
6
+ *
7
+ * The MCP servers are tools-only (no MCP `resources`), so the guide is surfaced
8
+ * as a `get_building_patterns` tool that returns the markdown. Both the site and
9
+ * developer servers register it, so an agent authoring content or scaffolding a
10
+ * project encounters the same guidance.
11
+ *
12
+ * Asset resolution (dist-safe): the doc ships as `AGENT-PATTERNS.md` at the
13
+ * package root (in the package.json `files` array) and is read relative to THIS
14
+ * module's URL — NOT process.cwd(). `tsc` compiles src/patterns.ts → dist/patterns.js
15
+ * at the same depth, so `../AGENT-PATTERNS.md` resolves to the package root
16
+ * identically from src (tests), dist (published), and an installed
17
+ * node_modules/@kywi-software/mcp/. No copy-assets step is required because the
18
+ * doc lives at the package root rather than under src/ (unlike core's CSS, which
19
+ * sits beside the .ts that imports it and so needs copying into dist). The file
20
+ * is byte-identical to the repo canonical docs/agents/AGENT-PATTERNS.md, kept in
21
+ * sync by scripts/sync-agent-patterns.mjs (a drift test guards it).
22
+ */
23
+ const PATTERNS_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', 'AGENT-PATTERNS.md');
24
+ let cached;
25
+ /** The building-patterns markdown, read once and cached. */
26
+ export function readBuildingPatterns() {
27
+ if (cached === undefined) {
28
+ cached = readFileSync(PATTERNS_PATH, 'utf8');
29
+ }
30
+ return cached;
31
+ }
32
+ /** Tool handler: returns the raw building-patterns markdown as text. */
33
+ export function handleGetBuildingPatterns() {
34
+ return { content: [{ type: 'text', text: readBuildingPatterns() }] };
35
+ }
36
+ const DESCRIPTION = "Kywi's official guidance for building sites end users can maintain: the patterns " +
37
+ 'to follow when modeling content, collections, custom types, taxonomy, reusable ' +
38
+ 'components, page layouts, forms, media, personalization, and editorial workflow. ' +
39
+ 'Read this before authoring content or scaffolding a Kywi site — the core ' +
40
+ 'principle is to model anything a non-developer might change in the CMS rather ' +
41
+ 'than hardcoding it. Returns the full guide as markdown.';
42
+ /** Register the `get_building_patterns` tool on an MCP server. */
43
+ export function registerPatternsTool(server) {
44
+ server.registerTool('get_building_patterns', { description: DESCRIPTION, inputSchema: {} }, async () => handleGetBuildingPatterns());
45
+ }
46
+ //# sourceMappingURL=patterns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.js","sourceRoot":"","sources":["../src/patterns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,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E,YAAY,EACjB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CA8CjB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CAwBpE"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/site/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAUjD;;;GAGG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,SAAS,EACjB,GAAG,EAAE,YAAY,EACjB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CA8CjB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,SAAS,CA0BpE"}
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
3
  import { createKywiSdk, KywiHttpClient } from '@kywi-software/sdk';
4
4
  import { textResult } from '../shared.js';
5
+ import { registerPatternsTool } from '../patterns.js';
5
6
  import { registerContentTools } from './tools/content.js';
6
7
  import { registerLayoutTools } from './tools/layout.js';
7
8
  import { registerFeedTools } from './tools/feeds.js';
@@ -58,6 +59,8 @@ export function createSiteMcpServer(config) {
58
59
  baseUrl: config.baseUrl,
59
60
  apiKey: config.apiKey,
60
61
  });
62
+ // Kywi's building-patterns guide, so an authoring agent can consult it.
63
+ registerPatternsTool(server);
61
64
  registerContentTools(server, sdk, config.baseUrl, config.apiKey);
62
65
  registerLayoutTools(server, sdk);
63
66
  registerFeedTools(server, sdk);
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/site/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAA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E;IACxE,oBAAoB,CAAC,MAAM,CAAC,CAAA;IAC5B,oBAAoB,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAChE,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC9B,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC/B,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAE9B,uFAAuF;IACvF,mCAAmC;IACnC,+CAA+C;IAC/C,iEAAiE;IAEjE,OAAO,MAAM,CAAA;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kywi-software/mcp",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Model Context Protocol servers for Kywi CMS — a site server (content/nav/media over the REST API) and a developer server (kywi.config.ts scaffolding and mutation).",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -22,6 +22,7 @@
22
22
  },
23
23
  "files": [
24
24
  "dist",
25
+ "AGENT-PATTERNS.md",
25
26
  "README.md",
26
27
  "LICENSE"
27
28
  ],
@@ -46,7 +47,7 @@
46
47
  "dependencies": {
47
48
  "@modelcontextprotocol/sdk": "^1.12.0",
48
49
  "zod": "^3.25.0",
49
- "@kywi-software/sdk": "0.3.1"
50
+ "@kywi-software/sdk": "0.4.0"
50
51
  },
51
52
  "devDependencies": {
52
53
  "@types/node": "^20.0.0",