@lando-labs/lando-ds-mcp 4.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/CHANGELOG.md +526 -0
- package/LICENSE +202 -0
- package/NOTICE +4 -0
- package/README.md +170 -0
- package/build/data/ds-meta.json +1 -0
- package/build/data/ds-meta.schema.json +282 -0
- package/build/data/ds-meta.verbose.json +1 -0
- package/build/data/icon-metadata.d.ts +64 -0
- package/build/data/icon-metadata.d.ts.map +1 -0
- package/build/data/icon-metadata.js +1128 -0
- package/build/data/icon-metadata.js.map +1 -0
- package/build/data/lucide-icon-names.d.ts +12 -0
- package/build/data/lucide-icon-names.d.ts.map +1 -0
- package/build/data/lucide-icon-names.js +1653 -0
- package/build/data/lucide-icon-names.js.map +1 -0
- package/build/data/lucide-icons.d.ts +41 -0
- package/build/data/lucide-icons.d.ts.map +1 -0
- package/build/data/lucide-icons.js +80 -0
- package/build/data/lucide-icons.js.map +1 -0
- package/build/data/rn-tokens-snapshot.d.ts +753 -0
- package/build/data/rn-tokens-snapshot.d.ts.map +1 -0
- package/build/data/rn-tokens-snapshot.js +286 -0
- package/build/data/rn-tokens-snapshot.js.map +1 -0
- package/build/index.d.ts +18 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +411 -0
- package/build/index.js.map +1 -0
- package/build/prompts/index.d.ts +16 -0
- package/build/prompts/index.d.ts.map +1 -0
- package/build/prompts/index.js +145 -0
- package/build/prompts/index.js.map +1 -0
- package/build/resources/code-examples.d.ts +6 -0
- package/build/resources/code-examples.d.ts.map +1 -0
- package/build/resources/code-examples.js +278 -0
- package/build/resources/code-examples.js.map +1 -0
- package/build/resources/design-tokens.d.ts +6 -0
- package/build/resources/design-tokens.d.ts.map +1 -0
- package/build/resources/design-tokens.js +128 -0
- package/build/resources/design-tokens.js.map +1 -0
- package/build/resources/index.d.ts +19 -0
- package/build/resources/index.d.ts.map +1 -0
- package/build/resources/index.js +80 -0
- package/build/resources/index.js.map +1 -0
- package/build/test.d.ts +12 -0
- package/build/test.d.ts.map +1 -0
- package/build/test.js +680 -0
- package/build/test.js.map +1 -0
- package/build/tools/compose-components.d.ts +40 -0
- package/build/tools/compose-components.d.ts.map +1 -0
- package/build/tools/compose-components.js +61 -0
- package/build/tools/compose-components.js.map +1 -0
- package/build/tools/get-animation-examples.d.ts +30 -0
- package/build/tools/get-animation-examples.d.ts.map +1 -0
- package/build/tools/get-animation-examples.js +484 -0
- package/build/tools/get-animation-examples.js.map +1 -0
- package/build/tools/get-component-capabilities.d.ts +43 -0
- package/build/tools/get-component-capabilities.d.ts.map +1 -0
- package/build/tools/get-component-capabilities.js +108 -0
- package/build/tools/get-component-capabilities.js.map +1 -0
- package/build/tools/get-component-props.d.ts +23 -0
- package/build/tools/get-component-props.d.ts.map +1 -0
- package/build/tools/get-component-props.js +46 -0
- package/build/tools/get-component-props.js.map +1 -0
- package/build/tools/get-component-reference.d.ts +25 -0
- package/build/tools/get-component-reference.d.ts.map +1 -0
- package/build/tools/get-component-reference.js +112 -0
- package/build/tools/get-component-reference.js.map +1 -0
- package/build/tools/get-component.d.ts +25 -0
- package/build/tools/get-component.d.ts.map +1 -0
- package/build/tools/get-component.js +60 -0
- package/build/tools/get-component.js.map +1 -0
- package/build/tools/get-composition-hints.d.ts +22 -0
- package/build/tools/get-composition-hints.d.ts.map +1 -0
- package/build/tools/get-composition-hints.js +39 -0
- package/build/tools/get-composition-hints.js.map +1 -0
- package/build/tools/get-design-tokens.d.ts +24 -0
- package/build/tools/get-design-tokens.d.ts.map +1 -0
- package/build/tools/get-design-tokens.js +96 -0
- package/build/tools/get-design-tokens.js.map +1 -0
- package/build/tools/get-ds-metadata.d.ts +16 -0
- package/build/tools/get-ds-metadata.d.ts.map +1 -0
- package/build/tools/get-ds-metadata.js +65 -0
- package/build/tools/get-ds-metadata.js.map +1 -0
- package/build/tools/get-hook.d.ts +19 -0
- package/build/tools/get-hook.d.ts.map +1 -0
- package/build/tools/get-hook.js +46 -0
- package/build/tools/get-hook.js.map +1 -0
- package/build/tools/get-theme-presets.d.ts +13 -0
- package/build/tools/get-theme-presets.d.ts.map +1 -0
- package/build/tools/get-theme-presets.js +41 -0
- package/build/tools/get-theme-presets.js.map +1 -0
- package/build/tools/list-components.d.ts +29 -0
- package/build/tools/list-components.d.ts.map +1 -0
- package/build/tools/list-components.js +88 -0
- package/build/tools/list-components.js.map +1 -0
- package/build/tools/list-hooks.d.ts +22 -0
- package/build/tools/list-hooks.d.ts.map +1 -0
- package/build/tools/list-hooks.js +80 -0
- package/build/tools/list-hooks.js.map +1 -0
- package/build/tools/list-icons.d.ts +28 -0
- package/build/tools/list-icons.d.ts.map +1 -0
- package/build/tools/list-icons.js +161 -0
- package/build/tools/list-icons.js.map +1 -0
- package/build/tools/platform-transform.d.ts +64 -0
- package/build/tools/platform-transform.d.ts.map +1 -0
- package/build/tools/platform-transform.js +117 -0
- package/build/tools/platform-transform.js.map +1 -0
- package/build/tools/platform.d.ts +76 -0
- package/build/tools/platform.d.ts.map +1 -0
- package/build/tools/platform.js +80 -0
- package/build/tools/platform.js.map +1 -0
- package/build/tools/search-icons.d.ts +28 -0
- package/build/tools/search-icons.d.ts.map +1 -0
- package/build/tools/search-icons.js +257 -0
- package/build/tools/search-icons.js.map +1 -0
- package/build/utils/error-envelope.d.ts +14 -0
- package/build/utils/error-envelope.d.ts.map +1 -0
- package/build/utils/error-envelope.js +35 -0
- package/build/utils/error-envelope.js.map +1 -0
- package/build/utils/icon-library.d.ts +17 -0
- package/build/utils/icon-library.d.ts.map +1 -0
- package/build/utils/icon-library.js +24 -0
- package/build/utils/icon-library.js.map +1 -0
- package/build/utils/jsx-safety.d.ts +47 -0
- package/build/utils/jsx-safety.d.ts.map +1 -0
- package/build/utils/jsx-safety.js +63 -0
- package/build/utils/jsx-safety.js.map +1 -0
- package/build/utils/meta-loader.d.ts +37 -0
- package/build/utils/meta-loader.d.ts.map +1 -0
- package/build/utils/meta-loader.js +114 -0
- package/build/utils/meta-loader.js.map +1 -0
- package/package.json +60 -0
package/build/index.js
ADDED
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Lando Labs Design System MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Provides AI agents with access to the Lando Labs Design System through
|
|
6
|
+
* the Model Context Protocol. Meta-backed since v3.0.0 — reads component,
|
|
7
|
+
* token, icon, and capability metadata from the DS-emitted meta artifacts
|
|
8
|
+
* (see src/utils/meta-loader.ts).
|
|
9
|
+
*
|
|
10
|
+
* Version: 4.0.0
|
|
11
|
+
* Tools: 15 (list_components, get_component, get_component_props,
|
|
12
|
+
* get_component_reference, compose_components, get_design_tokens,
|
|
13
|
+
* get_animation_examples, list_icons, search_icons,
|
|
14
|
+
* get_component_capabilities, get_composition_hints,
|
|
15
|
+
* get_theme_presets, get_ds_metadata, list_hooks, get_hook)
|
|
16
|
+
*/
|
|
17
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
18
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
19
|
+
import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, ErrorCode, McpError, } from '@modelcontextprotocol/sdk/types.js';
|
|
20
|
+
import { handleError } from './utils/error-envelope.js';
|
|
21
|
+
import { getComponentNames, getDsVersion, getHookNames } from './utils/meta-loader.js';
|
|
22
|
+
// Tools
|
|
23
|
+
import { listComponents, listComponentsSchema } from './tools/list-components.js';
|
|
24
|
+
import { getComponent, getComponentSchema } from './tools/get-component.js';
|
|
25
|
+
import { getComponentProps, getComponentPropsSchema } from './tools/get-component-props.js';
|
|
26
|
+
import { getComponentReference, getComponentReferenceSchema } from './tools/get-component-reference.js';
|
|
27
|
+
import { composeComponents, composeComponentsSchema } from './tools/compose-components.js';
|
|
28
|
+
import { getDesignTokens, getDesignTokensSchema } from './tools/get-design-tokens.js';
|
|
29
|
+
import { getAnimationExamples, getAnimationExamplesSchema } from './tools/get-animation-examples.js';
|
|
30
|
+
import { listIcons, listIconsSchema } from './tools/list-icons.js';
|
|
31
|
+
import { searchIcons, searchIconsSchema } from './tools/search-icons.js';
|
|
32
|
+
import { getComponentCapabilities, getComponentCapabilitiesSchema } from './tools/get-component-capabilities.js';
|
|
33
|
+
import { getCompositionHints, getCompositionHintsSchema } from './tools/get-composition-hints.js';
|
|
34
|
+
import { getThemePresets, getThemePresetsSchema } from './tools/get-theme-presets.js';
|
|
35
|
+
import { getDsMetadata, getDsMetadataSchema } from './tools/get-ds-metadata.js';
|
|
36
|
+
import { listHooks, listHooksSchema } from './tools/list-hooks.js';
|
|
37
|
+
import { getHook_tool, getHookSchema } from './tools/get-hook.js';
|
|
38
|
+
// Resources
|
|
39
|
+
import { getResource, listResources } from './resources/index.js';
|
|
40
|
+
// Prompts
|
|
41
|
+
import { prompts, getPromptTemplate } from './prompts/index.js';
|
|
42
|
+
const server = new Server({
|
|
43
|
+
name: 'lando-ds',
|
|
44
|
+
version: '4.0.0',
|
|
45
|
+
}, {
|
|
46
|
+
capabilities: {
|
|
47
|
+
tools: {},
|
|
48
|
+
resources: {},
|
|
49
|
+
prompts: {},
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
// Error envelope lives in utils/error-envelope.ts so it can be unit-tested
|
|
53
|
+
// without spinning up the stdio transport. See that file for the policy.
|
|
54
|
+
// ============================================================================
|
|
55
|
+
// Tool Handlers
|
|
56
|
+
// ============================================================================
|
|
57
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
58
|
+
// Dynamic component enum — derived from DS meta at startup so we don't
|
|
59
|
+
// maintain a hardcoded list per tool (closes #10).
|
|
60
|
+
const componentEnum = getComponentNames();
|
|
61
|
+
const componentName = {
|
|
62
|
+
type: 'string',
|
|
63
|
+
enum: componentEnum,
|
|
64
|
+
description: 'PascalCase component name (e.g. "Button", "DatePicker").',
|
|
65
|
+
};
|
|
66
|
+
// Dynamic hook enum — derived at startup. Omit the enum when the loaded
|
|
67
|
+
// meta has no hooks (schema ≤ 1.2) so clients get a permissive string.
|
|
68
|
+
const hookNamesEnum = getHookNames();
|
|
69
|
+
const hookNameProp = hookNamesEnum.length > 0
|
|
70
|
+
? { type: 'string', enum: hookNamesEnum, description: 'Hook name (e.g. "useDisclosure", "useDebouncedValue").' }
|
|
71
|
+
: { type: 'string', description: 'Hook name — loaded meta has no hooks (needs DS meta schema 1.3+).' };
|
|
72
|
+
return {
|
|
73
|
+
tools: [
|
|
74
|
+
{
|
|
75
|
+
name: 'list_components',
|
|
76
|
+
description: 'List DS components with optional filters (category, deprecated, serverSafe, polymorphic, kind). Meta-backed since v3.0.0.',
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: 'object',
|
|
79
|
+
properties: {
|
|
80
|
+
category: { type: 'string', description: 'Filter by category (matches meta.components[X].category).' },
|
|
81
|
+
deprecated: { type: 'boolean', description: 'If true, ONLY deprecated components; if false, exclude them.' },
|
|
82
|
+
serverSafe: { type: 'boolean', description: 'If true, only RSC-safe components.' },
|
|
83
|
+
polymorphic: { type: 'boolean', description: 'If true, only components with `as` / `asChild`.' },
|
|
84
|
+
kind: { type: 'string', enum: ['component'], description: 'Reserved for future non-component kinds.' },
|
|
85
|
+
},
|
|
86
|
+
required: [],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'get_component',
|
|
91
|
+
description: 'Generate a JSX snippet (import + element) for a DS component with the given props/children. Rejects JSX-unsafe prop values.',
|
|
92
|
+
inputSchema: {
|
|
93
|
+
type: 'object',
|
|
94
|
+
properties: {
|
|
95
|
+
componentName,
|
|
96
|
+
props: { type: 'object', description: 'Component props (string|number|boolean primitives; nested objects/arrays allowed).', additionalProperties: true },
|
|
97
|
+
children: { type: 'string', description: 'Children content for the component (JSX or text).' },
|
|
98
|
+
},
|
|
99
|
+
required: ['componentName'],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'get_component_props',
|
|
104
|
+
description: 'Return a TypeScript-interface view of a component\'s props, derived from meta.components[X].props.',
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: 'object',
|
|
107
|
+
properties: { componentName },
|
|
108
|
+
required: ['componentName'],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: 'get_component_reference',
|
|
113
|
+
description: 'Full component reference in one call — description, examples, composition hints, props, and (optionally) theming class-name maps. Replaces v2.x get_component_docs + get_usage_example.',
|
|
114
|
+
inputSchema: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
properties: {
|
|
117
|
+
componentName,
|
|
118
|
+
include: {
|
|
119
|
+
type: 'array',
|
|
120
|
+
items: { type: 'string', enum: ['description', 'examples', 'composes', 'props', 'appliesClassNames'] },
|
|
121
|
+
description: 'Sections to include (default: description + examples + composes + props).',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
required: ['componentName'],
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'compose_components',
|
|
129
|
+
description: 'Compose multiple DS components into a single snippet with a merged import block. Refuses composition if any component is not in DS meta.',
|
|
130
|
+
inputSchema: {
|
|
131
|
+
type: 'object',
|
|
132
|
+
properties: {
|
|
133
|
+
components: {
|
|
134
|
+
type: 'array',
|
|
135
|
+
maxItems: 25,
|
|
136
|
+
description: 'Array of components to compose (max 25).',
|
|
137
|
+
items: {
|
|
138
|
+
type: 'object',
|
|
139
|
+
properties: {
|
|
140
|
+
componentName,
|
|
141
|
+
props: { type: 'object', additionalProperties: true },
|
|
142
|
+
children: { type: 'string' },
|
|
143
|
+
},
|
|
144
|
+
required: ['componentName'],
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
required: ['components'],
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: 'get_design_tokens',
|
|
153
|
+
description: 'DS design tokens (colors, spacing, typography, radius, shadows, motion). `format`: `css` (default, CSS var references — resolve to OKLCH at runtime), `hex` (sRGB hex from meta), or `both`.',
|
|
154
|
+
inputSchema: {
|
|
155
|
+
type: 'object',
|
|
156
|
+
properties: {
|
|
157
|
+
format: { type: 'string', enum: ['css', 'hex', 'both'], default: 'css', description: 'Output format for color values.' },
|
|
158
|
+
},
|
|
159
|
+
required: [],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'get_animation_examples',
|
|
164
|
+
description: 'Canonical DS animation patterns (CSS keyframes + usage). Brand-neutral.',
|
|
165
|
+
inputSchema: {
|
|
166
|
+
type: 'object',
|
|
167
|
+
properties: {
|
|
168
|
+
animationType: {
|
|
169
|
+
type: 'string',
|
|
170
|
+
enum: ['wave-dots', 'ripple', 'fade-in', 'fade-out', 'slide-up', 'slide-down', 'slide-left', 'slide-right', 'pulse', 'shimmer', 'bounce', 'spin', 'all'],
|
|
171
|
+
description: 'Type of animation to get. Omit or use "all" for all animations.',
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
required: [],
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'list_icons',
|
|
179
|
+
description: 'List available icons. `source: "ds-brand"` returns DS-authoritative brand icons (from meta.icons.registry); `source: "lucide-curated"` returns MCP\'s curated Lucide subset; `source: "all"` unions both. The full ~1,500 Lucide library is always reachable via `search_icons`.',
|
|
180
|
+
inputSchema: {
|
|
181
|
+
type: 'object',
|
|
182
|
+
properties: {
|
|
183
|
+
query: { type: 'string', description: 'Search query.' },
|
|
184
|
+
category: { type: 'string', description: 'Filter by icon category.' },
|
|
185
|
+
source: { type: 'string', enum: ['ds-brand', 'lucide-curated', 'all'], description: 'Icon source (default: all).' },
|
|
186
|
+
limit: { type: 'number', description: 'Maximum icons to return (default 50, max 200).', default: 50 },
|
|
187
|
+
},
|
|
188
|
+
required: [],
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: 'search_icons',
|
|
193
|
+
description: 'Semantic icon search by purpose. Ranks curated matches from the selected source, then spills over into the full Lucide library for additional names not in either curated set.',
|
|
194
|
+
inputSchema: {
|
|
195
|
+
type: 'object',
|
|
196
|
+
properties: {
|
|
197
|
+
query: { type: 'string', description: 'What you want to accomplish (e.g. "user profile", "indicate success").' },
|
|
198
|
+
category: { type: 'string', description: 'Optional: filter to this category.' },
|
|
199
|
+
source: { type: 'string', enum: ['ds-brand', 'lucide-curated', 'all'], description: 'Icon source (default: all).' },
|
|
200
|
+
limit: { type: 'number', description: 'Maximum curated matches (default 10, max 200).', default: 10 },
|
|
201
|
+
},
|
|
202
|
+
required: ['query'],
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'get_component_capabilities',
|
|
207
|
+
description: 'DS capability introspection. Full matrix by default; pass filters (rscSafe, clientOnly, polymorphic, withRef, deprecated) or `component` for a single entry.',
|
|
208
|
+
inputSchema: {
|
|
209
|
+
type: 'object',
|
|
210
|
+
properties: {
|
|
211
|
+
component: { type: 'string', description: 'Optional: single component name (PascalCase) to query.' },
|
|
212
|
+
rscSafe: { type: 'boolean' },
|
|
213
|
+
clientOnly: { type: 'boolean' },
|
|
214
|
+
polymorphic: { type: 'boolean' },
|
|
215
|
+
withRef: { type: 'boolean' },
|
|
216
|
+
deprecated: { type: 'boolean' },
|
|
217
|
+
},
|
|
218
|
+
required: [],
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: 'get_composition_hints',
|
|
223
|
+
description: 'DS-authoritative composition hints for a component — for each documented prop, which component (or shape) it expects. Sourced from meta.verbose.composes.',
|
|
224
|
+
inputSchema: {
|
|
225
|
+
type: 'object',
|
|
226
|
+
properties: { componentName },
|
|
227
|
+
required: ['componentName'],
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: 'get_theme_presets',
|
|
232
|
+
description: 'Available DS theme presets. Post-v0.34 brand-neutralization: consumers pick a preset (or apply their own ramps) rather than getting a baked brand default.',
|
|
233
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: 'get_ds_metadata',
|
|
237
|
+
description: 'One-call "what am I talking to" — DS package name/version, meta schema version, component/capability/icon/hook totals, exports map. Useful for CI version guards and self-orientation.',
|
|
238
|
+
inputSchema: { type: 'object', properties: {}, required: [] },
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: 'list_hooks',
|
|
242
|
+
description: 'List DS utility hooks (state, dom, browser, a11y, etc.) with optional filters (category, serverSafe). Meta-backed since v3.3.0 (DS meta schema 1.3).',
|
|
243
|
+
inputSchema: {
|
|
244
|
+
type: 'object',
|
|
245
|
+
properties: {
|
|
246
|
+
category: { type: 'string', description: 'Filter by category (matches meta.hooks[X].category).' },
|
|
247
|
+
serverSafe: { type: 'boolean', description: 'If true, only RSC-safe hooks.' },
|
|
248
|
+
},
|
|
249
|
+
required: [],
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
name: 'get_hook',
|
|
254
|
+
description: 'Full detail for a DS utility hook — signature, returns, category, RSC safety, subpath, description, and an import snippet.',
|
|
255
|
+
inputSchema: {
|
|
256
|
+
type: 'object',
|
|
257
|
+
properties: { hookName: hookNameProp },
|
|
258
|
+
required: ['hookName'],
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
};
|
|
263
|
+
});
|
|
264
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
265
|
+
try {
|
|
266
|
+
const { name, arguments: args } = request.params;
|
|
267
|
+
switch (name) {
|
|
268
|
+
case 'list_components': {
|
|
269
|
+
const params = listComponentsSchema.parse(args ?? {});
|
|
270
|
+
const result = await listComponents(params);
|
|
271
|
+
return { content: [{ type: 'text', text: result }] };
|
|
272
|
+
}
|
|
273
|
+
case 'get_component': {
|
|
274
|
+
const params = getComponentSchema.parse(args);
|
|
275
|
+
const result = await getComponent(params);
|
|
276
|
+
return { content: [{ type: 'text', text: result }] };
|
|
277
|
+
}
|
|
278
|
+
case 'get_component_props': {
|
|
279
|
+
const params = getComponentPropsSchema.parse(args);
|
|
280
|
+
const result = await getComponentProps(params);
|
|
281
|
+
return { content: [{ type: 'text', text: result }] };
|
|
282
|
+
}
|
|
283
|
+
case 'get_component_reference': {
|
|
284
|
+
const params = getComponentReferenceSchema.parse(args);
|
|
285
|
+
const result = await getComponentReference(params);
|
|
286
|
+
return { content: [{ type: 'text', text: result }] };
|
|
287
|
+
}
|
|
288
|
+
case 'compose_components': {
|
|
289
|
+
const params = composeComponentsSchema.parse(args);
|
|
290
|
+
const result = await composeComponents(params);
|
|
291
|
+
return { content: [{ type: 'text', text: result }] };
|
|
292
|
+
}
|
|
293
|
+
case 'get_design_tokens': {
|
|
294
|
+
const params = getDesignTokensSchema.parse(args ?? {});
|
|
295
|
+
const result = await getDesignTokens(params);
|
|
296
|
+
return { content: [{ type: 'text', text: result }] };
|
|
297
|
+
}
|
|
298
|
+
case 'get_animation_examples': {
|
|
299
|
+
const params = getAnimationExamplesSchema.parse(args ?? {});
|
|
300
|
+
const result = await getAnimationExamples(params);
|
|
301
|
+
return { content: [{ type: 'text', text: result }] };
|
|
302
|
+
}
|
|
303
|
+
case 'list_icons': {
|
|
304
|
+
const params = listIconsSchema.parse(args ?? {});
|
|
305
|
+
const result = await listIcons(params);
|
|
306
|
+
return { content: [{ type: 'text', text: result }] };
|
|
307
|
+
}
|
|
308
|
+
case 'search_icons': {
|
|
309
|
+
const params = searchIconsSchema.parse(args);
|
|
310
|
+
const result = await searchIcons(params);
|
|
311
|
+
return { content: [{ type: 'text', text: result }] };
|
|
312
|
+
}
|
|
313
|
+
case 'get_component_capabilities': {
|
|
314
|
+
const params = getComponentCapabilitiesSchema.parse(args ?? {});
|
|
315
|
+
const result = await getComponentCapabilities(params);
|
|
316
|
+
return { content: [{ type: 'text', text: result }] };
|
|
317
|
+
}
|
|
318
|
+
case 'get_composition_hints': {
|
|
319
|
+
const params = getCompositionHintsSchema.parse(args);
|
|
320
|
+
const result = await getCompositionHints(params);
|
|
321
|
+
return { content: [{ type: 'text', text: result }] };
|
|
322
|
+
}
|
|
323
|
+
case 'get_theme_presets': {
|
|
324
|
+
const params = getThemePresetsSchema.parse(args ?? {});
|
|
325
|
+
const result = await getThemePresets(params);
|
|
326
|
+
return { content: [{ type: 'text', text: result }] };
|
|
327
|
+
}
|
|
328
|
+
case 'get_ds_metadata': {
|
|
329
|
+
const params = getDsMetadataSchema.parse(args ?? {});
|
|
330
|
+
const result = await getDsMetadata(params);
|
|
331
|
+
return { content: [{ type: 'text', text: result }] };
|
|
332
|
+
}
|
|
333
|
+
case 'list_hooks': {
|
|
334
|
+
const params = listHooksSchema.parse(args ?? {});
|
|
335
|
+
const result = await listHooks(params);
|
|
336
|
+
return { content: [{ type: 'text', text: result }] };
|
|
337
|
+
}
|
|
338
|
+
case 'get_hook': {
|
|
339
|
+
const params = getHookSchema.parse(args);
|
|
340
|
+
const result = await getHook_tool(params);
|
|
341
|
+
return { content: [{ type: 'text', text: result }] };
|
|
342
|
+
}
|
|
343
|
+
default:
|
|
344
|
+
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
catch (error) {
|
|
348
|
+
throw handleError(error);
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
// ============================================================================
|
|
352
|
+
// Resource Handlers
|
|
353
|
+
// ============================================================================
|
|
354
|
+
server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
|
355
|
+
return { resources: listResources() };
|
|
356
|
+
});
|
|
357
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
358
|
+
try {
|
|
359
|
+
const { uri } = request.params;
|
|
360
|
+
const resource = await getResource(uri);
|
|
361
|
+
return {
|
|
362
|
+
contents: [
|
|
363
|
+
{ uri: resource.uri, mimeType: resource.mimeType, text: resource.text },
|
|
364
|
+
],
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
catch (error) {
|
|
368
|
+
throw handleError(error);
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
// ============================================================================
|
|
372
|
+
// Prompt Handlers
|
|
373
|
+
// ============================================================================
|
|
374
|
+
server.setRequestHandler(ListPromptsRequestSchema, async () => {
|
|
375
|
+
return {
|
|
376
|
+
prompts: prompts.map((p) => ({ name: p.name, description: p.description, arguments: p.arguments })),
|
|
377
|
+
};
|
|
378
|
+
});
|
|
379
|
+
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
380
|
+
try {
|
|
381
|
+
const { name, arguments: args } = request.params;
|
|
382
|
+
const promptText = getPromptTemplate(name, args || {});
|
|
383
|
+
return {
|
|
384
|
+
messages: [
|
|
385
|
+
{ role: 'user', content: { type: 'text', text: promptText } },
|
|
386
|
+
],
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
catch (error) {
|
|
390
|
+
throw handleError(error);
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
// ============================================================================
|
|
394
|
+
// Server Startup
|
|
395
|
+
// ============================================================================
|
|
396
|
+
async function main() {
|
|
397
|
+
const transport = new StdioServerTransport();
|
|
398
|
+
await server.connect(transport);
|
|
399
|
+
console.error('Lando Labs Design System MCP Server running on stdio');
|
|
400
|
+
console.error(`Version: 4.0.0 (backed by @lando-labs/lando-ds-meta v${getDsVersion()})`);
|
|
401
|
+
console.error(`Components: ${getComponentNames().length} | Hooks: ${getHookNames().length}`);
|
|
402
|
+
console.error('Tools: 15 (list_components, get_component, get_component_props, get_component_reference,');
|
|
403
|
+
console.error(' compose_components, get_design_tokens, get_animation_examples, list_icons,');
|
|
404
|
+
console.error(' search_icons, get_component_capabilities, get_composition_hints,');
|
|
405
|
+
console.error(' get_theme_presets, get_ds_metadata, list_hooks, get_hook)');
|
|
406
|
+
}
|
|
407
|
+
main().catch((error) => {
|
|
408
|
+
console.error('Fatal error:', error);
|
|
409
|
+
process.exit(1);
|
|
410
|
+
});
|
|
411
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,SAAS,EACT,QAAQ,GACT,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAEtF,QAAQ;AACR,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACjF,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AAC3F,OAAO,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAA;AACvG,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAC1F,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AACrF,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACpG,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,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BAAoB,EAAE,CAAA;IAC5C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IAE/B,OAAO,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAA;IACrE,OAAO,CAAC,KAAK,CAAC,wDAAwD,YAAY,EAAE,GAAG,CAAC,CAAA;IACxF,OAAO,CAAC,KAAK,CAAC,eAAe,iBAAiB,EAAE,CAAC,MAAM,aAAa,YAAY,EAAE,CAAC,MAAM,EAAE,CAAC,CAAA;IAC5F,OAAO,CAAC,KAAK,CAAC,0FAA0F,CAAC,CAAA;IACzG,OAAO,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAA;IACrG,OAAO,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAA;IAC3F,OAAO,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAA;AACtF,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAA;IACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts
|
|
3
|
+
* Reusable prompt templates for common component generation tasks
|
|
4
|
+
*/
|
|
5
|
+
export interface Prompt {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
arguments: Array<{
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
export declare const prompts: Prompt[];
|
|
15
|
+
export declare function getPromptTemplate(name: string, args: Record<string, string>): string;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,KAAK,CAAC;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,QAAQ,EAAE,OAAO,CAAA;KAClB,CAAC,CAAA;CACH;AAED,eAAO,MAAM,OAAO,EAAE,MAAM,EA2D3B,CAAA;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAWpF"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts
|
|
3
|
+
* Reusable prompt templates for common component generation tasks
|
|
4
|
+
*/
|
|
5
|
+
export const prompts = [
|
|
6
|
+
{
|
|
7
|
+
name: 'create_form',
|
|
8
|
+
description: 'Create a form with specified fields using design system components',
|
|
9
|
+
arguments: [
|
|
10
|
+
{
|
|
11
|
+
name: 'fields',
|
|
12
|
+
description: 'Comma-separated list of field types (e.g., "email,password,checkbox")',
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'submitLabel',
|
|
17
|
+
description: 'Label for the submit button',
|
|
18
|
+
required: false
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'includeValidation',
|
|
22
|
+
description: 'Whether to include validation logic',
|
|
23
|
+
required: false
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'create_card_layout',
|
|
29
|
+
description: 'Create a card-based layout with multiple cards',
|
|
30
|
+
arguments: [
|
|
31
|
+
{
|
|
32
|
+
name: 'numberOfCards',
|
|
33
|
+
description: 'Number of cards to create',
|
|
34
|
+
required: true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'contentType',
|
|
38
|
+
description: 'Type of content (product, user, article, etc.)',
|
|
39
|
+
required: true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'variant',
|
|
43
|
+
description: 'Card variant (default, outlined, elevated)',
|
|
44
|
+
required: false
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'create_loading_state',
|
|
50
|
+
description: 'Create loading state UI with spinner and optional skeleton',
|
|
51
|
+
arguments: [
|
|
52
|
+
{
|
|
53
|
+
name: 'type',
|
|
54
|
+
description: 'Type of loading (fullpage, inline, card)',
|
|
55
|
+
required: true
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'message',
|
|
59
|
+
description: 'Loading message to display',
|
|
60
|
+
required: false
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
];
|
|
65
|
+
export function getPromptTemplate(name, args) {
|
|
66
|
+
switch (name) {
|
|
67
|
+
case 'create_form':
|
|
68
|
+
return createFormPrompt(args);
|
|
69
|
+
case 'create_card_layout':
|
|
70
|
+
return createCardLayoutPrompt(args);
|
|
71
|
+
case 'create_loading_state':
|
|
72
|
+
return createLoadingStatePrompt(args);
|
|
73
|
+
default:
|
|
74
|
+
throw new Error(`Unknown prompt: ${name}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function createFormPrompt(args) {
|
|
78
|
+
const fields = args.fields?.split(',').map(f => f.trim()) || [];
|
|
79
|
+
const submitLabel = args.submitLabel || 'Submit';
|
|
80
|
+
const includeValidation = args.includeValidation === 'true';
|
|
81
|
+
return `Create a form using Lando Labs Design System components with the following fields:
|
|
82
|
+
|
|
83
|
+
${fields.map(field => `- ${field}`).join('\n')}
|
|
84
|
+
|
|
85
|
+
Requirements:
|
|
86
|
+
- Use the Input component for text fields
|
|
87
|
+
- Use the Checkbox component for checkbox fields
|
|
88
|
+
- Use the Switch component for toggle fields
|
|
89
|
+
- Use the RadioGroup and Radio components for radio button groups
|
|
90
|
+
- Use the Button component for the submit button with label "${submitLabel}"
|
|
91
|
+
- Wrap the form in a Card component for proper styling
|
|
92
|
+
${includeValidation ? '- Include validation logic with error states' : ''}
|
|
93
|
+
- Use controlled components with React state
|
|
94
|
+
- Include proper TypeScript types
|
|
95
|
+
|
|
96
|
+
Import all components from '@lando-labs/lando-ds'`;
|
|
97
|
+
}
|
|
98
|
+
function createCardLayoutPrompt(args) {
|
|
99
|
+
const numberOfCards = parseInt(args.numberOfCards || '3');
|
|
100
|
+
const contentType = args.contentType || 'generic';
|
|
101
|
+
const variant = args.variant || 'elevated';
|
|
102
|
+
return `Create a responsive card grid layout using Lando Labs Design System components.
|
|
103
|
+
|
|
104
|
+
Requirements:
|
|
105
|
+
- Create ${numberOfCards} Card components with variant="${variant}"
|
|
106
|
+
- Each card should display ${contentType} information
|
|
107
|
+
- Use CardHeader, CardBody, and CardFooter for proper structure
|
|
108
|
+
- Include appropriate badges, avatars, or other components based on content type
|
|
109
|
+
- Use CSS Grid with responsive breakpoints
|
|
110
|
+
- Import all components from '@lando-labs/lando-ds'
|
|
111
|
+
- Include proper TypeScript types for data
|
|
112
|
+
|
|
113
|
+
Example structure:
|
|
114
|
+
- CardHeader: Title and badges
|
|
115
|
+
- CardBody: Main content and description
|
|
116
|
+
- CardFooter: Action buttons`;
|
|
117
|
+
}
|
|
118
|
+
function createLoadingStatePrompt(args) {
|
|
119
|
+
const type = args.type || 'inline';
|
|
120
|
+
const message = args.message || 'Loading...';
|
|
121
|
+
const templates = {
|
|
122
|
+
fullpage: `Create a full-page loading state:
|
|
123
|
+
- Center the Spinner component on the page
|
|
124
|
+
- Use size="xl" for the spinner
|
|
125
|
+
- Include the message "${message}"
|
|
126
|
+
- Style with proper centering and spacing`,
|
|
127
|
+
inline: `Create an inline loading state:
|
|
128
|
+
- Use the Spinner component with size="md"
|
|
129
|
+
- Display the message "${message}" next to the spinner
|
|
130
|
+
- Suitable for inline placement in content`,
|
|
131
|
+
card: `Create a loading card state:
|
|
132
|
+
- Use the Card component with loading={true} prop
|
|
133
|
+
- This will display the built-in skeleton loading state
|
|
134
|
+
- No additional spinner needed`
|
|
135
|
+
};
|
|
136
|
+
const template = templates[type] || templates.inline;
|
|
137
|
+
return `Create a loading state UI using Lando Labs Design System components.
|
|
138
|
+
|
|
139
|
+
Type: ${type}
|
|
140
|
+
|
|
141
|
+
${template}
|
|
142
|
+
|
|
143
|
+
Import components from '@lando-labs/lando-ds'`;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,MAAM,CAAC,MAAM,OAAO,GAAa;IAC/B;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,oEAAoE;QACjF,SAAS,EAAE;YACT;gBACE,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uEAAuE;gBACpF,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,6BAA6B;gBAC1C,QAAQ,EAAE,KAAK;aAChB;YACD;gBACE,IAAI,EAAE,mBAAmB;gBACzB,WAAW,EAAE,qCAAqC;gBAClD,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,gDAAgD;QAC7D,SAAS,EAAE;YACT;gBACE,IAAI,EAAE,eAAe;gBACrB,WAAW,EAAE,2BAA2B;gBACxC,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,gDAAgD;gBAC7D,QAAQ,EAAE,IAAI;aACf;YACD;gBACE,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,4CAA4C;gBACzD,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,4DAA4D;QACz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