@idealyst/mcp-server 1.0.84
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 +202 -0
- package/dist/data/cli-commands.d.ts +2 -0
- package/dist/data/cli-commands.d.ts.map +1 -0
- package/dist/data/cli-commands.js +100 -0
- package/dist/data/cli-commands.js.map +1 -0
- package/dist/data/components/Accordion.d.ts +15 -0
- package/dist/data/components/Accordion.d.ts.map +1 -0
- package/dist/data/components/Accordion.js +112 -0
- package/dist/data/components/Accordion.js.map +1 -0
- package/dist/data/components/ActivityIndicator.d.ts +15 -0
- package/dist/data/components/ActivityIndicator.d.ts.map +1 -0
- package/dist/data/components/ActivityIndicator.js +82 -0
- package/dist/data/components/ActivityIndicator.js.map +1 -0
- package/dist/data/components/Alert.d.ts +15 -0
- package/dist/data/components/Alert.d.ts.map +1 -0
- package/dist/data/components/Alert.js +132 -0
- package/dist/data/components/Alert.js.map +1 -0
- package/dist/data/components/Avatar.d.ts +15 -0
- package/dist/data/components/Avatar.d.ts.map +1 -0
- package/dist/data/components/Avatar.js +93 -0
- package/dist/data/components/Avatar.js.map +1 -0
- package/dist/data/components/Badge.d.ts +15 -0
- package/dist/data/components/Badge.d.ts.map +1 -0
- package/dist/data/components/Badge.js +64 -0
- package/dist/data/components/Badge.js.map +1 -0
- package/dist/data/components/Breadcrumb.d.ts +15 -0
- package/dist/data/components/Breadcrumb.d.ts.map +1 -0
- package/dist/data/components/Breadcrumb.js +96 -0
- package/dist/data/components/Breadcrumb.js.map +1 -0
- package/dist/data/components/Button.d.ts +15 -0
- package/dist/data/components/Button.d.ts.map +1 -0
- package/dist/data/components/Button.js +87 -0
- package/dist/data/components/Button.js.map +1 -0
- package/dist/data/components/Card.d.ts +15 -0
- package/dist/data/components/Card.d.ts.map +1 -0
- package/dist/data/components/Card.js +67 -0
- package/dist/data/components/Card.js.map +1 -0
- package/dist/data/components/Checkbox.d.ts +15 -0
- package/dist/data/components/Checkbox.d.ts.map +1 -0
- package/dist/data/components/Checkbox.js +118 -0
- package/dist/data/components/Checkbox.js.map +1 -0
- package/dist/data/components/Chip.d.ts +15 -0
- package/dist/data/components/Chip.d.ts.map +1 -0
- package/dist/data/components/Chip.js +76 -0
- package/dist/data/components/Chip.js.map +1 -0
- package/dist/data/components/Dialog.d.ts +15 -0
- package/dist/data/components/Dialog.d.ts.map +1 -0
- package/dist/data/components/Dialog.js +137 -0
- package/dist/data/components/Dialog.js.map +1 -0
- package/dist/data/components/Divider.d.ts +15 -0
- package/dist/data/components/Divider.d.ts.map +1 -0
- package/dist/data/components/Divider.js +71 -0
- package/dist/data/components/Divider.js.map +1 -0
- package/dist/data/components/Icon.d.ts +15 -0
- package/dist/data/components/Icon.d.ts.map +1 -0
- package/dist/data/components/Icon.js +70 -0
- package/dist/data/components/Icon.js.map +1 -0
- package/dist/data/components/Image.d.ts +15 -0
- package/dist/data/components/Image.d.ts.map +1 -0
- package/dist/data/components/Image.js +122 -0
- package/dist/data/components/Image.js.map +1 -0
- package/dist/data/components/Input.d.ts +15 -0
- package/dist/data/components/Input.d.ts.map +1 -0
- package/dist/data/components/Input.js +109 -0
- package/dist/data/components/Input.js.map +1 -0
- package/dist/data/components/List.d.ts +15 -0
- package/dist/data/components/List.d.ts.map +1 -0
- package/dist/data/components/List.js +113 -0
- package/dist/data/components/List.js.map +1 -0
- package/dist/data/components/Menu.d.ts +15 -0
- package/dist/data/components/Menu.d.ts.map +1 -0
- package/dist/data/components/Menu.js +132 -0
- package/dist/data/components/Menu.js.map +1 -0
- package/dist/data/components/Popover.d.ts +15 -0
- package/dist/data/components/Popover.d.ts.map +1 -0
- package/dist/data/components/Popover.js +159 -0
- package/dist/data/components/Popover.js.map +1 -0
- package/dist/data/components/Pressable.d.ts +15 -0
- package/dist/data/components/Pressable.d.ts.map +1 -0
- package/dist/data/components/Pressable.js +125 -0
- package/dist/data/components/Pressable.js.map +1 -0
- package/dist/data/components/Progress.d.ts +15 -0
- package/dist/data/components/Progress.d.ts.map +1 -0
- package/dist/data/components/Progress.js +95 -0
- package/dist/data/components/Progress.js.map +1 -0
- package/dist/data/components/RadioButton.d.ts +15 -0
- package/dist/data/components/RadioButton.d.ts.map +1 -0
- package/dist/data/components/RadioButton.js +140 -0
- package/dist/data/components/RadioButton.js.map +1 -0
- package/dist/data/components/SVGImage.d.ts +15 -0
- package/dist/data/components/SVGImage.d.ts.map +1 -0
- package/dist/data/components/SVGImage.js +112 -0
- package/dist/data/components/SVGImage.js.map +1 -0
- package/dist/data/components/Screen.d.ts +15 -0
- package/dist/data/components/Screen.d.ts.map +1 -0
- package/dist/data/components/Screen.js +99 -0
- package/dist/data/components/Screen.js.map +1 -0
- package/dist/data/components/Select.d.ts +15 -0
- package/dist/data/components/Select.d.ts.map +1 -0
- package/dist/data/components/Select.js +146 -0
- package/dist/data/components/Select.js.map +1 -0
- package/dist/data/components/Skeleton.d.ts +15 -0
- package/dist/data/components/Skeleton.d.ts.map +1 -0
- package/dist/data/components/Skeleton.js +110 -0
- package/dist/data/components/Skeleton.js.map +1 -0
- package/dist/data/components/Slider.d.ts +15 -0
- package/dist/data/components/Slider.d.ts.map +1 -0
- package/dist/data/components/Slider.js +129 -0
- package/dist/data/components/Slider.js.map +1 -0
- package/dist/data/components/Switch.d.ts +15 -0
- package/dist/data/components/Switch.d.ts.map +1 -0
- package/dist/data/components/Switch.js +127 -0
- package/dist/data/components/Switch.js.map +1 -0
- package/dist/data/components/TabBar.d.ts +15 -0
- package/dist/data/components/TabBar.d.ts.map +1 -0
- package/dist/data/components/TabBar.js +145 -0
- package/dist/data/components/TabBar.js.map +1 -0
- package/dist/data/components/Table.d.ts +15 -0
- package/dist/data/components/Table.d.ts.map +1 -0
- package/dist/data/components/Table.js +151 -0
- package/dist/data/components/Table.js.map +1 -0
- package/dist/data/components/Tabs.d.ts +15 -0
- package/dist/data/components/Tabs.d.ts.map +1 -0
- package/dist/data/components/Tabs.js +150 -0
- package/dist/data/components/Tabs.js.map +1 -0
- package/dist/data/components/Text.d.ts +15 -0
- package/dist/data/components/Text.d.ts.map +1 -0
- package/dist/data/components/Text.js +85 -0
- package/dist/data/components/Text.js.map +1 -0
- package/dist/data/components/TextArea.d.ts +15 -0
- package/dist/data/components/TextArea.d.ts.map +1 -0
- package/dist/data/components/TextArea.js +155 -0
- package/dist/data/components/TextArea.js.map +1 -0
- package/dist/data/components/Tooltip.d.ts +15 -0
- package/dist/data/components/Tooltip.d.ts.map +1 -0
- package/dist/data/components/Tooltip.js +105 -0
- package/dist/data/components/Tooltip.js.map +1 -0
- package/dist/data/components/Video.d.ts +15 -0
- package/dist/data/components/Video.d.ts.map +1 -0
- package/dist/data/components/Video.js +168 -0
- package/dist/data/components/Video.js.map +1 -0
- package/dist/data/components/View.d.ts +15 -0
- package/dist/data/components/View.d.ts.map +1 -0
- package/dist/data/components/View.js +126 -0
- package/dist/data/components/View.js.map +1 -0
- package/dist/data/components/index.d.ts +37 -0
- package/dist/data/components/index.d.ts.map +1 -0
- package/dist/data/components/index.js +110 -0
- package/dist/data/components/index.js.map +1 -0
- package/dist/data/framework-guides.d.ts +2 -0
- package/dist/data/framework-guides.d.ts.map +1 -0
- package/dist/data/framework-guides.js +589 -0
- package/dist/data/framework-guides.js.map +1 -0
- package/dist/data/icon-guide.d.ts +2 -0
- package/dist/data/icon-guide.d.ts.map +1 -0
- package/dist/data/icon-guide.js +285 -0
- package/dist/data/icon-guide.js.map +1 -0
- package/dist/data/icons.json +7452 -0
- package/dist/data/navigation-guides.d.ts +2 -0
- package/dist/data/navigation-guides.d.ts.map +1 -0
- package/dist/data/navigation-guides.js +1196 -0
- package/dist/data/navigation-guides.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +422 -0
- package/dist/index.js.map +1 -0
- package/package.json +34 -0
- package/src/data/cli-commands.ts +103 -0
- package/src/data/components/Accordion.ts +106 -0
- package/src/data/components/ActivityIndicator.ts +82 -0
- package/src/data/components/Alert.ts +132 -0
- package/src/data/components/Avatar.ts +93 -0
- package/src/data/components/Badge.ts +63 -0
- package/src/data/components/Breadcrumb.ts +94 -0
- package/src/data/components/Button.ts +86 -0
- package/src/data/components/Card.ts +67 -0
- package/src/data/components/Checkbox.ts +117 -0
- package/src/data/components/Chip.ts +93 -0
- package/src/data/components/Dialog.ts +136 -0
- package/src/data/components/Divider.ts +70 -0
- package/src/data/components/Icon.ts +70 -0
- package/src/data/components/Image.ts +121 -0
- package/src/data/components/Input.ts +150 -0
- package/src/data/components/List.ts +103 -0
- package/src/data/components/Menu.ts +125 -0
- package/src/data/components/Popover.ts +159 -0
- package/src/data/components/Pressable.ts +123 -0
- package/src/data/components/Progress.ts +95 -0
- package/src/data/components/RadioButton.ts +130 -0
- package/src/data/components/SVGImage.ts +114 -0
- package/src/data/components/Screen.ts +103 -0
- package/src/data/components/Select.ts +140 -0
- package/src/data/components/Skeleton.ts +102 -0
- package/src/data/components/Slider.ts +150 -0
- package/src/data/components/Switch.ts +127 -0
- package/src/data/components/TabBar.ts +142 -0
- package/src/data/components/Table.ts +153 -0
- package/src/data/components/Tabs.ts +152 -0
- package/src/data/components/Text.ts +85 -0
- package/src/data/components/TextArea.ts +155 -0
- package/src/data/components/Tooltip.ts +105 -0
- package/src/data/components/Video.ts +168 -0
- package/src/data/components/View.ts +126 -0
- package/src/data/components/index.ts +109 -0
- package/src/data/framework-guides.ts +593 -0
- package/src/data/icon-guide.ts +284 -0
- package/src/data/icons.json +7452 -0
- package/src/data/navigation-guides.ts +1199 -0
- package/src/index.ts +473 -0
- package/test-client.js +86 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-guides.js","sourceRoot":"","sources":["../../src/data/navigation-guides.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,gCAAgC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyXxC;CACA,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { ListToolsRequestSchema, CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
import { components } from "./data/components/index.js";
|
|
6
|
+
import { cliCommands } from "./data/cli-commands.js";
|
|
7
|
+
import { frameworkGuides } from "./data/framework-guides.js";
|
|
8
|
+
import { navigationGuides } from "./data/navigation-guides.js";
|
|
9
|
+
import { iconGuide } from "./data/icon-guide.js";
|
|
10
|
+
import iconsData from "./data/icons.json" with { type: "json" };
|
|
11
|
+
const server = new Server({
|
|
12
|
+
name: "@idealyst/mcp-server",
|
|
13
|
+
version: "1.0.83",
|
|
14
|
+
}, {
|
|
15
|
+
capabilities: {
|
|
16
|
+
tools: {},
|
|
17
|
+
resources: {},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
// List all available tools
|
|
21
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
22
|
+
return {
|
|
23
|
+
tools: [
|
|
24
|
+
{
|
|
25
|
+
name: "list_components",
|
|
26
|
+
description: "List all available Idealyst components with brief descriptions",
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: {},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "get_component_docs",
|
|
34
|
+
description: "Get detailed documentation for a specific Idealyst component including props, usage, and examples",
|
|
35
|
+
inputSchema: {
|
|
36
|
+
type: "object",
|
|
37
|
+
properties: {
|
|
38
|
+
component: {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "The name of the component (e.g., 'Button', 'Card', 'Input')",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
required: ["component"],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "get_component_example",
|
|
48
|
+
description: "Get a code example for a specific Idealyst component",
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
component: {
|
|
53
|
+
type: "string",
|
|
54
|
+
description: "The name of the component",
|
|
55
|
+
},
|
|
56
|
+
example_type: {
|
|
57
|
+
type: "string",
|
|
58
|
+
description: "Type of example: 'basic', 'variants', 'with-icons', 'interactive'",
|
|
59
|
+
enum: ["basic", "variants", "with-icons", "interactive"],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
required: ["component"],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "get_cli_usage",
|
|
67
|
+
description: "Get information about Idealyst CLI commands and usage",
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: "object",
|
|
70
|
+
properties: {
|
|
71
|
+
command: {
|
|
72
|
+
type: "string",
|
|
73
|
+
description: "Specific CLI command to get info about (optional)",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "search_components",
|
|
80
|
+
description: "Search for components by name, category, or feature",
|
|
81
|
+
inputSchema: {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: {
|
|
84
|
+
query: {
|
|
85
|
+
type: "string",
|
|
86
|
+
description: "Search query",
|
|
87
|
+
},
|
|
88
|
+
category: {
|
|
89
|
+
type: "string",
|
|
90
|
+
description: "Filter by category: 'layout', 'form', 'display', 'navigation', 'overlay', 'data'",
|
|
91
|
+
enum: ["layout", "form", "display", "navigation", "overlay", "data"],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "search_icons",
|
|
98
|
+
description: "Search for Material Design Icons by name or keyword. Returns matching icon names from 7,447 available icons.",
|
|
99
|
+
inputSchema: {
|
|
100
|
+
type: "object",
|
|
101
|
+
properties: {
|
|
102
|
+
query: {
|
|
103
|
+
type: "string",
|
|
104
|
+
description: "Search term to find icons (e.g., 'home', 'user', 'arrow')",
|
|
105
|
+
},
|
|
106
|
+
limit: {
|
|
107
|
+
type: "number",
|
|
108
|
+
description: "Maximum number of results to return (default: 20)",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
required: ["query"],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
// Handle tool calls
|
|
118
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
119
|
+
const { name, arguments: args } = request.params;
|
|
120
|
+
switch (name) {
|
|
121
|
+
case "list_components": {
|
|
122
|
+
const componentList = Object.entries(components).map(([name, data]) => ({
|
|
123
|
+
name,
|
|
124
|
+
category: data.category,
|
|
125
|
+
description: data.description,
|
|
126
|
+
}));
|
|
127
|
+
return {
|
|
128
|
+
content: [
|
|
129
|
+
{
|
|
130
|
+
type: "text",
|
|
131
|
+
text: JSON.stringify(componentList, null, 2),
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
case "get_component_docs": {
|
|
137
|
+
const componentName = args?.component;
|
|
138
|
+
const component = components[componentName];
|
|
139
|
+
if (!component) {
|
|
140
|
+
return {
|
|
141
|
+
content: [
|
|
142
|
+
{
|
|
143
|
+
type: "text",
|
|
144
|
+
text: `Component "${componentName}" not found. Available components: ${Object.keys(components).join(", ")}`,
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
const docs = `# ${componentName}
|
|
150
|
+
|
|
151
|
+
${component.description}
|
|
152
|
+
|
|
153
|
+
## Category
|
|
154
|
+
${component.category}
|
|
155
|
+
|
|
156
|
+
## Props
|
|
157
|
+
${component.props}
|
|
158
|
+
|
|
159
|
+
## Usage Examples
|
|
160
|
+
${component.usage}
|
|
161
|
+
|
|
162
|
+
## Features
|
|
163
|
+
${component.features.map((f) => `- ${f}`).join("\n")}
|
|
164
|
+
|
|
165
|
+
## Best Practices
|
|
166
|
+
${component.bestPractices.map((bp) => `- ${bp}`).join("\n")}
|
|
167
|
+
`;
|
|
168
|
+
return {
|
|
169
|
+
content: [
|
|
170
|
+
{
|
|
171
|
+
type: "text",
|
|
172
|
+
text: docs,
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
case "get_component_example": {
|
|
178
|
+
const componentName = args?.component;
|
|
179
|
+
const exampleType = args?.example_type || "basic";
|
|
180
|
+
const component = components[componentName];
|
|
181
|
+
if (!component) {
|
|
182
|
+
return {
|
|
183
|
+
content: [
|
|
184
|
+
{
|
|
185
|
+
type: "text",
|
|
186
|
+
text: `Component "${componentName}" not found.`,
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
const example = component.examples[exampleType] || component.examples.basic;
|
|
192
|
+
return {
|
|
193
|
+
content: [
|
|
194
|
+
{
|
|
195
|
+
type: "text",
|
|
196
|
+
text: example,
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
case "get_cli_usage": {
|
|
202
|
+
const commandName = args?.command;
|
|
203
|
+
if (commandName) {
|
|
204
|
+
const command = cliCommands[commandName];
|
|
205
|
+
if (!command) {
|
|
206
|
+
return {
|
|
207
|
+
content: [
|
|
208
|
+
{
|
|
209
|
+
type: "text",
|
|
210
|
+
text: `Command "${commandName}" not found. Available commands: ${Object.keys(cliCommands).join(", ")}`,
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
content: [
|
|
217
|
+
{
|
|
218
|
+
type: "text",
|
|
219
|
+
text: `# ${commandName}
|
|
220
|
+
|
|
221
|
+
${command.description}
|
|
222
|
+
|
|
223
|
+
## Usage
|
|
224
|
+
\`\`\`bash
|
|
225
|
+
${command.usage}
|
|
226
|
+
\`\`\`
|
|
227
|
+
|
|
228
|
+
## Options
|
|
229
|
+
${command.options.map((opt) => `- \`${opt.flag}\`: ${opt.description}`).join("\n")}
|
|
230
|
+
|
|
231
|
+
## Examples
|
|
232
|
+
${command.examples.map((ex) => `\`\`\`bash\n${ex}\n\`\`\``).join("\n\n")}
|
|
233
|
+
`,
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
// Return all commands
|
|
239
|
+
const allCommands = Object.entries(cliCommands).map(([name, data]) => ({
|
|
240
|
+
name,
|
|
241
|
+
description: data.description,
|
|
242
|
+
usage: data.usage,
|
|
243
|
+
}));
|
|
244
|
+
return {
|
|
245
|
+
content: [
|
|
246
|
+
{
|
|
247
|
+
type: "text",
|
|
248
|
+
text: JSON.stringify(allCommands, null, 2),
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
case "search_components": {
|
|
254
|
+
const query = args?.query?.toLowerCase() || "";
|
|
255
|
+
const category = args?.category;
|
|
256
|
+
let results = Object.entries(components);
|
|
257
|
+
if (category) {
|
|
258
|
+
results = results.filter(([_, data]) => data.category === category);
|
|
259
|
+
}
|
|
260
|
+
if (query) {
|
|
261
|
+
results = results.filter(([name, data]) => name.toLowerCase().includes(query) ||
|
|
262
|
+
data.description.toLowerCase().includes(query) ||
|
|
263
|
+
data.features.some((f) => f.toLowerCase().includes(query)));
|
|
264
|
+
}
|
|
265
|
+
const resultList = results.map(([name, data]) => ({
|
|
266
|
+
name,
|
|
267
|
+
category: data.category,
|
|
268
|
+
description: data.description,
|
|
269
|
+
}));
|
|
270
|
+
return {
|
|
271
|
+
content: [
|
|
272
|
+
{
|
|
273
|
+
type: "text",
|
|
274
|
+
text: JSON.stringify(resultList, null, 2),
|
|
275
|
+
},
|
|
276
|
+
],
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
case "search_icons": {
|
|
280
|
+
const query = args?.query?.toLowerCase() || "";
|
|
281
|
+
const limit = args?.limit || 20;
|
|
282
|
+
if (!query) {
|
|
283
|
+
return {
|
|
284
|
+
content: [
|
|
285
|
+
{
|
|
286
|
+
type: "text",
|
|
287
|
+
text: "Please provide a search query.",
|
|
288
|
+
},
|
|
289
|
+
],
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
// Filter icons that match the query
|
|
293
|
+
const matchingIcons = iconsData.icons.filter((icon) => icon.toLowerCase().includes(query));
|
|
294
|
+
// Limit results
|
|
295
|
+
const limitedResults = matchingIcons.slice(0, limit);
|
|
296
|
+
const result = {
|
|
297
|
+
query,
|
|
298
|
+
total: iconsData.total,
|
|
299
|
+
matches: matchingIcons.length,
|
|
300
|
+
returned: limitedResults.length,
|
|
301
|
+
icons: limitedResults,
|
|
302
|
+
};
|
|
303
|
+
return {
|
|
304
|
+
content: [
|
|
305
|
+
{
|
|
306
|
+
type: "text",
|
|
307
|
+
text: JSON.stringify(result, null, 2),
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
default:
|
|
313
|
+
return {
|
|
314
|
+
content: [
|
|
315
|
+
{
|
|
316
|
+
type: "text",
|
|
317
|
+
text: `Unknown tool: ${name}`,
|
|
318
|
+
},
|
|
319
|
+
],
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
// List available resources
|
|
324
|
+
server.setRequestHandler(ListResourcesRequestSchema, async () => {
|
|
325
|
+
return {
|
|
326
|
+
resources: [
|
|
327
|
+
{
|
|
328
|
+
uri: "idealyst://framework/getting-started",
|
|
329
|
+
name: "Getting Started with Idealyst",
|
|
330
|
+
description: "Complete guide to setting up and using the Idealyst framework",
|
|
331
|
+
mimeType: "text/markdown",
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
uri: "idealyst://framework/components-overview",
|
|
335
|
+
name: "Components Overview",
|
|
336
|
+
description: "Overview of all available Idealyst components organized by category",
|
|
337
|
+
mimeType: "text/markdown",
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
uri: "idealyst://framework/theming",
|
|
341
|
+
name: "Theming Guide",
|
|
342
|
+
description: "Guide to customizing themes in Idealyst",
|
|
343
|
+
mimeType: "text/markdown",
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
uri: "idealyst://framework/cli",
|
|
347
|
+
name: "CLI Reference",
|
|
348
|
+
description: "Complete reference for the Idealyst CLI",
|
|
349
|
+
mimeType: "text/markdown",
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
uri: "idealyst://navigation/overview",
|
|
353
|
+
name: "Navigation System Overview",
|
|
354
|
+
description: "Overview of the Idealyst navigation system for cross-platform routing",
|
|
355
|
+
mimeType: "text/markdown",
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
uri: "idealyst://navigation/route-configuration",
|
|
359
|
+
name: "Route Configuration",
|
|
360
|
+
description: "Learn how to define and structure routes in Idealyst",
|
|
361
|
+
mimeType: "text/markdown",
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
uri: "idealyst://navigation/navigator-types",
|
|
365
|
+
name: "Navigator Types",
|
|
366
|
+
description: "Guide to stack, tab, drawer, and modal navigators",
|
|
367
|
+
mimeType: "text/markdown",
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
uri: "idealyst://navigation/custom-layouts",
|
|
371
|
+
name: "Custom Layouts (Web)",
|
|
372
|
+
description: "Creating custom layouts with headers and sidebars for web applications",
|
|
373
|
+
mimeType: "text/markdown",
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
uri: "idealyst://navigation/use-navigator",
|
|
377
|
+
name: "useNavigator Hook",
|
|
378
|
+
description: "Complete reference for the useNavigator hook API",
|
|
379
|
+
mimeType: "text/markdown",
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
uri: "idealyst://icons/reference",
|
|
383
|
+
name: "Icon Reference Guide",
|
|
384
|
+
description: "Complete guide to Material Design Icons with 7,447 available icons, common icons by category, and usage examples",
|
|
385
|
+
mimeType: "text/markdown",
|
|
386
|
+
},
|
|
387
|
+
],
|
|
388
|
+
};
|
|
389
|
+
});
|
|
390
|
+
// Handle resource reads
|
|
391
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
392
|
+
const { uri } = request.params;
|
|
393
|
+
// Check framework guides first, then navigation guides, then icon guide
|
|
394
|
+
let guide = frameworkGuides[uri] || navigationGuides[uri];
|
|
395
|
+
// Handle icon reference
|
|
396
|
+
if (uri === "idealyst://icons/reference") {
|
|
397
|
+
guide = iconGuide;
|
|
398
|
+
}
|
|
399
|
+
if (!guide) {
|
|
400
|
+
throw new Error(`Resource not found: ${uri}`);
|
|
401
|
+
}
|
|
402
|
+
return {
|
|
403
|
+
contents: [
|
|
404
|
+
{
|
|
405
|
+
uri,
|
|
406
|
+
mimeType: "text/markdown",
|
|
407
|
+
text: guide,
|
|
408
|
+
},
|
|
409
|
+
],
|
|
410
|
+
};
|
|
411
|
+
});
|
|
412
|
+
// Start the server
|
|
413
|
+
async function main() {
|
|
414
|
+
const transport = new StdioServerTransport();
|
|
415
|
+
await server.connect(transport);
|
|
416
|
+
console.error("Idealyst MCP Server running on stdio");
|
|
417
|
+
}
|
|
418
|
+
main().catch((error) => {
|
|
419
|
+
console.error("Fatal error:", error);
|
|
420
|
+
process.exit(1);
|
|
421
|
+
});
|
|
422
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,SAAS,MAAM,mBAAmB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEhE,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;IACE,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,QAAQ;CAClB,EACD;IACE,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE;QACT,SAAS,EAAE,EAAE;KACd;CACF,CACF,CAAC;AAEF,2BAA2B;AAC3B,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;IAC1D,OAAO;QACL,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EAAE,gEAAgE;gBAC7E,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE,EAAE;iBACf;aACF;YACD;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,WAA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AC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@idealyst/mcp-server",
|
|
3
|
+
"version": "1.0.84",
|
|
4
|
+
"description": "MCP server providing documentation and examples for the Idealyst framework",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"idealyst-mcp": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc && chmod +x dist/index.js",
|
|
12
|
+
"dev": "tsc --watch",
|
|
13
|
+
"start": "node dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"idealyst",
|
|
20
|
+
"mcp",
|
|
21
|
+
"model-context-protocol",
|
|
22
|
+
"documentation",
|
|
23
|
+
"framework"
|
|
24
|
+
],
|
|
25
|
+
"author": "Idealyst",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@modelcontextprotocol/sdk": "^1.0.4"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "^20.0.0",
|
|
32
|
+
"typescript": "^5.0.0"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export const cliCommands: Record<string, any> = {
|
|
2
|
+
init: {
|
|
3
|
+
description: "Initialize a new Idealyst workspace with monorepo structure",
|
|
4
|
+
usage: "idealyst init <workspace-name> [options]",
|
|
5
|
+
options: [
|
|
6
|
+
{
|
|
7
|
+
flag: "workspace-name",
|
|
8
|
+
description: "Name for the new workspace (required)",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
flag: "--git",
|
|
12
|
+
description: "Initialize git repository (default: true)",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
flag: "--install",
|
|
16
|
+
description: "Install dependencies after creation (default: true)",
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
examples: [
|
|
20
|
+
"idealyst init my-app",
|
|
21
|
+
"idealyst init my-company-workspace --no-git",
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
create: {
|
|
26
|
+
description: "Create a new package within the Idealyst workspace",
|
|
27
|
+
usage: "idealyst create <name> --type <type> [options]",
|
|
28
|
+
options: [
|
|
29
|
+
{
|
|
30
|
+
flag: "name",
|
|
31
|
+
description: "Name for the new package (required)",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
flag: "--type",
|
|
35
|
+
description: "Package type: web | native | api | database | shared (required)",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
flag: "--app-name",
|
|
39
|
+
description: "Display name for native app (required for native type)",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
flag: "--with-trpc",
|
|
43
|
+
description: "Include tRPC setup (for web/native)",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
flag: "--no-trpc",
|
|
47
|
+
description: "Exclude tRPC setup (for web/native)",
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
examples: [
|
|
51
|
+
"idealyst create web --type web --with-trpc",
|
|
52
|
+
"idealyst create mobile --type native --app-name \"My App\" --with-trpc",
|
|
53
|
+
"idealyst create api --type api",
|
|
54
|
+
"idealyst create database --type database",
|
|
55
|
+
"idealyst create shared --type shared",
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
dev: {
|
|
60
|
+
description: "Start development server for a package",
|
|
61
|
+
usage: "cd packages/<name> && yarn dev",
|
|
62
|
+
options: [
|
|
63
|
+
{
|
|
64
|
+
flag: "--port",
|
|
65
|
+
description: "Port number for dev server (web only)",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
examples: [
|
|
69
|
+
"cd packages/web && yarn dev",
|
|
70
|
+
"cd packages/native && yarn dev",
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
build: {
|
|
75
|
+
description: "Build a package for production",
|
|
76
|
+
usage: "cd packages/<name> && yarn build",
|
|
77
|
+
options: [],
|
|
78
|
+
examples: [
|
|
79
|
+
"cd packages/web && yarn build",
|
|
80
|
+
"cd packages/api && yarn build",
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
test: {
|
|
85
|
+
description: "Run tests for packages",
|
|
86
|
+
usage: "yarn test [options]",
|
|
87
|
+
options: [
|
|
88
|
+
{
|
|
89
|
+
flag: "--watch",
|
|
90
|
+
description: "Run tests in watch mode",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
flag: "--coverage",
|
|
94
|
+
description: "Generate coverage report",
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
examples: [
|
|
98
|
+
"yarn test",
|
|
99
|
+
"yarn test:watch",
|
|
100
|
+
"yarn test:coverage",
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
};
|