@idealyst/mcp-server 1.0.86 → 1.0.88

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.
Files changed (205) hide show
  1. package/ARCHITECTURE.md +313 -0
  2. package/README.md +292 -104
  3. package/TYPE-SYSTEM.md +397 -0
  4. package/dist/index.js +170 -1
  5. package/examples/components/Accordion.examples.tsx +147 -0
  6. package/examples/components/ActivityIndicator.examples.tsx +350 -0
  7. package/examples/components/Alert.examples.tsx +335 -0
  8. package/examples/components/Avatar.examples.tsx +188 -0
  9. package/examples/components/Badge.examples.tsx +242 -0
  10. package/examples/components/Breadcrumb.examples.tsx +303 -0
  11. package/examples/components/Button.examples.tsx +113 -0
  12. package/examples/components/Card.examples.tsx +131 -0
  13. package/examples/components/Checkbox.examples.tsx +195 -0
  14. package/examples/components/Chip.examples.tsx +87 -0
  15. package/examples/components/Dialog.examples.tsx +344 -0
  16. package/examples/components/Divider.examples.tsx +258 -0
  17. package/examples/components/Icon.examples.tsx +202 -0
  18. package/examples/components/Input.examples.tsx +205 -0
  19. package/examples/components/Menu.examples.tsx +321 -0
  20. package/examples/components/Popover.examples.tsx +439 -0
  21. package/examples/components/Progress.examples.tsx +340 -0
  22. package/examples/components/RadioButton.examples.tsx +443 -0
  23. package/examples/components/Screen.examples.tsx +347 -0
  24. package/examples/components/Select.examples.tsx +279 -0
  25. package/examples/components/Skeleton.examples.tsx +278 -0
  26. package/examples/components/Slider.examples.tsx +249 -0
  27. package/examples/components/Switch.examples.tsx +94 -0
  28. package/examples/components/TabBar.examples.tsx +356 -0
  29. package/examples/components/Text.examples.tsx +177 -0
  30. package/examples/components/TextArea.examples.tsx +203 -0
  31. package/examples/components/Tooltip.examples.tsx +318 -0
  32. package/examples/components/View.examples.tsx +307 -0
  33. package/package.json +15 -2
  34. package/scripts/extract-types.ts +71 -0
  35. package/scripts/type-extractor.ts +286 -0
  36. package/scripts/validate-examples.ts +142 -0
  37. package/src/data/components/Icon.ts +1 -1
  38. package/src/data/components/index.ts +2 -0
  39. package/src/index.ts +181 -1
  40. package/src/tools/get-types.ts +169 -0
  41. package/tsconfig.examples.json +14 -0
  42. package/dist/data/cli-commands.d.ts +0 -2
  43. package/dist/data/cli-commands.d.ts.map +0 -1
  44. package/dist/data/cli-commands.js +0 -100
  45. package/dist/data/cli-commands.js.map +0 -1
  46. package/dist/data/components/Accordion.d.ts +0 -15
  47. package/dist/data/components/Accordion.d.ts.map +0 -1
  48. package/dist/data/components/Accordion.js +0 -112
  49. package/dist/data/components/Accordion.js.map +0 -1
  50. package/dist/data/components/ActivityIndicator.d.ts +0 -15
  51. package/dist/data/components/ActivityIndicator.d.ts.map +0 -1
  52. package/dist/data/components/ActivityIndicator.js +0 -82
  53. package/dist/data/components/ActivityIndicator.js.map +0 -1
  54. package/dist/data/components/Alert.d.ts +0 -15
  55. package/dist/data/components/Alert.d.ts.map +0 -1
  56. package/dist/data/components/Alert.js +0 -132
  57. package/dist/data/components/Alert.js.map +0 -1
  58. package/dist/data/components/Avatar.d.ts +0 -15
  59. package/dist/data/components/Avatar.d.ts.map +0 -1
  60. package/dist/data/components/Avatar.js +0 -93
  61. package/dist/data/components/Avatar.js.map +0 -1
  62. package/dist/data/components/Badge.d.ts +0 -15
  63. package/dist/data/components/Badge.d.ts.map +0 -1
  64. package/dist/data/components/Badge.js +0 -64
  65. package/dist/data/components/Badge.js.map +0 -1
  66. package/dist/data/components/Breadcrumb.d.ts +0 -15
  67. package/dist/data/components/Breadcrumb.d.ts.map +0 -1
  68. package/dist/data/components/Breadcrumb.js +0 -96
  69. package/dist/data/components/Breadcrumb.js.map +0 -1
  70. package/dist/data/components/Button.d.ts +0 -15
  71. package/dist/data/components/Button.d.ts.map +0 -1
  72. package/dist/data/components/Button.js +0 -87
  73. package/dist/data/components/Button.js.map +0 -1
  74. package/dist/data/components/Card.d.ts +0 -15
  75. package/dist/data/components/Card.d.ts.map +0 -1
  76. package/dist/data/components/Card.js +0 -67
  77. package/dist/data/components/Card.js.map +0 -1
  78. package/dist/data/components/Checkbox.d.ts +0 -15
  79. package/dist/data/components/Checkbox.d.ts.map +0 -1
  80. package/dist/data/components/Checkbox.js +0 -118
  81. package/dist/data/components/Checkbox.js.map +0 -1
  82. package/dist/data/components/Chip.d.ts +0 -15
  83. package/dist/data/components/Chip.d.ts.map +0 -1
  84. package/dist/data/components/Chip.js +0 -76
  85. package/dist/data/components/Chip.js.map +0 -1
  86. package/dist/data/components/Dialog.d.ts +0 -15
  87. package/dist/data/components/Dialog.d.ts.map +0 -1
  88. package/dist/data/components/Dialog.js +0 -137
  89. package/dist/data/components/Dialog.js.map +0 -1
  90. package/dist/data/components/Divider.d.ts +0 -15
  91. package/dist/data/components/Divider.d.ts.map +0 -1
  92. package/dist/data/components/Divider.js +0 -71
  93. package/dist/data/components/Divider.js.map +0 -1
  94. package/dist/data/components/Icon.d.ts +0 -15
  95. package/dist/data/components/Icon.d.ts.map +0 -1
  96. package/dist/data/components/Icon.js +0 -70
  97. package/dist/data/components/Icon.js.map +0 -1
  98. package/dist/data/components/Image.d.ts +0 -15
  99. package/dist/data/components/Image.d.ts.map +0 -1
  100. package/dist/data/components/Image.js +0 -122
  101. package/dist/data/components/Image.js.map +0 -1
  102. package/dist/data/components/Input.d.ts +0 -15
  103. package/dist/data/components/Input.d.ts.map +0 -1
  104. package/dist/data/components/Input.js +0 -109
  105. package/dist/data/components/Input.js.map +0 -1
  106. package/dist/data/components/List.d.ts +0 -15
  107. package/dist/data/components/List.d.ts.map +0 -1
  108. package/dist/data/components/List.js +0 -113
  109. package/dist/data/components/List.js.map +0 -1
  110. package/dist/data/components/Menu.d.ts +0 -15
  111. package/dist/data/components/Menu.d.ts.map +0 -1
  112. package/dist/data/components/Menu.js +0 -132
  113. package/dist/data/components/Menu.js.map +0 -1
  114. package/dist/data/components/Popover.d.ts +0 -15
  115. package/dist/data/components/Popover.d.ts.map +0 -1
  116. package/dist/data/components/Popover.js +0 -159
  117. package/dist/data/components/Popover.js.map +0 -1
  118. package/dist/data/components/Pressable.d.ts +0 -15
  119. package/dist/data/components/Pressable.d.ts.map +0 -1
  120. package/dist/data/components/Pressable.js +0 -125
  121. package/dist/data/components/Pressable.js.map +0 -1
  122. package/dist/data/components/Progress.d.ts +0 -15
  123. package/dist/data/components/Progress.d.ts.map +0 -1
  124. package/dist/data/components/Progress.js +0 -95
  125. package/dist/data/components/Progress.js.map +0 -1
  126. package/dist/data/components/RadioButton.d.ts +0 -15
  127. package/dist/data/components/RadioButton.d.ts.map +0 -1
  128. package/dist/data/components/RadioButton.js +0 -140
  129. package/dist/data/components/RadioButton.js.map +0 -1
  130. package/dist/data/components/SVGImage.d.ts +0 -15
  131. package/dist/data/components/SVGImage.d.ts.map +0 -1
  132. package/dist/data/components/SVGImage.js +0 -112
  133. package/dist/data/components/SVGImage.js.map +0 -1
  134. package/dist/data/components/Screen.d.ts +0 -15
  135. package/dist/data/components/Screen.d.ts.map +0 -1
  136. package/dist/data/components/Screen.js +0 -99
  137. package/dist/data/components/Screen.js.map +0 -1
  138. package/dist/data/components/Select.d.ts +0 -15
  139. package/dist/data/components/Select.d.ts.map +0 -1
  140. package/dist/data/components/Select.js +0 -146
  141. package/dist/data/components/Select.js.map +0 -1
  142. package/dist/data/components/Skeleton.d.ts +0 -15
  143. package/dist/data/components/Skeleton.d.ts.map +0 -1
  144. package/dist/data/components/Skeleton.js +0 -110
  145. package/dist/data/components/Skeleton.js.map +0 -1
  146. package/dist/data/components/Slider.d.ts +0 -15
  147. package/dist/data/components/Slider.d.ts.map +0 -1
  148. package/dist/data/components/Slider.js +0 -129
  149. package/dist/data/components/Slider.js.map +0 -1
  150. package/dist/data/components/Switch.d.ts +0 -15
  151. package/dist/data/components/Switch.d.ts.map +0 -1
  152. package/dist/data/components/Switch.js +0 -127
  153. package/dist/data/components/Switch.js.map +0 -1
  154. package/dist/data/components/TabBar.d.ts +0 -15
  155. package/dist/data/components/TabBar.d.ts.map +0 -1
  156. package/dist/data/components/TabBar.js +0 -145
  157. package/dist/data/components/TabBar.js.map +0 -1
  158. package/dist/data/components/Table.d.ts +0 -15
  159. package/dist/data/components/Table.d.ts.map +0 -1
  160. package/dist/data/components/Table.js +0 -151
  161. package/dist/data/components/Table.js.map +0 -1
  162. package/dist/data/components/Tabs.d.ts +0 -15
  163. package/dist/data/components/Tabs.d.ts.map +0 -1
  164. package/dist/data/components/Tabs.js +0 -150
  165. package/dist/data/components/Tabs.js.map +0 -1
  166. package/dist/data/components/Text.d.ts +0 -15
  167. package/dist/data/components/Text.d.ts.map +0 -1
  168. package/dist/data/components/Text.js +0 -85
  169. package/dist/data/components/Text.js.map +0 -1
  170. package/dist/data/components/TextArea.d.ts +0 -15
  171. package/dist/data/components/TextArea.d.ts.map +0 -1
  172. package/dist/data/components/TextArea.js +0 -155
  173. package/dist/data/components/TextArea.js.map +0 -1
  174. package/dist/data/components/Tooltip.d.ts +0 -15
  175. package/dist/data/components/Tooltip.d.ts.map +0 -1
  176. package/dist/data/components/Tooltip.js +0 -105
  177. package/dist/data/components/Tooltip.js.map +0 -1
  178. package/dist/data/components/Video.d.ts +0 -15
  179. package/dist/data/components/Video.d.ts.map +0 -1
  180. package/dist/data/components/Video.js +0 -168
  181. package/dist/data/components/Video.js.map +0 -1
  182. package/dist/data/components/View.d.ts +0 -15
  183. package/dist/data/components/View.d.ts.map +0 -1
  184. package/dist/data/components/View.js +0 -126
  185. package/dist/data/components/View.js.map +0 -1
  186. package/dist/data/components/index.d.ts +0 -37
  187. package/dist/data/components/index.d.ts.map +0 -1
  188. package/dist/data/components/index.js +0 -110
  189. package/dist/data/components/index.js.map +0 -1
  190. package/dist/data/framework-guides.d.ts +0 -2
  191. package/dist/data/framework-guides.d.ts.map +0 -1
  192. package/dist/data/framework-guides.js +0 -589
  193. package/dist/data/framework-guides.js.map +0 -1
  194. package/dist/data/icon-guide.d.ts +0 -2
  195. package/dist/data/icon-guide.d.ts.map +0 -1
  196. package/dist/data/icon-guide.js +0 -285
  197. package/dist/data/icon-guide.js.map +0 -1
  198. package/dist/data/icons.json +0 -7452
  199. package/dist/data/navigation-guides.d.ts +0 -2
  200. package/dist/data/navigation-guides.d.ts.map +0 -1
  201. package/dist/data/navigation-guides.js +0 -1196
  202. package/dist/data/navigation-guides.js.map +0 -1
  203. package/dist/index.d.ts +0 -3
  204. package/dist/index.d.ts.map +0 -1
  205. package/dist/index.js.map +0 -1
