@fruit-labs/design-mcp 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 +1 -1
- package/package.json +9 -1
- package/src/core.js +3 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Read-only MCP server for [Fruit Design](https://design.fruitlabs.online). It fet
|
|
|
8
8
|
|
|
9
9
|
Or use the remote server: `https://design.fruitlabs.online/mcp`.
|
|
10
10
|
|
|
11
|
-
Tools: `get_guide`, `list_components`, `search_components`, `get_component`, `get_tokens`, `get_changelog`.
|
|
11
|
+
Tools: `get_guide`, `list_components`, `search_components`, `get_component`, `get_tokens`, `get_custom_styles`, `get_changelog`.
|
|
12
12
|
|
|
13
13
|
## Updates
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fruit-labs/design-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "MCP server for Fruit Design: search components, read props, examples and tokens.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Fruit Labs",
|
|
@@ -35,6 +35,14 @@
|
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@modelcontextprotocol/sdk": "^1"
|
|
37
37
|
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"mcp",
|
|
40
|
+
"model-context-protocol",
|
|
41
|
+
"design-system",
|
|
42
|
+
"react",
|
|
43
|
+
"ai-agents",
|
|
44
|
+
"fruit-design"
|
|
45
|
+
],
|
|
38
46
|
"scripts": {
|
|
39
47
|
"test": "node --test"
|
|
40
48
|
}
|
package/src/core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Minimal MCP (JSON-RPC 2.0) for read-only docs tools. `load(path)` returns the parsed JSON the site publishes.
|
|
2
|
-
export const VERSION = '0.
|
|
2
|
+
export const VERSION = '0.2.0';
|
|
3
3
|
const PROTOCOLS = ['2025-11-25', '2025-06-18', '2025-03-26', '2024-11-05'];
|
|
4
4
|
const SITE = 'https://design.fruitlabs.online';
|
|
5
5
|
|
|
@@ -12,6 +12,7 @@ export const tools = [
|
|
|
12
12
|
{ name: 'search_components', description: 'Find Fruit Design components by name or purpose.', inputSchema: schema({ query: str('What you need, e.g. "date" or "chat input"') }, ['query']), annotations: readOnly },
|
|
13
13
|
{ name: 'get_component', description: 'Guidelines, props, example code and install command for one component.', inputSchema: schema({ name: str('Component name or slug, e.g. DatePicker') }, ['name']), annotations: readOnly },
|
|
14
14
|
{ name: 'get_tokens', description: 'Fruit Design colour, type, spacing and radius tokens as JSON.', inputSchema: schema(), annotations: readOnly },
|
|
15
|
+
{ name: 'get_custom_styles', description: 'How to change border radius, colours, fonts and shadows with CSS variables.', inputSchema: schema(), annotations: readOnly },
|
|
15
16
|
{ name: 'get_changelog', description: 'Latest Fruit Design version and what changed. Compare with the installed version before updating.', inputSchema: schema(), annotations: readOnly },
|
|
16
17
|
{ name: 'get_guide', description: 'How to install Fruit Design and the rules for using it.', inputSchema: schema(), annotations: readOnly },
|
|
17
18
|
];
|
|
@@ -21,6 +22,7 @@ const norm = (s) => String(s).toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
|
21
22
|
|
|
22
23
|
async function call(name, args, load) {
|
|
23
24
|
if (name === 'get_guide') return (await load('guide.json')).guide;
|
|
25
|
+
if (name === 'get_custom_styles') return (await load('custom-styles.json')).guide;
|
|
24
26
|
if (name === 'get_changelog') {
|
|
25
27
|
const { version, changelog } = await load('version.json');
|
|
26
28
|
return `Latest version: ${version}\n\n${changelog}`;
|