@urbicon-ui/mcp-server 8.16.0 → 8.18.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@urbicon-ui/mcp-server",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.18.0",
|
|
4
4
|
"description": "Model Context Protocol server exposing the Urbicon UI component catalog, recipes and design intelligence to LLM agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
42
|
-
"@urbicon-ui/design-content": "8.
|
|
43
|
-
"@urbicon-ui/design-engine": "8.
|
|
42
|
+
"@urbicon-ui/design-content": "8.18.0",
|
|
43
|
+
"@urbicon-ui/design-engine": "8.18.0",
|
|
44
44
|
"zod": "^4.5.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -7,14 +7,14 @@ import { formatCompactCatalog, formatComponentLine } from '../utils/format-catal
|
|
|
7
7
|
/**
|
|
8
8
|
* Register the `find_components` tool: the catalog entry point. With no query it
|
|
9
9
|
* renders the full catalog grouped by category (via `formatCompactCatalog`);
|
|
10
|
-
* with a query it fuzzy-matches names
|
|
11
|
-
* `matchComponents` (top 10). Every line keeps the origin-package tag so a
|
|
10
|
+
* with a query it fuzzy-matches names, descriptions, summaries, prop docs, variant
|
|
11
|
+
* values and tags through the engine's `matchComponents` (top 10). Every line keeps the origin-package tag so a
|
|
12
12
|
* non-blocks match (e.g. `Table`) is never mistaken for a blocks export.
|
|
13
13
|
*/
|
|
14
14
|
export function registerFindComponentsTool(server: McpServer): void {
|
|
15
15
|
server.tool(
|
|
16
16
|
'find_components',
|
|
17
|
-
'Browse and search the Urbicon UI component catalog. Without a query, lists all components grouped by category. With a query, performs fuzzy search across names, descriptions, and tags.',
|
|
17
|
+
'Browse and search the Urbicon UI component catalog. Without a query, lists all components grouped by category. With a query, performs fuzzy search across names, descriptions, summaries, prop docs, variant values and tags.',
|
|
18
18
|
{
|
|
19
19
|
query: z
|
|
20
20
|
.string()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { isBooleanAxis } from '@urbicon-ui/design-engine/search';
|
|
2
3
|
import { z } from 'zod';
|
|
3
4
|
import { loadCatalog } from '../data/catalog-loader.js';
|
|
4
5
|
|
|
@@ -118,7 +119,7 @@ export function registerGetChecklistTool(server: McpServer): void {
|
|
|
118
119
|
md += `### ${comp.name}\n`;
|
|
119
120
|
if (comp.variants.length > 0) {
|
|
120
121
|
const key = comp.variants
|
|
121
|
-
.filter((v) => !
|
|
122
|
+
.filter((v) => !isBooleanAxis(v.values))
|
|
122
123
|
.map((v) => `\`${v.name}\`: ${v.values.join(' / ')}`)
|
|
123
124
|
.join(', ');
|
|
124
125
|
if (key) md += `- Variants: ${key}\n`;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { isBooleanAxis } from '@urbicon-ui/design-engine/search';
|
|
2
3
|
import { z } from 'zod';
|
|
3
4
|
import type { ComponentCatalogEntry } from '../data/catalog-loader.js';
|
|
4
5
|
import { loadCatalog } from '../data/catalog-loader.js';
|
|
@@ -91,13 +92,7 @@ function generateCompactView(entry: ComponentCatalogEntry, llmContent: string):
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
// Variants (if any meaningful ones exist beyond what's in keyPropTypes)
|
|
94
|
-
const meaningfulVariants = entry.variants.filter((v) =>
|
|
95
|
-
const sorted = [...v.values].sort();
|
|
96
|
-
return !(
|
|
97
|
-
(sorted.length === 1 && (sorted[0] === 'true' || sorted[0] === 'false')) ||
|
|
98
|
-
(sorted.length === 2 && sorted[0] === 'false' && sorted[1] === 'true')
|
|
99
|
-
);
|
|
100
|
-
});
|
|
95
|
+
const meaningfulVariants = entry.variants.filter((v) => !isBooleanAxis(v.values));
|
|
101
96
|
|
|
102
97
|
if (meaningfulVariants.length > 0) {
|
|
103
98
|
md += '## Variants\n\n';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { matchComponents } from '@urbicon-ui/design-engine/search';
|
|
2
|
+
import { isBooleanAxis, matchComponents } from '@urbicon-ui/design-engine/search';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import type { ComponentCatalogEntry } from '../data/catalog-loader.js';
|
|
5
5
|
import { loadCatalog } from '../data/catalog-loader.js';
|
|
@@ -166,13 +166,7 @@ export function registerSuggestImplementationTool(server: McpServer): void {
|
|
|
166
166
|
md += '## Components\n\n';
|
|
167
167
|
for (const comp of matched) {
|
|
168
168
|
const meaningfulVariants = comp.variants
|
|
169
|
-
.filter((v) =>
|
|
170
|
-
const sorted = [...v.values].sort();
|
|
171
|
-
return !(
|
|
172
|
-
(sorted.length === 1 && (sorted[0] === 'true' || sorted[0] === 'false')) ||
|
|
173
|
-
(sorted.length === 2 && sorted[0] === 'false' && sorted[1] === 'true')
|
|
174
|
-
);
|
|
175
|
-
})
|
|
169
|
+
.filter((v) => !isBooleanAxis(v.values))
|
|
176
170
|
.map((v) => {
|
|
177
171
|
const def = v.default ? ` (default: ${v.default})` : '';
|
|
178
172
|
return `${v.name}: ${v.values.join('/')}${def}`;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isBooleanAxis } from '@urbicon-ui/design-engine/search';
|
|
1
2
|
import type { ComponentCatalogEntry, RecipeEntry } from '../data/catalog-loader.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -119,14 +120,6 @@ export function formatCompactCatalog(
|
|
|
119
120
|
return md;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
|
-
function isBooleanVariant(values: string[]): boolean {
|
|
123
|
-
const sorted = [...values].sort();
|
|
124
|
-
return (
|
|
125
|
-
(sorted.length === 1 && (sorted[0] === 'true' || sorted[0] === 'false')) ||
|
|
126
|
-
(sorted.length === 2 && sorted[0] === 'false' && sorted[1] === 'true')
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
123
|
/**
|
|
131
124
|
* Format one catalog entry as a single markdown bullet: name, an origin-package
|
|
132
125
|
* tag for non-blocks components (so `Table` reads as `@urbicon-ui/table`), the
|
|
@@ -135,7 +128,7 @@ function isBooleanVariant(values: string[]): boolean {
|
|
|
135
128
|
*/
|
|
136
129
|
export function formatComponentLine(comp: ComponentCatalogEntry): string {
|
|
137
130
|
const variants = comp.variants
|
|
138
|
-
.filter((v) => !
|
|
131
|
+
.filter((v) => !isBooleanAxis(v.values))
|
|
139
132
|
.map((v) => `${v.name}: ${v.values.join('/')}`)
|
|
140
133
|
.join(' · ');
|
|
141
134
|
|