@webspire/mcp 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,19 +1,6 @@
1
1
  # @webspire/mcp
2
2
 
3
- MCP server for [Webspire](https://webspire.de) — AI-native discovery of CSS snippets, UI patterns, and page templates with a 3-layer design token system.
4
-
5
- Includes CSS snippets, UI patterns, and page templates — all Tailwind v4, token-based, dark mode, accessible.
6
-
7
- ## Stability Model
8
-
9
- Webspire is intentionally iterative.
10
-
11
- - Not every pattern or snippet is optimal yet.
12
- - Registry contents, taxonomy, scoring, and composition output may change over time.
13
- - The only guaranteed answer is the snapshot you receive when you make the request.
14
- - This is by design: the registry is supposed to keep improving instead of acting like a fixed framework API.
15
-
16
- The important invariant is different: MCP should provide context, discovery, and composition help, while the resulting code remains something you can own directly in your project. The goal is not to introduce a runtime dependency.
3
+ MCP server for [Webspire](https://webspire.de) — AI-native discovery of CSS snippets, UI patterns, canvas effects, page templates, motion recipes, and font recommendations. All Tailwind v4, token-based, dark mode, accessible.
17
4
 
18
5
  ## Quick Start
19
6
 
@@ -32,25 +19,98 @@ The important invariant is different: MCP should provide context, discovery, and
32
19
 
33
20
  ## Available Tools
34
21
 
22
+ ### Snippets (CSS Effects)
23
+
35
24
  | Tool | Description |
36
25
  |------|-------------|
37
26
  | `list_categories` | List all snippet categories with counts |
38
27
  | `search_snippets` | Search snippets by keyword, use case, or CSS technique |
39
28
  | `get_snippet` | Get full CSS source, metadata, and usage example |
40
29
  | `recommend_snippet` | Describe a UI problem, get best matching snippets |
30
+
31
+ ### Patterns (UI Components)
32
+
33
+ | Tool | Description |
34
+ |------|-------------|
41
35
  | `list_pattern_families` | List pattern families with counts |
42
- | `search_patterns` | Search UI patterns by intent, family, or tier |
43
- | `compose_page` | Compose a full page structure and recommend matching snippets |
36
+ | `search_patterns` | Search UI patterns by intent, domain, tone, or ux goal |
44
37
  | `get_pattern` | Get full pattern HTML with component token references |
38
+ | `compose_page` | Compose a full page: patterns + snippets + font recommendations |
39
+
40
+ ### Templates (Full Pages)
41
+
42
+ | Tool | Description |
43
+ |------|-------------|
45
44
  | `list_templates` | List all page templates by category |
46
45
  | `search_templates` | Search templates by keyword, category, or style |
47
46
  | `get_template` | Get full standalone HTML for a page template |
48
- | `setup_tokens` | Get token CSS files to write into your project (no CDN needed) |
47
+
48
+ ### Canvas Effects (Dynamic Visuals)
49
+
50
+ | Tool | Description |
51
+ |------|-------------|
52
+ | `search_canvas_effects` | Search canvas effects by keyword, category, or interactivity |
53
+ | `get_canvas_effect` | Get full JS source, mountCanvas runtime, and embed HTML |
54
+
55
+ ### Motion Recipes (Animation Patterns)
56
+
57
+ | Tool | Description |
58
+ |------|-------------|
59
+ | `list_motion_recipes` | List all motion recipes grouped by family |
60
+ | `search_motion_recipes` | Search recipes by keyword, family, technology, or trigger |
61
+ | `get_motion_recipe` | Get full self-contained HTML for a motion recipe |
62
+
63
+ ### Fonts (Semantic Recommendations)
64
+
65
+ | Tool | Description |
66
+ |------|-------------|
67
+ | `recommend_fonts` | Get heading/body/mono font stack for a domain + tone combination |
68
+
69
+ ### Tokens (Design System)
70
+
71
+ | Tool | Description |
72
+ |------|-------------|
73
+ | `setup_tokens` | Get token CSS files to write into your project |
49
74
  | `recommend_token_mapping` | Analyze your project tokens and suggest --ws-* mapping |
50
75
 
51
- ## 3-Layer Token Architecture
76
+ ## Content
77
+
78
+ ### CSS Snippets (144)
79
+
80
+ Effects that Tailwind v4 can't do natively across 12 categories: glass, animations, easing, scroll, decorative, interactions, text, lighting, depth, masks, surfaces, atmosphere.
52
81
 
53
- Patterns use semantic CSS custom properties via a 3-layer system:
82
+ ### UI Patterns (519+)
83
+
84
+ Page sections and content elements across 170+ families — hero, navbar, pricing, features, dashboard, e-commerce, AI, developer tools, and more. All using `--ws-*` component tokens.
85
+
86
+ ### Canvas Effects (3)
87
+
88
+ Dynamic JavaScript visuals using the `mountCanvas` runtime: particle fields, proximity dots, gradient orbs. Copy-paste ready with HiDPI support, ResizeObserver, and prefers-reduced-motion.
89
+
90
+ ### Page Templates (42)
91
+
92
+ Complete standalone pages: SaaS, agency, portfolio, shop, company — with Tailwind CDN.
93
+
94
+ ### Motion Recipes (3)
95
+
96
+ Framework-agnostic animation patterns using GSAP and Motion One. Self-contained HTML files with live scroll demos. Families: reveal, scroll, transition, micro, layout.
97
+
98
+ ### Font Recommendations (25 fonts, 15 pairings)
99
+
100
+ Semantic font stack recommendations based on domain (legal, saas, agency...) and tone (serious, modern, friendly...). All fonts available as npm packages via @fontsource.
101
+
102
+ ## Offline Support
103
+
104
+ The MCP works without a permanent internet connection. Registry data is loaded using a layered fallback:
105
+
106
+ 1. **In-memory cache** (5-min TTL) — no re-fetch within the same session
107
+ 2. **Remote fetch** from webspire.de — always current, writes to disk when newer
108
+ 3. **Disk cache** (`~/.cache/webspire/`) — last successfully fetched version, survives restarts
109
+ 4. **Installed copy** — frozen at publish time, last resort
110
+
111
+ In practice: go online once, the disk cache is written. All subsequent offline starts use that cached version, not the potentially older installed copy.
112
+
113
+ ## 3-Layer Token Architecture
54
114
 
55
115
  ```
56
116
  Host Tokens (your project) → WebSpire Alias Tokens → Component Tokens → Markup
@@ -61,32 +121,23 @@ Host Tokens (your project) → WebSpire Alias Tokens → Component Tokens → Ma
61
121
  ```
62
122
  > setup_tokens()
63
123
  // Returns webspire-tokens.css + webspire-components.css
64
- // AI agent writes them into your project
65
124
 
66
125
  > setup_tokens({ components: ["hero", "cta", "pricing"] })
67
126
  // Only includes tokens for the families you use
68
127
  ```
69
128
 
70
- ### Pattern Markup
71
-
72
- ```html
73
- <section class="ws-cta bg-[var(--ws-cta-bg)] py-20">
74
- <h2 class="text-[var(--ws-cta-text)] text-3xl font-bold">Title</h2>
75
- <a class="bg-[var(--ws-cta-action-bg)] text-[var(--ws-cta-action-text)]
76
- hover:bg-[var(--ws-cta-action-bg-hover)] rounded-lg px-5 py-3">
77
- Get started
78
- </a>
79
- </section>
80
- ```
129
+ ## Page Composition
81
130
 
82
- ### Customize
131
+ `compose_page` combines semantic pattern selection with snippet recommendations and font pairing.
83
132
 
84
- ```css
85
- :root {
86
- --ws-color-primary: #your-brand-color;
87
- --ws-color-primary-hover: #your-brand-darker;
88
- }
89
133
  ```
134
+ > compose_page({ domain: "legal", tone: "serious", ux_goals: ["build_trust", "drive_contact"] })
135
+ ```
136
+
137
+ Returns:
138
+ 1. Ordered page sections (navbar → hero → features → testimonials → contact → footer)
139
+ 2. Recommended CSS snippets for visual polish
140
+ 3. Font stack recommendation (heading + body + mono with npm install command)
90
141
 
91
142
  ## Available Resources
92
143
 
@@ -100,20 +151,6 @@ Host Tokens (your project) → WebSpire Alias Tokens → Component Tokens → Ma
100
151
  | `webspire://templates` | All templates with brief metadata |
101
152
  | `webspire://template/{id}` | Full template data including HTML |
102
153
 
103
- ## Content
104
-
105
- ### CSS Snippets
106
-
107
- Effects that Tailwind v4 can't do natively across 12 categories: glass, animations, easing, scroll, decorative, interactions, text, lighting, depth, masks, surfaces, atmosphere.
108
-
109
- ### UI Patterns
110
-
111
- Patterns across page sections and content elements — all using `--ws-*` component tokens.
112
-
113
- ### Page Templates
114
-
115
- Complete standalone pages: SaaS, agency, portfolio, shop, company — with Tailwind CDN.
116
-
117
154
  ## Programmatic Usage
118
155
 
119
156
  ```typescript
@@ -126,16 +163,14 @@ const results = searchSnippets(registry, {
126
163
  });
127
164
  ```
128
165
 
129
- Docs: https://webspire.de/tokens
130
-
131
- ## Page Composition
166
+ ## Stability Model
132
167
 
133
- `compose_page` combines semantic pattern selection with a lightweight snippet recommendation layer.
168
+ Webspire is intentionally iterative.
134
169
 
135
- Typical flow:
170
+ - Registry contents, taxonomy, scoring, and composition output may change over time.
171
+ - The only guaranteed answer is the snapshot you receive when you make the request.
172
+ - This is by design: the registry keeps improving instead of acting like a fixed framework API.
136
173
 
137
- 1. Call `compose_page` with `domain`, `tone`, and `ux_goals`
138
- 2. Retrieve section markup with `get_pattern(id)`
139
- 3. Retrieve enhancement CSS with `get_snippet(id)` for the recommended snippets
174
+ The important invariant: MCP provides context, discovery, and composition help, while the resulting code remains something you own directly in your project. No runtime dependency is introduced.
140
175
 
141
- That keeps structure and polish separate, but coordinated.
176
+ Docs: https://webspire.de
@@ -280,6 +280,8 @@
280
280
  --ws-steps-accent: var(--ws-color-primary);
281
281
  --ws-steps-accent-text: var(--ws-color-primary-text);
282
282
  --ws-steps-line: var(--ws-color-border);
283
+ --ws-steps-border: var(--ws-color-border);
284
+ --ws-steps-number: var(--ws-color-border);
283
285
  }
284
286
 
285
287
  .ws-divider {
@@ -358,8 +360,10 @@
358
360
  .ws-code-preview {
359
361
  --ws-code-preview-bg: #0f172a;
360
362
  --ws-code-preview-text: #e2e8f0;
363
+ --ws-code-preview-text-muted: #64748b;
361
364
  --ws-code-preview-header-bg: #1e293b;
362
365
  --ws-code-preview-border: #334155;
366
+ --ws-code-preview-tab-active-bg: #1e293b;
363
367
  }
364
368
 
365
369
  .ws-cookie-consent {
@@ -655,3 +659,47 @@
655
659
  --ws-chat-widget-accent-text: var(--ws-color-primary-text);
656
660
  --ws-chat-widget-muted-bg: var(--ws-color-surface-muted);
657
661
  }
662
+
663
+ .ws-case-study {
664
+ --ws-case-study-bg: var(--ws-color-surface);
665
+ --ws-case-study-card-bg: var(--ws-color-surface-alt);
666
+ --ws-case-study-text: var(--ws-color-text);
667
+ --ws-case-study-text-soft: var(--ws-color-text-soft);
668
+ --ws-case-study-text-muted: var(--ws-color-text-muted);
669
+ --ws-case-study-border: var(--ws-color-border);
670
+ --ws-case-study-accent: var(--ws-color-primary);
671
+ }
672
+
673
+ .ws-platform {
674
+ --ws-platform-bg: var(--ws-color-surface);
675
+ --ws-platform-text: var(--ws-color-text);
676
+ --ws-platform-text-soft: var(--ws-color-text-soft);
677
+ --ws-platform-text-muted: var(--ws-color-text-muted);
678
+ --ws-platform-border: var(--ws-color-border);
679
+ --ws-platform-accent: var(--ws-color-primary);
680
+ --ws-platform-diagram-bg: var(--ws-color-surface-alt);
681
+ --ws-platform-layer-bg: var(--ws-color-surface);
682
+ --ws-platform-chip-bg: var(--ws-color-surface-alt);
683
+ --ws-platform-grid-line: var(--ws-color-border);
684
+ }
685
+
686
+ .ws-changelog {
687
+ --ws-changelog-bg: var(--ws-color-surface);
688
+ --ws-changelog-text: var(--ws-color-text);
689
+ --ws-changelog-text-soft: var(--ws-color-text-soft);
690
+ --ws-changelog-text-muted: var(--ws-color-text-muted);
691
+ --ws-changelog-border: var(--ws-color-border);
692
+ --ws-changelog-accent: var(--ws-color-primary);
693
+ --ws-changelog-code-bg: var(--ws-color-surface-muted);
694
+ }
695
+
696
+ .ws-mega-menu {
697
+ --ws-mega-menu-bg: var(--ws-color-surface);
698
+ --ws-mega-menu-text: var(--ws-color-text);
699
+ --ws-mega-menu-text-soft: var(--ws-color-text-soft);
700
+ --ws-mega-menu-text-muted: var(--ws-color-text-muted);
701
+ --ws-mega-menu-border: var(--ws-color-border);
702
+ --ws-mega-menu-accent: var(--ws-color-primary);
703
+ --ws-mega-menu-hover-bg: var(--ws-color-surface-alt);
704
+ --ws-mega-menu-icon-bg: var(--ws-color-primary-soft);
705
+ }