@pudge-ui/mcp-server 0.1.0 → 0.2.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 +10 -0
- package/dist/tools.d.ts +25 -0
- package/dist/tools.js +23 -13
- package/package.json +5 -4
- package/spec/components/.gstack/browse.json.lock +1 -0
- package/spec/spec/components/_index.yaml +0 -822
- package/spec/spec/components/buttons/clear-button.md +0 -89
- package/spec/spec/components/buttons/fn-grid.md +0 -104
- package/spec/spec/components/buttons/gel-button.md +0 -125
- package/spec/spec/components/buttons/icon-button.md +0 -108
- package/spec/spec/components/buttons/keypad-button.md +0 -123
- package/spec/spec/components/buttons/push-button.md +0 -139
- package/spec/spec/components/buttons/rec-button.md +0 -105
- package/spec/spec/components/buttons/rubber-button.md +0 -100
- package/spec/spec/components/buttons/segmented-control.md +0 -95
- package/spec/spec/components/data/assembled-panel.md +0 -135
- package/spec/spec/components/data/data-table.md +0 -116
- package/spec/spec/components/data/film-strip.md +0 -110
- package/spec/spec/components/data/media-grid.md +0 -98
- package/spec/spec/components/dials/click-wheel.md +0 -115
- package/spec/spec/components/dials/cylindrical-horizontal.md +0 -130
- package/spec/spec/components/dials/cylindrical-scroll.md +0 -141
- package/spec/spec/components/dials/cylindrical-vertical.md +0 -100
- package/spec/spec/components/dials/mode-dial.md +0 -123
- package/spec/spec/components/dials/radial-knob.md +0 -150
- package/spec/spec/components/dials/rotary-encoder.md +0 -118
- package/spec/spec/components/forms/color-picker.md +0 -99
- package/spec/spec/components/forms/file-input.md +0 -105
- package/spec/spec/components/forms/search-bar.md +0 -96
- package/spec/spec/components/forms/select.md +0 -143
- package/spec/spec/components/forms/text-input.md +0 -114
- package/spec/spec/components/forms/textarea.md +0 -85
- package/spec/spec/components/indicators/accordion.md +0 -137
- package/spec/spec/components/indicators/badges.md +0 -87
- package/spec/spec/components/indicators/chips.md +0 -93
- package/spec/spec/components/indicators/led-dots.md +0 -103
- package/spec/spec/components/indicators/mode-badge.md +0 -97
- package/spec/spec/components/indicators/profile-badge.md +0 -99
- package/spec/spec/components/indicators/skeleton.md +0 -94
- package/spec/spec/components/indicators/spinners.md +0 -95
- package/spec/spec/components/indicators/status-chips.md +0 -85
- package/spec/spec/components/indicators/transport-controls.md +0 -114
- package/spec/spec/components/meters/battery-icon.md +0 -104
- package/spec/spec/components/meters/eq-bars.md +0 -93
- package/spec/spec/components/meters/ev-meter.md +0 -96
- package/spec/spec/components/meters/exposure-scale.md +0 -110
- package/spec/spec/components/meters/gauge-full.md +0 -102
- package/spec/spec/components/meters/gauge-semi.md +0 -113
- package/spec/spec/components/meters/histogram.md +0 -70
- package/spec/spec/components/meters/level-indicator.md +0 -95
- package/spec/spec/components/meters/oscilloscope.md +0 -83
- package/spec/spec/components/meters/progress-bar.md +0 -84
- package/spec/spec/components/meters/signal-bars.md +0 -80
- package/spec/spec/components/meters/signal-meter.md +0 -84
- package/spec/spec/components/meters/vu-meter.md +0 -88
- package/spec/spec/components/meters/waveform.md +0 -70
- package/spec/spec/components/navigation/breadcrumbs.md +0 -94
- package/spec/spec/components/navigation/context-menu.md +0 -94
- package/spec/spec/components/navigation/d-pad.md +0 -121
- package/spec/spec/components/navigation/drawer.md +0 -103
- package/spec/spec/components/navigation/menu-grid.md +0 -113
- package/spec/spec/components/navigation/menu-list.md +0 -134
- package/spec/spec/components/navigation/pagination.md +0 -100
- package/spec/spec/components/navigation/rack-panel.md +0 -124
- package/spec/spec/components/navigation/scrollbar.md +0 -97
- package/spec/spec/components/navigation/status-bar.md +0 -117
- package/spec/spec/components/navigation/tab-bar.md +0 -104
- package/spec/spec/components/overlays/chassis-panel.md +0 -94
- package/spec/spec/components/overlays/device-bezel.md +0 -83
- package/spec/spec/components/overlays/dialog.md +0 -100
- package/spec/spec/components/overlays/focus-brackets.md +0 -124
- package/spec/spec/components/overlays/grid-overlay.md +0 -93
- package/spec/spec/components/overlays/modal.md +0 -89
- package/spec/spec/components/overlays/panel.md +0 -114
- package/spec/spec/components/overlays/plastic-card.md +0 -92
- package/spec/spec/components/overlays/popover.md +0 -75
- package/spec/spec/components/overlays/toast.md +0 -93
- package/spec/spec/components/overlays/tooltip.md +0 -85
- package/spec/spec/components/readouts/camera-readout.md +0 -123
- package/spec/spec/components/readouts/dot-matrix.md +0 -88
- package/spec/spec/components/readouts/lcd-readout.md +0 -116
- package/spec/spec/components/readouts/resource-monitor.md +0 -98
- package/spec/spec/components/readouts/seven-segment.md +0 -110
- package/spec/spec/components/readouts/signal-display.md +0 -93
- package/spec/spec/components/readouts/timecode-display.md +0 -94
- package/spec/spec/components/sliders/crossfader.md +0 -102
- package/spec/spec/components/sliders/dual-range.md +0 -97
- package/spec/spec/components/sliders/range-fader.md +0 -100
- package/spec/spec/components/sliders/scrubber.md +0 -104
- package/spec/spec/components/sliders/stepper.md +0 -106
- package/spec/spec/components/sliders/vertical-fader.md +0 -116
- package/spec/spec/components/sliders/volume-slider.md +0 -107
- package/spec/spec/components/toggles/dip-switch.md +0 -100
- package/spec/spec/components/toggles/led-checkbox.md +0 -108
- package/spec/spec/components/toggles/power-toggle.md +0 -93
- package/spec/spec/components/toggles/radio-button.md +0 -106
- package/spec/spec/components/toggles/rocker-switch.md +0 -92
- package/spec/spec/components/toggles/slide-switch.md +0 -121
- package/spec/spec/components/toggles/toggle-switch.md +0 -135
- package/spec/spec/compositions/audio-mixer-strip.md +0 -62
- package/spec/spec/compositions/camera-viewfinder.md +0 -66
- package/spec/spec/compositions/phone-interface.md +0 -66
- package/spec/spec/foundation/accessibility.md +0 -33
- package/spec/spec/foundation/canvas.md +0 -20
- package/spec/spec/foundation/depth-model.md +0 -82
- package/spec/spec/foundation/layout.md +0 -33
- package/spec/spec/foundation/materials.md +0 -68
- package/spec/spec/foundation/naming.md +0 -33
- package/spec/spec/foundation/philosophy.md +0 -27
- package/spec/spec/foundation/theme.md +0 -39
- package/spec/spec/foundation/tokens.md +0 -148
- package/spec/spec/guides/extension.md +0 -189
- package/spec/spec/guides/for-llms.md +0 -129
- package/spec/spec/guides/prompt-templates.md +0 -143
package/README.md
CHANGED
|
@@ -53,6 +53,8 @@ get_composition({ name: "audio-mixer-strip" })
|
|
|
53
53
|
get_foundation({ extended: true })
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
All tools are read-only (annotated with `readOnlyHint`) — the server never writes to your filesystem or makes network calls. Specs are bundled in the package.
|
|
57
|
+
|
|
56
58
|
## Development
|
|
57
59
|
|
|
58
60
|
```bash
|
|
@@ -60,4 +62,12 @@ npm install
|
|
|
60
62
|
npm run dev # run with tsx
|
|
61
63
|
npm run build # compile + copy spec
|
|
62
64
|
npm run typecheck # type-check only
|
|
65
|
+
npm test # run the test suite
|
|
63
66
|
```
|
|
67
|
+
|
|
68
|
+
## Versioning & stability
|
|
69
|
+
|
|
70
|
+
This server tracks pudge-ui's versioning and is pre-1.0. The component catalog grows
|
|
71
|
+
between releases, but tool **names and input shapes are stable** — any change to a tool
|
|
72
|
+
signature will come with a minor/major version bump and a CHANGELOG entry. Pin a version
|
|
73
|
+
if you need byte-for-byte reproducibility.
|
package/dist/tools.d.ts
CHANGED
|
@@ -8,6 +8,11 @@ export interface ToolContext {
|
|
|
8
8
|
export declare const toolDefinitions: ({
|
|
9
9
|
name: string;
|
|
10
10
|
description: string;
|
|
11
|
+
annotations: {
|
|
12
|
+
readOnlyHint: true;
|
|
13
|
+
openWorldHint: false;
|
|
14
|
+
title: string;
|
|
15
|
+
};
|
|
11
16
|
inputSchema: {
|
|
12
17
|
type: "object";
|
|
13
18
|
properties: {
|
|
@@ -26,6 +31,11 @@ export declare const toolDefinitions: ({
|
|
|
26
31
|
} | {
|
|
27
32
|
name: string;
|
|
28
33
|
description: string;
|
|
34
|
+
annotations: {
|
|
35
|
+
readOnlyHint: true;
|
|
36
|
+
openWorldHint: false;
|
|
37
|
+
title: string;
|
|
38
|
+
};
|
|
29
39
|
inputSchema: {
|
|
30
40
|
type: "object";
|
|
31
41
|
properties: {
|
|
@@ -47,6 +57,11 @@ export declare const toolDefinitions: ({
|
|
|
47
57
|
} | {
|
|
48
58
|
name: string;
|
|
49
59
|
description: string;
|
|
60
|
+
annotations: {
|
|
61
|
+
readOnlyHint: true;
|
|
62
|
+
openWorldHint: false;
|
|
63
|
+
title: string;
|
|
64
|
+
};
|
|
50
65
|
inputSchema: {
|
|
51
66
|
type: "object";
|
|
52
67
|
properties: {
|
|
@@ -65,6 +80,11 @@ export declare const toolDefinitions: ({
|
|
|
65
80
|
} | {
|
|
66
81
|
name: string;
|
|
67
82
|
description: string;
|
|
83
|
+
annotations: {
|
|
84
|
+
readOnlyHint: true;
|
|
85
|
+
openWorldHint: false;
|
|
86
|
+
title: string;
|
|
87
|
+
};
|
|
68
88
|
inputSchema: {
|
|
69
89
|
type: "object";
|
|
70
90
|
properties: {
|
|
@@ -83,6 +103,11 @@ export declare const toolDefinitions: ({
|
|
|
83
103
|
} | {
|
|
84
104
|
name: string;
|
|
85
105
|
description: string;
|
|
106
|
+
annotations: {
|
|
107
|
+
readOnlyHint: true;
|
|
108
|
+
openWorldHint: false;
|
|
109
|
+
title: string;
|
|
110
|
+
};
|
|
86
111
|
inputSchema: {
|
|
87
112
|
type: "object";
|
|
88
113
|
properties: {
|
package/dist/tools.js
CHANGED
|
@@ -1,53 +1,61 @@
|
|
|
1
1
|
import { searchComponents } from "./search.js";
|
|
2
2
|
import { loadFoundation, assembleComponent, assembleComponents, assembleComposition, } from "./assembler.js";
|
|
3
|
+
const readOnly = { readOnlyHint: true, openWorldHint: false };
|
|
3
4
|
export const toolDefinitions = [
|
|
4
5
|
{
|
|
5
6
|
name: "list_components",
|
|
6
|
-
description: "List
|
|
7
|
+
description: "List pudge-ui components — 93 skeuomorphic UI specs across 11 categories (buttons, toggles, dials, sliders, readouts, meters, navigation, forms, overlays, indicators, data). Returns each component's id, name, category, and one-line description. Optionally filter by category id. Use this first to discover what exists, then call get_component for full specs.",
|
|
8
|
+
annotations: { title: "List components", ...readOnly },
|
|
7
9
|
inputSchema: {
|
|
8
10
|
type: "object",
|
|
9
11
|
properties: {
|
|
10
12
|
category: {
|
|
11
13
|
type: "string",
|
|
12
|
-
description: "
|
|
14
|
+
description: "Optional category id to filter by, e.g. 'buttons', 'toggles', 'dials', 'sliders', 'readouts', 'meters', 'navigation', 'forms', 'overlays', 'indicators', 'data'. Omit to list all 93 components.",
|
|
13
15
|
},
|
|
14
16
|
},
|
|
15
17
|
},
|
|
16
18
|
},
|
|
17
19
|
{
|
|
18
20
|
name: "search_components",
|
|
19
|
-
description: "Fuzzy
|
|
21
|
+
description: "Fuzzy-search pudge-ui components by name, description, or tag (e.g. 'volume', 'knob', 'LCD', 'walkman'). Returns ranked matches with id, name, category, and description. Use this when you know what the user wants but not the exact component id; then call get_component with the best match.",
|
|
22
|
+
annotations: { title: "Search components", ...readOnly },
|
|
20
23
|
inputSchema: {
|
|
21
24
|
type: "object",
|
|
22
25
|
properties: {
|
|
23
|
-
query: {
|
|
24
|
-
|
|
26
|
+
query: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Free-text search query (matched against name, description, and tags)",
|
|
29
|
+
},
|
|
30
|
+
limit: { type: "number", description: "Max results, 1–50 (default 10)" },
|
|
25
31
|
},
|
|
26
32
|
required: ["query"],
|
|
27
33
|
},
|
|
28
34
|
},
|
|
29
35
|
{
|
|
30
36
|
name: "get_foundation",
|
|
31
|
-
description: "Get pudge-ui foundation
|
|
37
|
+
description: "Get the pudge-ui foundation: the design-system rules every component depends on. Core (default) returns 5 docs — philosophy, tokens, materials, depth-model, naming. Set extended=true for all 9 (adds theme, accessibility, layout, canvas). Load this once at the start of a build so the agent applies the depth model, material recipes, and warm-neutral palette correctly.",
|
|
38
|
+
annotations: { title: "Get foundation spec", ...readOnly },
|
|
32
39
|
inputSchema: {
|
|
33
40
|
type: "object",
|
|
34
41
|
properties: {
|
|
35
42
|
extended: {
|
|
36
43
|
type: "boolean",
|
|
37
|
-
description: "Include all 9 foundation docs (default: core 5)",
|
|
44
|
+
description: "Include all 9 foundation docs (default: false → core 5 docs)",
|
|
38
45
|
},
|
|
39
46
|
},
|
|
40
47
|
},
|
|
41
48
|
},
|
|
42
49
|
{
|
|
43
50
|
name: "get_component",
|
|
44
|
-
description: "Get full spec for
|
|
51
|
+
description: "Get the full spec for one pudge-ui component: its physical analog (the real 2000s hardware it imitates), mechanism, exact CSS recipe, and constraints — with the foundation prepended so the result is self-contained. This is the spec you hand to a coding agent to build the component in any stack (CSS, React Native, SwiftUI, Compose, Flutter). Accepts a component id or display name (e.g. 'push-button' or 'Push Button').",
|
|
52
|
+
annotations: { title: "Get component spec", ...readOnly },
|
|
45
53
|
inputSchema: {
|
|
46
54
|
type: "object",
|
|
47
55
|
properties: {
|
|
48
56
|
name: {
|
|
49
57
|
type: "string",
|
|
50
|
-
description: "Component id or name
|
|
58
|
+
description: "Component id or name, e.g. 'push-button' or 'Push Button'",
|
|
51
59
|
},
|
|
52
60
|
},
|
|
53
61
|
required: ["name"],
|
|
@@ -55,14 +63,15 @@ export const toolDefinitions = [
|
|
|
55
63
|
},
|
|
56
64
|
{
|
|
57
65
|
name: "get_components",
|
|
58
|
-
description: "Get full specs for
|
|
66
|
+
description: "Get full specs for several pudge-ui components at once, with the shared foundation included a single time (deduplicated) to save context. Use when building a screen that needs multiple components — pass an array of component ids or names.",
|
|
67
|
+
annotations: { title: "Get multiple component specs", ...readOnly },
|
|
59
68
|
inputSchema: {
|
|
60
69
|
type: "object",
|
|
61
70
|
properties: {
|
|
62
71
|
names: {
|
|
63
72
|
type: "array",
|
|
64
73
|
items: { type: "string" },
|
|
65
|
-
description: "Array of component ids or names",
|
|
74
|
+
description: "Array of component ids or names, e.g. ['volume-slider', 'vu-meter', 'lcd']",
|
|
66
75
|
},
|
|
67
76
|
},
|
|
68
77
|
required: ["names"],
|
|
@@ -70,11 +79,12 @@ export const toolDefinitions = [
|
|
|
70
79
|
},
|
|
71
80
|
{
|
|
72
81
|
name: "get_composition",
|
|
73
|
-
description: "Get a pudge-ui composition
|
|
82
|
+
description: "Get a pudge-ui composition — a pre-assembled multi-component layout (e.g. 'audio-mixer-strip') — with every referenced component spec inlined and the foundation included once. Use to build a complete, cohesive interface in one shot rather than wiring components together yourself.",
|
|
83
|
+
annotations: { title: "Get composition spec", ...readOnly },
|
|
74
84
|
inputSchema: {
|
|
75
85
|
type: "object",
|
|
76
86
|
properties: {
|
|
77
|
-
name: { type: "string", description: "Composition name
|
|
87
|
+
name: { type: "string", description: "Composition name, e.g. 'audio-mixer-strip'" },
|
|
78
88
|
},
|
|
79
89
|
required: ["name"],
|
|
80
90
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pudge-ui/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"mcpName": "io.github.pudge-studio/pudge-ui",
|
|
4
5
|
"description": "MCP server for pudge-ui design system — query component specs for LLM context",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"bin": {
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
16
17
|
"build": "tsc && npm run copy-spec",
|
|
17
|
-
"copy-spec": "cp -r ../../spec ./spec",
|
|
18
|
+
"copy-spec": "rm -rf ./spec && cp -r ../../spec ./spec",
|
|
18
19
|
"dev": "tsx src/index.ts",
|
|
19
20
|
"typecheck": "tsc --noEmit",
|
|
20
21
|
"test": "vitest run"
|
|
@@ -32,11 +33,11 @@
|
|
|
32
33
|
},
|
|
33
34
|
"repository": {
|
|
34
35
|
"type": "git",
|
|
35
|
-
"url": "https://github.com/
|
|
36
|
+
"url": "git+https://github.com/pudge-studio/pudge-ui.git",
|
|
36
37
|
"directory": "packages/mcp-server"
|
|
37
38
|
},
|
|
38
39
|
"homepage": "https://ui.pudgestudio.com",
|
|
39
|
-
"bugs": "https://github.com/
|
|
40
|
+
"bugs": "https://github.com/pudge-studio/pudge-ui/issues",
|
|
40
41
|
"keywords": [
|
|
41
42
|
"mcp",
|
|
42
43
|
"design-system",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
11722
|