@unthinkmedia/coherence-prototyper-mcp 1.0.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 +138 -0
- package/dist/icon-browser.html +3749 -0
- package/dist/intent-app.html +3828 -0
- package/dist/main.js +12 -0
- package/dist/main.js.map +1 -0
- package/dist/server.js +1078 -0
- package/dist/server.js.map +1 -0
- package/dist/src/content.js +196 -0
- package/dist/src/content.js.map +1 -0
- package/dist/src/icon-browser.js +530 -0
- package/dist/src/icon-browser.js.map +1 -0
- package/dist/src/icon-data.js +288 -0
- package/dist/src/icon-data.js.map +1 -0
- package/dist/src/intent-store.js +166 -0
- package/dist/src/intent-store.js.map +1 -0
- package/dist/src/manifest-cache.js +95 -0
- package/dist/src/manifest-cache.js.map +1 -0
- package/dist/src/svg-cache.js +93 -0
- package/dist/src/svg-cache.js.map +1 -0
- package/dist/src/theme-cache.js +107 -0
- package/dist/src/theme-cache.js.map +1 -0
- package/dist/src/verification-report.js +473 -0
- package/dist/src/verification-report.js.map +1 -0
- package/dist/src/verification-scorecard-store.js +79 -0
- package/dist/src/verification-scorecard-store.js.map +1 -0
- package/dist/token-browser.html +3594 -0
- package/dist/verification-report.html +3780 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Coherence Prototyper MCP Server
|
|
2
|
+
|
|
3
|
+
An MCP server (with MCP App) that gives Claude the same Azure portal prototyping knowledge as the VS Code skills — accessible from **Claude Desktop**, **Claude.ai**, or any MCP-compatible host.
|
|
4
|
+
|
|
5
|
+
## How It Complements the VS Code Skills
|
|
6
|
+
|
|
7
|
+
| Capability | VS Code Skills | This MCP Server |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| **Where it runs** | Inside VS Code Copilot | Claude Desktop, Claude.ai, any MCP host |
|
|
10
|
+
| **Component API lookup** | Reads manifest docs on demand | `lookup_component` tool — fetches + parses live CDN manifest |
|
|
11
|
+
| **Design tokens** | Reads theme CSS docs | `get_design_tokens` + `browse_design_tokens` MCP App with visual swatches |
|
|
12
|
+
| **Scaffolds** | Copies template files | `get_scaffold` tool — returns all scaffold files ready to paste |
|
|
13
|
+
| **Design guidance** | Reads reference markdown | `get_component_guidance`, `get_ux_guide`, etc. |
|
|
14
|
+
| **Icon lookup** | Reads icon reference | `lookup_azure_icon` — search by name or purpose |
|
|
15
|
+
| **Composition patterns** | Reads pattern docs | `get_composition_pattern` tool |
|
|
16
|
+
| **Mock data** | Reads sample data refs | `get_mock_data_patterns` tool |
|
|
17
|
+
|
|
18
|
+
## Tools (15 total)
|
|
19
|
+
|
|
20
|
+
### Knowledge Tools (text-based)
|
|
21
|
+
|
|
22
|
+
| Tool | Description |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `lookup_component` | Look up a component's full API (attributes, events, slots, CSS properties) from the live CDN manifest |
|
|
25
|
+
| `search_components` | Search components by keyword across names, descriptions, and attributes |
|
|
26
|
+
| `list_components` | List all ~70 Coherence UI components |
|
|
27
|
+
| `get_component_guidance` | Get design guidance: when to use, dos/don'ts, accessibility, anatomy, code examples |
|
|
28
|
+
| `get_design_tokens` | Search/filter design tokens by category or keyword |
|
|
29
|
+
| `get_scaffold` | Get complete starter scaffold files for a page type |
|
|
30
|
+
| `get_ux_guide` | Get cross-cutting UX guidance (accessibility, AI, writing, data viz) |
|
|
31
|
+
| `lookup_azure_icon` | Search Azure portal icons (Fluent 2 via Iconify) |
|
|
32
|
+
| `get_page_type_guidance` | Get anatomy + rules for Azure portal page types |
|
|
33
|
+
| `get_composition_pattern` | Get reusable multi-component patterns (header, shell, toolbar, side nav) |
|
|
34
|
+
| `get_template` | Get page layout template guidance (dashboard, form, settings) |
|
|
35
|
+
| `get_task_flow` | Get task flow guidance (bulk edit, create, inline edit, etc.) |
|
|
36
|
+
| `get_mock_data_patterns` | Get reference patterns for generating realistic Azure mock data |
|
|
37
|
+
|
|
38
|
+
### MCP App (visual UI)
|
|
39
|
+
|
|
40
|
+
| Tool | Description |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `browse_design_tokens` | Interactive visual token browser with color swatches, search, and category filtering — renders inline in Claude |
|
|
43
|
+
| `browse_verification_reports` | Interactive success-criteria verification report browser with scorecards, trend deltas, and actionable feedback |
|
|
44
|
+
|
|
45
|
+
## Setup
|
|
46
|
+
|
|
47
|
+
### Claude Desktop
|
|
48
|
+
|
|
49
|
+
Add to your `claude_desktop_config.json` (Settings → Developer → Edit Config):
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"mcpServers": {
|
|
54
|
+
"coherence-prototyper": {
|
|
55
|
+
"command": "node",
|
|
56
|
+
"args": ["/absolute/path/to/vibe-azure/mcp-server/dist/main.js"]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Replace `/absolute/path/to/vibe-azure` with the actual path to your clone.
|
|
63
|
+
|
|
64
|
+
### VS Code (MCP)
|
|
65
|
+
|
|
66
|
+
Add to `.vscode/mcp.json`:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"servers": {
|
|
71
|
+
"coherence-prototyper": {
|
|
72
|
+
"command": "node",
|
|
73
|
+
"args": ["${workspaceFolder}/mcp-server/dist/main.js"]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Development
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
cd mcp-server
|
|
83
|
+
|
|
84
|
+
# Install dependencies
|
|
85
|
+
npm install
|
|
86
|
+
|
|
87
|
+
# Type-check
|
|
88
|
+
npx tsc --noEmit
|
|
89
|
+
|
|
90
|
+
# Build everything (server + MCP App UI)
|
|
91
|
+
npm run build
|
|
92
|
+
|
|
93
|
+
# Dev mode with watch (server + UI rebuild on change)
|
|
94
|
+
npm start
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Architecture
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
mcp-server/
|
|
101
|
+
├── main.ts # stdio entry point
|
|
102
|
+
├── server.ts # MCP server: 15 tools + MCP App resources
|
|
103
|
+
├── token-browser.html # MCP App view (Vite entry)
|
|
104
|
+
├── verification-report.html # MCP App view for validation scorecards
|
|
105
|
+
├── src/
|
|
106
|
+
│ ├── verification-scorecard-store.ts # Reads verification snapshots/history from experiments
|
|
107
|
+
│ ├── manifest-cache.ts # Fetches + caches Coherence manifest from CDN
|
|
108
|
+
│ ├── theme-cache.ts # Fetches + caches theme CSS, parses tokens
|
|
109
|
+
│ ├── content.ts # Reads reference files from .github/skills/
|
|
110
|
+
│ ├── token-browser.ts # Client-side App for token browser UI
|
|
111
|
+
│ └── verification-report.ts # Client-side App for scorecard and trend UI
|
|
112
|
+
├── dist/ # Build output
|
|
113
|
+
│ ├── main.js # Compiled server
|
|
114
|
+
│ ├── server.js
|
|
115
|
+
│ ├── src/
|
|
116
|
+
│ ├── token-browser.html # Bundled single-file MCP App
|
|
117
|
+
│ └── verification-report.html # Bundled single-file MCP App
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Data Flow
|
|
121
|
+
|
|
122
|
+
- **Live from CDN** (cached 1hr): Component manifest JSON + theme CSS
|
|
123
|
+
- **Read from repo** (at runtime): Component guidance, UX guides, scaffolds, icons, patterns, mock data references from `.github/skills/`
|
|
124
|
+
|
|
125
|
+
This means the MCP server always reflects the latest Coherence release (via CDN) while using the same curated design guidance that the VS Code skills use.
|
|
126
|
+
|
|
127
|
+
## Example Prompts
|
|
128
|
+
|
|
129
|
+
Once connected, try these in Claude:
|
|
130
|
+
|
|
131
|
+
- *"Look up the CuiDataGrid component API"*
|
|
132
|
+
- *"Show me all status color tokens"*
|
|
133
|
+
- *"Get the scaffold for an Azure overview page"*
|
|
134
|
+
- *"What's the accessibility guidance for Coherence?"*
|
|
135
|
+
- *"Search for components that support the appearance attribute"*
|
|
136
|
+
- *"Get the composition pattern for the Azure portal header"*
|
|
137
|
+
- *"Browse design tokens"* (opens the interactive MCP App)
|
|
138
|
+
- *"Open the verification report for network-security-dashboard"* (opens the scorecard MCP App)
|