package/README.md CHANGED
@@ -1,33 +1,68 @@
1
1
  # @idealyst/mcp-server
2
2
 
3
- Model Context Protocol (MCP) server providing documentation, examples, and usage instructions for the Idealyst framework.
3
+ > Model Context Protocol server for the Idealyst Framework
4
4
 
5
- ## What is this?
5
+ Provides AI assistants like Claude Code with access to accurate, type-checked documentation and examples for Idealyst components, theme, and navigation.
6
6
 
7
- This MCP server allows AI assistants (like Claude) to access comprehensive documentation about the Idealyst framework, including:
7
+ ## Features
8
8
 
9
- - Component documentation and examples
10
- - CLI usage instructions
11
- - Framework setup guides
12
- - Best practices and patterns
9
+ - 🔍 **Type-Driven Documentation**: Extract TypeScript types directly from source packages
10
+ - **Validated Examples**: All examples are type-checked and guaranteed to compile
11
+ - 🎨 **Theme Type Access**: Get Size, Intent, Color, and other theme types
12
+ - 🧭 **Navigation Types**: Access to routing and navigator type definitions
13
+ - 🔎 **Icon Search**: Search through 7,447 Material Design Icons
14
+ - 📚 **Component Docs**: Detailed documentation with props, usage, and best practices
13
15
 
