@webspire/mcp 0.8.1 → 0.10.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,8 +1,17 @@
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.
3
+ MCP server for [Webspire](https://webspire.de) — AI-native discovery of CSS snippets, UI patterns, canvas effects, page templates, and font recommendations. All Tailwind v4, token-based, dark mode, accessible.
4
4
 
5
- Includes CSS snippets, UI patterns, and page templates — all Tailwind v4, token-based, dark mode, accessible.
5
+ ## Stability Model
6
+
7
+ Webspire is intentionally iterative.
8
+
9
+ - Not every pattern or snippet is optimal yet.
10
+ - Registry contents, taxonomy, scoring, and composition output may change over time.
11
+ - The only guaranteed answer is the snapshot you receive when you make the request.
12
+ - This is by design: the registry is supposed to keep improving instead of acting like a fixed framework API.
13
+
14
+ 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.
6
15
 
7
16
  ## Quick Start
8
17
 
@@ -21,25 +30,75 @@ Includes CSS snippets, UI patterns, and page templates — all Tailwind v4, toke
21
30
 
22
31
  ## Available Tools
23
32
 
33
+ ### Snippets (CSS Effects)
34
+
24
35
  | Tool | Description |
25
36
  |------|-------------|
26
37
  | `list_categories` | List all snippet categories with counts |
27
38
  | `search_snippets` | Search snippets by keyword, use case, or CSS technique |
28
39
  | `get_snippet` | Get full CSS source, metadata, and usage example |
29
40
  | `recommend_snippet` | Describe a UI problem, get best matching snippets |
41
+
42
+ ### Patterns (UI Components)
43
+
44
+ | Tool | Description |
45
+ |------|-------------|
30
46
  | `list_pattern_families` | List pattern families with counts |
31
- | `search_patterns` | Search UI patterns by intent, family, or tier |
32
- | `compose_page` | Compose a full page structure and recommend matching snippets |
47
+ | `search_patterns` | Search UI patterns by intent, domain, tone, or ux goal |
33
48
  | `get_pattern` | Get full pattern HTML with component token references |
49
+ | `compose_page` | Compose a full page: patterns + snippets + font recommendations |
50
+
51
+ ### Templates (Full Pages)
52
+
53
+ | Tool | Description |
54
+ |------|-------------|
34
55
  | `list_templates` | List all page templates by category |
35
56
  | `search_templates` | Search templates by keyword, category, or style |
36
57
  | `get_template` | Get full standalone HTML for a page template |
37
- | `setup_tokens` | Get token CSS files to write into your project (no CDN needed) |
58
+
59
+ ### Canvas Effects (Dynamic Visuals)
60
+
61
+ | Tool | Description |
62
+ |------|-------------|
63
+ | `search_canvas_effects` | Search canvas effects by keyword, category, or interactivity |
64
+ | `get_canvas_effect` | Get full JS source, mountCanvas runtime, and embed HTML |
65
+
66
+ ### Fonts (Semantic Recommendations)
67
+
68
+ | Tool | Description |
69
+ |------|-------------|
70
+ | `recommend_fonts` | Get heading/body/mono font stack for a domain + tone combination |
71
+
72
+ ### Tokens (Design System)
73
+
74
+ | Tool | Description |
75
+ |------|-------------|
76
+ | `setup_tokens` | Get token CSS files to write into your project |
38
77
  | `recommend_token_mapping` | Analyze your project tokens and suggest --ws-* mapping |
39
78
 
40
- ## 3-Layer Token Architecture
79
+ ## Content
80
+
81
+ ### CSS Snippets (146)
82
+
83
+ Effects that Tailwind v4 can't do natively across 12 categories: glass, animations, easing, scroll, decorative, interactions, text, lighting, depth, masks, surfaces, atmosphere.
84
+
85
+ ### UI Patterns (~497)
86
+
87
+ Page sections and content elements across 170+ families — hero, navbar, pricing, features, dashboard, e-commerce, AI, and more. All using `--ws-*` component tokens.
41
88
 
42
- Patterns use semantic CSS custom properties via a 3-layer system:
89
+ ### Canvas Effects (3)
90
+
91
+ Dynamic JavaScript visuals using the `mountCanvas` runtime: particle fields, proximity dots, gradient orbs. Copy-paste ready with HiDPI support, ResizeObserver, and prefers-reduced-motion.
92
+
93
+ ### Page Templates (42)
94
+
95
+ Complete standalone pages: SaaS, agency, portfolio, shop, company — with Tailwind CDN.
96
+
97
+ ### Font Recommendations (25 fonts, 15 pairings)
98
+
99
+ Semantic font stack recommendations based on domain (legal, saas, agency...) and tone (serious, modern, friendly...). All fonts available as npm packages via @fontsource.
100
+
101
+ ## 3-Layer Token Architecture
43
102
 
44
103
  ```
45
104
  Host Tokens (your project) → WebSpire Alias Tokens → Component Tokens → Markup
@@ -50,32 +109,23 @@ Host Tokens (your project) → WebSpire Alias Tokens → Component Tokens → Ma
50
109
  ```
51
110
  > setup_tokens()
52
111
  // Returns webspire-tokens.css + webspire-components.css
53
- // AI agent writes them into your project
54
112
 
55
113
  > setup_tokens({ components: ["hero", "cta", "pricing"] })
56
114
  // Only includes tokens for the families you use
57
115
  ```
58
116
 
59
- ### Pattern Markup
60
-
61
- ```html
62
- <section class="ws-cta bg-[var(--ws-cta-bg)] py-20">
63
- <h2 class="text-[var(--ws-cta-text)] text-3xl font-bold">Title</h2>
64
- <a class="bg-[var(--ws-cta-action-bg)] text-[var(--ws-cta-action-text)]
65
- hover:bg-[var(--ws-cta-action-bg-hover)] rounded-lg px-5 py-3">
66
- Get started
67
- </a>
68
- </section>
69
- ```
117
+ ## Page Composition
70
118
 
71
- ### Customize
119
+ `compose_page` combines semantic pattern selection with snippet recommendations and font pairing.
72
120
 
73
- ```css
74
- :root {
75
- --ws-color-primary: #your-brand-color;
76
- --ws-color-primary-hover: #your-brand-darker;
77
- }
78
121
  ```
122
+ > compose_page({ domain: "legal", tone: "serious", ux_goals: ["build_trust", "drive_contact"] })
123
+ ```
124
+
125
+ Returns:
126
+ 1. Ordered page sections (navbar → hero → features → testimonials → contact → footer)
127
+ 2. Recommended CSS snippets for visual polish
128
+ 3. Font stack recommendation (heading + body + mono with npm install command)
79
129
 
80
130
  ## Available Resources
81
131
 
@@ -89,20 +139,6 @@ Host Tokens (your project) → WebSpire Alias Tokens → Component Tokens → Ma
89
139
  | `webspire://templates` | All templates with brief metadata |
90
140
  | `webspire://template/{id}` | Full template data including HTML |
91
141
 
92
- ## Content
93
-
94
- ### CSS Snippets
95
-
96
- Effects that Tailwind v4 can't do natively across 12 categories: glass, animations, easing, scroll, decorative, interactions, text, lighting, depth, masks, surfaces, atmosphere.
97
-
98
- ### UI Patterns
99
-
100
- Patterns across page sections and content elements — all using `--ws-*` component tokens.
101
-
102
- ### Page Templates
103
-
104
- Complete standalone pages: SaaS, agency, portfolio, shop, company — with Tailwind CDN.
105
-
106
142
  ## Programmatic Usage
107
143
 
108
144
  ```typescript
@@ -115,16 +151,4 @@ const results = searchSnippets(registry, {
115
151
  });
116
152
  ```
117
153
 
118
- Docs: https://webspire.de/tokens
119
-
120
- ## Page Composition
121
-
122
- `compose_page` combines semantic pattern selection with a lightweight snippet recommendation layer.
123
-
124
- Typical flow:
125
-
126
- 1. Call `compose_page` with `domain`, `tone`, and `ux_goals`
127
- 2. Retrieve section markup with `get_pattern(id)`
128
- 3. Retrieve enhancement CSS with `get_snippet(id)` for the recommended snippets
129
-
130
- That keeps structure and polish separate, but coordinated.
154
+ 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
+ }