14
16
  ## Installation
15
17
 
16
- ```bash
17
- # From the Idealyst monorepo
18
- cd packages/mcp-server
19
- yarn install
20
- yarn build
18
+ ### Global Installation
21
19
 
22
- # Or install globally
20
+ ```bash
23
21
  npm install -g @idealyst/mcp-server
24
22
  ```
25
23
 
26
- ## Usage with Claude Desktop
24
+ ### Project Installation
25
+
26
+ ```bash
27
+ npm install --save-dev @idealyst/mcp-server
28
+ # or
29
+ yarn add -D @idealyst/mcp-server
30
+ ```
31
+
32
+ ## Usage with Claude Code
33
+
34
+ ### Project-Level Configuration
35
+
36
+ Add to your project's `.mcp.json`:
37
+
38
+ ```json
39
+ {
40
+ "mcpServers": {
41
+ "idealyst": {
42
+ "command": "npx",
43
+ "args": ["@idealyst/mcp-server"]
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ ### User-Level Configuration
50
+
51
+ Add to `~/.config/claude-code/mcp_config.json`:
52
+
53
+ ```json
54
+ {
55
+ "mcpServers": {
56
+ "idealyst": {
57
+ "command": "idealyst-mcp"
58
+ }
59
+ }
60
+ }
61
+ ```
27
62
 
28
- Add this server to your Claude Desktop configuration:
63
+ ### Claude Desktop Configuration
29
64
 
30
- ### macOS/Linux
65
+ #### macOS/Linux
31
66
 
32
67
  Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
33
68
 
@@ -35,16 +70,14 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
35
70
  {
36
71
  "mcpServers": {
37
72
  "idealyst": {
38
- "command": "node",
39
- "args": [
40
- "/absolute/path/to/idealyst-framework/packages/mcp-server/dist/index.js"
41
- ]
73
+ "command": "npx",
74
+ "args": ["@idealyst/mcp-server"]
42
75
  }
43
76
  }
44
77
  }
45
78
  ```
46
79
 
47
- ### Windows
80
+ #### Windows
48
81
 
49
82
  Edit `%APPDATA%\Claude\claude_desktop_config.json`:
50
83
 
@@ -52,151 +85,306 @@ Edit `%APPDATA%\Claude\claude_desktop_config.json`:
52
85
  {
53
86
  "mcpServers": {
54
87
  "idealyst": {
55
- "command": "node",
56
- "args": [
57
- "C:\\path\\to\\idealyst-framework\\packages\\mcp-server\\dist\\index.js"
58
- ]
88
+ "command": "npx",
89
+ "args": ["@idealyst/mcp-server"]
59
90
  }
60
91
  }
61
92
  }
62
93
  ```
63
94
 
64
- After adding the configuration, restart Claude Desktop.
65
-
66
95
  ## Available Tools
67
96
 
68
- ### list_components
97
+ ### Component Tools
69
98
 
70
- List all available Idealyst components with brief descriptions.
99
+ #### `get_component_types`
71
100
 
72
- **Example:**
73
- ```
74
- List all Idealyst components
101
+ Get TypeScript type definitions for a component.
102
+
103
+ ```typescript
104
+ {
105
+ component: "Button",
106
+ format: "both" // "typescript" | "json" | "both"
107
+ }
75
108
  ```
76
109
 
77
- ### get_component_docs
110
+ Returns the actual TypeScript interface and/or parsed JSON schema with prop details.
78
111
 
79
- Get detailed documentation for a specific component including props, usage, and examples.
112
+ #### `get_component_docs`
80
113
 
81
- **Parameters:**
82
- - `component` (string): Component name (e.g., 'Button', 'Card', 'Input')
114
+ Get comprehensive documentation for a component including props, usage, features, and best practices.
83
115
 
84
- **Example:**
85
- ```
86
- Get documentation for the Button component
116
+ ```typescript
117
+ {
118
+ component: "Button"
119
+ }
87
120
  ```
88
121
 
89
- ### get_component_example
122
+ #### `get_component_example`
90
123
 
91
- Get code examples for a specific component.
124
+ Get a specific example type for a component.
92
125
 
93
- **Parameters:**
94
- - `component` (string): Component name
95
- - `example_type` (optional): 'basic', 'variants', 'with-icons', or 'interactive'
126
+ ```typescript
127
+ {
128
+ component: "Button",
129
+ example_type: "basic" // "basic" | "variants" | "with-icons" | "interactive"
130
+ }
131
+ ```
96
132
 
97
- **Example:**
133
+ #### `get_component_examples_ts`
134
+
135
+ Get validated TypeScript examples that are guaranteed to compile.
136
+
137
+ ```typescript
138
+ {
139
+ component: "Button"
140
+ }
98
141
  ```
99
- Show me an interactive example of the Dialog component
142
+
143
+ #### `list_components`
144
+
145
+ List all available Idealyst components with descriptions.
146
+
147
+ #### `search_components`
148
+
149
+ Search for components by name, category, or feature.
150
+
151
+ ```typescript
152
+ {
153
+ query: "form",
154
+ category: "form" // optional: "layout" | "form" | "display" | "navigation" | "overlay" | "data"
155
+ }
100
156
  ```
101
157
 
102
- ### get_cli_usage
158
+ ### Theme Tools
103
159
 
104
- Get information about Idealyst CLI commands.
160
+ #### `get_theme_types`
105
161
 
106
- **Parameters:**
107
- - `command` (optional): Specific CLI command
162
+ Get all theme type definitions (Size, Intent, Color, etc.).
108
163
 
109
- **Example:**
164
+ ```typescript
165
+ {
166
+ format: "json" // "typescript" | "json" | "both"
167
+ }
110
168
  ```
111
- How do I use the Idealyst CLI to create a new web app?
169
+
170
+ ### Navigation Tools
171
+
172
+ #### `get_navigation_types`
173
+
174
+ Get navigation type definitions for routers, navigators, and screens.
175
+
176
+ ```typescript
177
+ {
178
+ format: "typescript" // "typescript" | "json" | "both"
179
+ }
112
180
  ```
113
181
 
114
- ### search_components
182
+ ### Icon Tools
115
183
 
116
- Search for components by name, category, or feature.
184
+ #### `search_icons`
117
185
 
118
- **Parameters:**
119
- - `query` (optional): Search query
120
- - `category` (optional): Filter by category ('layout', 'form', 'display', 'navigation', 'overlay', 'data')
186
+ Search through 7,447 Material Design Icons.
121
187
 
122
- **Example:**
188
+ ```typescript
189
+ {
190
+ query: "arrow",
191
+ limit: 20 // optional, default: 20
192
+ }
123
193
  ```
124
- Search for form components in Idealyst
194
+
195
+ ### CLI Tools
196
+
197
+ #### `get_cli_usage`
198
+
199
+ Get information about Idealyst CLI commands.
200
+
201
+ ```typescript
202
+ {
203
+ command: "init" // optional, omit for all commands
204
+ }
125
205
  ```
126
206
 
127
- ## Available Resources
207
+ ## Type Extraction System
128
208
 
129
- The server also provides framework guides as resources:
209
+ This MCP server uses a unique **type-driven architecture** to ensure documentation accuracy:
130
210
 
131
- - **Getting Started**: Complete setup guide
132
- - **Components Overview**: All available components organized by category
133
- - **Theming Guide**: Customizing themes
134
- - **CLI Reference**: Complete CLI documentation
211
+ 1. **Extract Types**: Parse TypeScript from `@idealyst/components`, `@idealyst/theme`, `@idealyst/navigation`
212
+ 2. **Validate Examples**: Type-check all examples against extracted types
213
+ 3. **Serve Types**: Provide both raw TypeScript and JSON schema via MCP tools
214
+
215
+ See [TYPE-SYSTEM.md](./TYPE-SYSTEM.md) for detailed documentation.
135
216
 
136
217
  ## Development
137
218
 
219
+ ### Setup
220
+
138
221
  ```bash
139
222
  # Install dependencies
140
223
  yarn install
141
224
 
225
+ # Extract types from packages
226
+ yarn extract-types
227
+
228
+ # Validate examples
229
+ yarn validate-examples
230
+
142
231
  # Build
143
232
  yarn build
144
233
 
145
- # Watch mode
146
- yarn dev
234
+ # Run locally
235
+ yarn start
236
+ ```
237
+
238
+ ### Adding Examples
147
239
 
148
- # Test the server
149
- node dist/index.js
240
+ Create TypeScript example files in `examples/components/`:
241
+
242
+ ```typescript
243
+ // examples/components/Button.examples.tsx
244
+ import React from 'react';
245
+ import { Button } from '@idealyst/components';
246
+
247
+ export function BasicButton() {
248
+ return (
249
+ <Button type="contained" intent="primary">
250
+ Save
251
+ </Button>
252
+ );
253
+ }
254
+ ```
255
+
256
+ Then validate:
257
+
258
+ ```bash
259
+ yarn validate-examples
150
260
  ```
151
261
 
262
+ ### Project Structure
263
+
264
+ ```
265
+ packages/mcp-server/
266
+ ├── src/
267
+ │ ├── index.ts # MCP server entry point
268
+ │ ├── tools/ # MCP tool implementations
269
+ │ │ └── get-types.ts # Type extraction tools
270
+ │ ├── data/ # Component documentation
271
+ │ │ ├── components/ # Component docs
272
+ │ │ ├── cli-commands.ts # CLI documentation
273
+ │ │ └── framework-guides.ts
274
+ │ └── generated/ # Auto-generated (gitignored)
275
+ │ └── types.json # Extracted types
276
+ ├── scripts/
277
+ │ ├── extract-types.ts # Type extraction script
278
+ │ ├── type-extractor.ts # Extraction utilities
279
+ │ └── validate-examples.ts # Example validation
280
+ ├── examples/
281
+ │ └── components/ # Type-checked examples
282
+ │ ├── Button.examples.tsx
283
+ │ ├── Card.examples.tsx
284
+ │ └── ...
285
+ ├── ARCHITECTURE.md # System architecture
286
+ ├── TYPE-SYSTEM.md # Type system documentation
287
+ └── package.json
288
+ ```
289
+
290
+ ## Build Process
291
+
292
+ The build includes type extraction and validation:
293
+
294
+ ```json
295
+ {
296
+ "scripts": {
297
+ "prebuild": "yarn extract-types && yarn validate-examples",
298
+ "build": "tsc && chmod +x dist/index.js"
299
+ }
300
+ }
301
+ ```
302
+
303
+ This ensures:
304
+ - ✅ Types are up-to-date
305
+ - ✅ Examples are valid
306
+ - ✅ Build fails if examples have type errors
307
+
308
+ ## Resources
309
+
310
+ The server also provides markdown resources accessible via MCP:
311
+
312
+ - `idealyst://framework/getting-started` - Getting started guide
313
+ - `idealyst://framework/components-overview` - Components overview
314
+ - `idealyst://framework/theming` - Theming guide
315
+ - `idealyst://framework/cli` - CLI reference
316
+ - `idealyst://navigation/overview` - Navigation system overview
317
+ - `idealyst://navigation/route-configuration` - Route configuration
318
+ - `idealyst://navigation/navigator-types` - Navigator types guide
319
+ - `idealyst://icons/reference` - Icon reference with common icons
320
+
321
+ ## Benefits
322
+
323
+ ### For AI Assistants
324
+ - 🎯 **Accurate Types**: Get exact TypeScript interfaces from source
325
+ - ✅ **Validated Examples**: Examples guaranteed to compile
326
+ - 📊 **Multiple Formats**: TypeScript and JSON schema formats
327
+ - 🔄 **Always Updated**: Types extracted from actual packages
328
+
329
+ ### For Developers
330
+ - 🚀 **Fast Development**: AI generates correct code on first try
331
+ - 📖 **Reliable Docs**: Documentation always matches reality
332
+ - 🔍 **Easy Discovery**: Search components, icons, and types
333
+ - 💡 **Best Practices**: Built-in guidance and examples
334
+
152
335
  ## Example Queries for Claude
153
336
 
154
- Once the MCP server is connected to Claude, you can ask questions like:
337
+ Once the MCP server is connected, you can ask:
155
338
 
156
339
  - "List all Idealyst components"
157
- - "Show me how to use the Button component with icons"
340
+ - "Get the TypeScript types for the Button component"
341
+ - "Show me validated examples for the Card component"
342
+ - "What are the available Size values in the theme?"
343
+ - "Search for arrow icons"
158
344
  - "How do I create a new Idealyst workspace?"
159
- - "What form components are available in Idealyst?"
160
- - "Give me an example of using the Dialog component"
161
- - "How do I customize the theme in Idealyst?"
345
+ - "What navigation types are available?"
162
346
 
163
- ## Architecture
347
+ ## Troubleshooting
164
348
 
165
- The server exposes:
349
+ ### "Types file not found" Error
166
350
 
167
- - **Tools**: Callable functions for querying component docs, examples, and CLI usage
168
- - **Resources**: Static framework guides and documentation
351
+ Run type extraction:
352
+ ```bash
353
+ yarn extract-types
354
+ ```
169
355
 
170
- All data is stored in TypeScript files under `src/data/`:
171
- - `components.ts`: Component documentation and examples
172
- - `cli-commands.ts`: CLI command reference
173
- - `framework-guides.ts`: Framework setup and usage guides
356
+ ### Examples Have Type Errors
174
357
 
175
- ## Adding New Components
358
+ This means the examples don't match the current types (which is good - we caught it!):
359
+ ```bash
360
+ yarn validate-examples # See errors
361
+ # Fix examples, then re-validate
362
+ ```
176
363
 
177
- To add documentation for a new component, edit `src/data/components.ts`:
364
+ ### Types Are Out of Date
178
365
 
179
- ```typescript
180
- export const components: Record<string, any> = {
181
- YourComponent: {
182
- category: "display",
183
- description: "Brief description",
184
- props: "Props documentation...",
185
- features: ["Feature 1", "Feature 2"],
186
- bestPractices: ["Practice 1", "Practice 2"],
187
- usage: "Basic usage example...",
188
- examples: {
189
- basic: "Basic example code...",
190
- variants: "Variants example code...",
191
- "with-icons": "Icon example code...",
192
- interactive: "Interactive example code...",
193
- },
194
- },
195
- };
196
- ```
197
-
198
- Then rebuild: `yarn build`
366
+ Re-extract after changing component packages:
367
+ ```bash
368
+ yarn extract-types
369
+ yarn build
370
+ ```
371
+
372
+ ## Contributing
373
+
374
+ 1. Fork the repository
375
+ 2. Create a feature branch
376
+ 3. Add/update examples with type validation
377
+ 4. Run `yarn validate-examples`
378
+ 5. Submit a pull request
379
+
380
+ See [ARCHITECTURE.md](./ARCHITECTURE.md) and [TYPE-SYSTEM.md](./TYPE-SYSTEM.md) for technical details.
199
381
 
200
382
  ## License
201
383
 
202
384
  MIT
385
+
386
+ ## Links
387
+
388
+ - [Idealyst Framework](https://github.com/IdealystIO/idealyst-framework)
389
+ - [Model Context Protocol](https://modelcontextprotocol.io/)
390
+ - [Claude Code](https://code.claude.com/)