@neuctra/ui-mcp 0.4.5 → 0.4.7

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 CHANGED
@@ -1,382 +1,186 @@
1
1
  # @neuctra/ui-mcp
2
2
 
3
- An MCP server that gives AI coding assistants (Claude Code, Claude Desktop, Cursor,
4
- Antigravity, or anything else that speaks MCP) ground-truth knowledge of the
5
- [`@neuctra/ui`](../neuctra-ui-package) component library, so they write correct code
6
- instead of guessing.
3
+ Give your AI coding assistant accurate, ready-to-use knowledge of [`@neuctra/ui`](https://www.npmjs.com/package/@neuctra/ui). The Neuctra UI MCP server helps an assistant set up a project, plan pages, find components with their real props, apply Neuctra design rules, and follow framework-specific SEO guidance.
7
4
 
8
- This document explains what that means, why it exists, and how every piece of it works.
5
+ ## What you can do
9
6
 
10
- ---
7
+ - Set up Neuctra UI in a React project with the guided setup tool.
8
+ - Plan a tool page, blog, dashboard, form, store page, and more with the page builder.
9
+ - Find the right prebuilt component from a natural-language description and get its exact import, props, and example.
10
+ - Retrieve Neuctra UI theme tokens and design rules.
11
+ - Get SEO, AEO, and GEO rules with implementation guidance for your framework.
11
12
 
12
- ## 1. The problem this solves
13
+ ## Install and connect
13
14
 
14
- Ask an AI assistant to "build a login form with Neuctra UI" and it has two options:
15
+ You do not need to install this package into your app. Add it as an MCP server in your AI coding client; the client runs it with `npx`.
15
16
 
16
- - **Recall from training data.** If Neuctra UI wasn't in its training set (likely — it's
17
- a small library), it has nothing to recall. It will pattern-match against libraries it
18
- *does* know (shadcn/ui, MUI, Chakra) and invent plausible-looking but wrong props —
19
- `<Input variant="outline" />` when your `Input` has no `variant` prop, or
20
- `<Button color="blue">` when colors come from `bg-primary`-style tokens, not a `color`
21
- prop.
22
- - **Read your source files.** Possible, but slow (it has to find and open several
23
- `.tsx` files), token-expensive, and it still has to reverse-engineer the API from
24
- implementation code rather than being told it directly.
17
+ ### Claude Code
25
18
 
26
- This package gives it a third option: **ask**. It exposes a small set of tools an AI can
27
- call mid-conversation — "what props does `Select` take?", "what components exist for
28
- forms?", "what color classes should I use?" — and gets back exact, structured answers
29
- generated from your actual TypeScript source. No guessing, no file-spelunking.
19
+ ```bash
20
+ claude mcp add neuctra-ui -- npx -y @neuctra/ui-mcp
21
+ ```
30
22
 
31
- ---
23
+ ### Cursor
32
24
 
33
- ## 2. How the pieces fit together
25
+ Add this server to your project’s `.cursor/mcp.json` (create the file if needed):
34
26
 
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "neuctra-ui": {
31
+ "command": "npx",
32
+ "args": ["-y", "@neuctra/ui-mcp"]
33
+ }
34
+ }
35
+ }
35
36
  ```
36
- neuctra-ui-package/src/components/basic/*.tsx (your actual component source)
37
- │
38
- │ npm run registry:generate (ts-morph reads props/JSDoc/defaults,
39
- │ scrapes one description + example per
40
- │ component from neuctra-ui-docs-v2)
41
- ▼
42
- neuctra-ui-package/registry/components.json (source of truth)
43
- │
44
- │ npm run sync-registry (plain file copy)
45
- ▼
46
- neuctra-ui-mcp/data/components.json (this package's local copy)
47
- │
48
- │ read once at server startup
49
- ▼
50
- neuctra-ui-mcp/src/server.mjs (loads data and composes tool modules)
51
- │
52
- └── neuctra-ui-mcp/src/tools/*/ (one folder per MCP tool)
53
- │
54
- │ spoken over stdio (stdin/stdout), JSON-RPC under the hood
55
- ▼
56
- Claude Code / Cursor / Antigravity / any MCP client
57
- ```
58
-
59
- Three independently-regenerable files feed the server:
60
-
61
- - **`data/components.json`** — synced from `neuctra-ui-package/registry/components.json`.
62
- Never edit this by hand; run `npm run sync-registry` after the upstream file changes.
63
- - **`data/theme.json`** — hand-curated from `neuctra-ui-cli/lib/update-css.js` (the CSS
64
- the setup CLI generates for consumers). Update it manually if the token set changes —
65
- it doesn't have an automated generator because it also encodes *rules*, not just data:
66
- the color-token rules ("never hardcode colors"), the anti-AI-look rules ("no
67
- gradients/shadows/blurs/glows/emoji-icons"), the recommended `@neuctra/ui-cli init`
68
- setup command, and how the standalone `toast()` API works.
69
- - **`data/aiDesignRules.json`** — also hand-curated, no generator. A 63-section
70
- product/UX design guide (design philosophy, visual hierarchy, page/sidebar/navigation
71
- structure, per-component usage guidance, spacing/color/border/radius/shadow
72
- conventions, responsive design, accessibility, and a final UI quality checklist).
73
- `theme.json`'s `rules`/`antiAiLookRules` are the mechanical, CSS-level rules; this file
74
- is the higher-level product-design layer — both are served together by
75
- `get_design_rules`.
76
- - **`data/seoGuide.json`** — hand-curated, no generator. A 16-topic SEO / AEO / GEO
77
- playbook (technical SEO, Core Web Vitals, on-page, keywords and intent, E-E-A-T, answer
78
- engine and generative engine optimisation, schema weaving, FAQs, the per-page meta
79
- checklist, where metadata goes in each framework plus Next.js metadata gotchas, page
80
- templates for tool/category/home pages, site-wide essentials, ads readiness, off-page
81
- and monitoring, and a launch checklist). The `neuctra-ui-seo-setup` tool returns the
82
- complete rules plus framework-specific implementation steps.
83
- - **`data/layouts.json`** — editable page-layout recipes consumed by
84
- `neuctra-ui-page-builder`. Add a recipe there to support a new page type.
85
-
86
- ---
87
-
88
- ## 3. What MCP actually is (30-second primer)
89
-
90
- MCP (**M**odel **C**ontext **P**rotocol) is a standard for connecting an AI assistant to
91
- external tools. Three roles:
92
-
93
- - **Host** — the AI app itself (Claude Code, Cursor, Antigravity).
94
- - **Client** — the part of the host that manages a connection to one server.
95
- - **Server** — a small program (this package) that exposes **tools** (named actions with
96
- typed inputs) the AI can decide to call.
97
-
98
- The host starts your server as a subprocess and talks to it over **stdio** — your
99
- server's stdout carries JSON-RPC messages, not human-readable logs (that's why
100
- `bin/cli.mjs` prints nothing except protocol traffic; use `console.error`, never
101
- `console.log`, if you ever add debug output). On connect, the client asks "what tools do
102
- you have?", gets back the tool definitions below, and adds them to the AI's available
103
- actions — the same way the tools listed in *this* conversation's system prompt work.
104
- From then on, the AI decides on its own when a tool call would help, calls it, and reads
105
- the result back into its context before continuing.
106
-
107
- ---
108
-
109
- ## 4. Recommended workflow
110
-
111
- For project initialization, call **`neuctra-ui-setup`** first with `action: "analyze"`.
112
- It detects Next.js, Vite React, Remix, and React Router, then guides a separate setup
113
- call. Setup can run the Neuctra UI CLI and install `lucide-react`, or return manual
114
- instructions. Existing supported projects are kept in place; clearing a populated
115
- directory requires explicit confirmation. An unspecified framework defaults to Next.js
116
- App Router with JavaScript, Tailwind, and static export.
117
-
118
- The tools are designed to be called in roughly this order when generating UI, not
119
- grabbed ad hoc:
120
-
121
- 1. **`neuctra-ui-page-builder`** — describe the page and its goal. It infers the page type,
122
- selects a recipe from `data/layouts.json`, and combines matching component specs,
123
- design rules, and framework-specific SEO guidance.
124
- 2. Resolve any high-impact preferences the builder flags, then implement the returned
125
- page outline using the exact Neuctra UI imports and props it supplies.
126
- 3. **Self-check** against the returned responsive, accessibility, and visual rules.
127
- 4. For detailed component discovery outside a page plan, use **`get-neuctra-ui-component`**.
128
- 5. For design or SEO reference material, use **`get_design_rules`**,
129
- **`neuctra-ui-theme-setup`**, or **`neuctra-ui-seo-setup`** as needed.
130
-
131
- Call `get_design_rules` for broad design reviews or unresolved edge cases, and `neuctra-ui-theme-setup`
132
- when the complete token/setup reference is needed. The full guide remains the source of
133
- truth; `neuctra-ui-page-builder` selects relevant sections for each request.
134
-
135
- ---
136
-
137
- ## 5. The six tools, in detail
138
-
139
- ### `neuctra-ui-page-builder`
140
37
 
141
- Analyzes the request, infers a page type, and selects its layout recipe from
142
- `data/layouts.json`. It combines the layout outline with matching full component specs,
143
- relevant Neuctra UI design rules, and SEO rules/implementation steps for the selected
144
- framework. Recipes can be edited or added to `layouts.json` without changing tool code.
38
+ ### Other MCP clients
145
39
 
146
- **Input:** `{ request: string, pageType?: "auto" | layout id, framework?: "auto" | framework id, preferences?: { visualDirection?, density?, primaryAction?, platform?, audience? } }`
40
+ Add a server with command `npx` and arguments `-y`, `@neuctra/ui-mcp`. If your client uses JSON configuration, the server entry is:
147
41
 
148
42
  ```json
149
43
  {
150
- "request": "Build an online image compressor with upload, preview, and download steps.",
151
- "pageType": "auto",
152
- "framework": "auto"
44
+ "command": "npx",
45
+ "args": ["-y", "@neuctra/ui-mcp"]
153
46
  }
154
47
  ```
155
48
 
156
- The result includes page classification and evidence, the chosen section outline,
157
- component imports/props/examples, relevant design rules, and public-page SEO guidance.
49
+ Restart or reload your AI client after changing its MCP settings. On first launch, `npx` downloads the package from npm.
158
50
 
159
- ### `get-neuctra-ui-component`
51
+ ## Recommended workflow
160
52
 
161
- One component discovery and retrieval tool for the prebuilt `@neuctra/ui` library. Give
162
- it a natural-language need such as `"responsive container for a page layout"`,
163
- `"input fields for a signup form"`, `"product image carousel"`, or `"confirmation drawer"`.
164
- It ranks matching components and returns each exact package import, full prop spec, and
165
- documented example. Use `componentName` for an exact component, `category` to narrow or
166
- browse, and `limit` to control how many full specs are returned.
53
+ 1. Ask your assistant to analyze the current project with `neuctra-ui-setup`.
54
+ 2. Use `neuctra-ui-page-builder` to plan a page from its goal and user needs.
55
+ 3. Use the returned component specs and examples to implement the page. For additional component discovery, call `get-neuctra-ui-component`.
56
+ 4. Use `neuctra-ui-theme-setup` and `get_design_rules` for theme tokens, composition guidance, accessibility, and visual rules.
57
+ 5. For public pages, use `neuctra-ui-seo-setup` with the project’s framework so the assistant can apply the right SEO steps.
167
58
 
168
- **Input:** `{ request?: string, componentName?: string, category?: ComponentCategory, limit?: number }`
59
+ The assistant writes the application code. The page builder supplies a layout plan and verified component guidance; it does not generate an entire page file by itself.
169
60
 
170
- ```json
171
- { "request": "responsive carousel for product images", "limit": 3 }
172
- ```
61
+ ## Available tools
173
62
 
174
- ### `neuctra-ui-theme-setup`
63
+ ### `neuctra-ui-setup`
64
+
65
+ Analyze a project and guide or run Neuctra UI setup.
66
+
67
+ - First call with `action: "analyze"` to detect the existing framework and project state.
68
+ - Then call with `action: "setup"` and choose `setupMode: "cli"` or `"manual"`.
69
+ - Supported setup frameworks: `nextjs`, `vite`, `remix`, and `react-router`.
70
+ - If no framework is specified, Next.js App Router with JavaScript, Tailwind, and static export is the recommended default.
71
+ - Existing matching projects are initialized in place. Replacing or clearing files requires explicit confirmation.
72
+ - CLI setup runs `npx @neuctra/ui-cli@latest init` and installs `lucide-react`.
175
73
 
176
- Returns the semantic color token system: the token list itself, a **setup** block
177
- pointing the AI at the `@neuctra/ui-cli` `init` command instead of hand-writing token CSS
178
- or a theme context, and a **toastNote** explaining the standalone `toast()` import.
179
- Without `neuctra-ui-theme-setup`, an AI would happily write `className="bg-blue-500"`, ignoring the
180
- consumer's actual theme. `neuctra-ui-theme-setup` does **not** carry the design/anti-AI-look rules —
181
- see `get_design_rules` below for those; call both together, not one instead of the other.
74
+ Example analyze request:
182
75
 
183
- **Response shape:**
184
- ```jsonc
76
+ ```json
185
77
  {
186
- "system": "Tailwind CSS v4, semantic CSS-variable tokens mapped via @theme, toggled by a .dark class...",
187
- "tokens": [
188
- { "token": "primary", "className": "bg-primary / text-primary / border-primary",
189
- "pairsWith": "primary-foreground", "light": "#00c214", "dark": "#00c214",
190
- "usage": "Brand color: primary buttons, active states, links, focus accents." },
191
- // ...23 tokens total
192
- ],
193
- "note": "Values shown are the CLI-generated defaults...",
194
- "setup": {
195
- "recommendedCommand": "npx @neuctra/ui-cli@latest init",
196
- "whatItDoes": ["Installs @neuctra/ui.", "Checks/upgrades React and Tailwind CSS.", "..."],
197
- "whenToSuggestIt": "..."
198
- },
199
- "toastNote": "@neuctra/ui's toast notification system is a standalone function..."
78
+ "action": "analyze"
200
79
  }
201
80
  ```
202
81
 
203
- ### `get_design_rules`
82
+ Example setup request after selecting Next.js and CLI setup:
204
83
 
205
- Returns every design rule generated UI must follow, at two levels: the mechanical
206
- **`stylingRules`** (token usage, surface/background conventions, component composition
207
- requirements — e.g. `CardBody` is compulsory whenever `Card` has body content, since
208
- `Card` itself renders no padding — and component-specific gotchas like Dropdown's
209
- trigger already stopping propagation internally) and **`antiAiLookRules`** (no
210
- gradients/shadows/blurs/glows/emoji-icons/em-dashes — the visual tells that make UI read
211
- as AI-generated), plus **`productDesignGuide`** — a 63-section product/UX design guide
212
- covering design philosophy, visual hierarchy, page/sidebar/navigation structure,
213
- per-component usage guidance (when to reach for `Card` vs plain whitespace, `Modal` vs
214
- `Drawer`, `Table` vs `List`, etc.), spacing/color/border/radius/shadow conventions,
215
- responsive design, accessibility, interaction design, and a final UI quality checklist.
216
-
217
- Use this for full-guide reviews and edge cases. For routine generation, use
218
- `neuctra-ui-page-builder` to retrieve the layout-specific rules and context.
219
-
220
- **Response shape (trimmed):**
221
- ```jsonc
84
+ ```json
222
85
  {
223
- "stylingRules": [
224
- "Theme colors only, compulsory, no exceptions...",
225
- "Use the Card component, not a hand-rolled lookalike...",
226
- // ...9 rules total
227
- ],
228
- "antiAiLookRules": [
229
- "No gradients, compulsory...",
230
- "No shadows, compulsory...",
231
- "No blur effects, compulsory...",
232
- // ...17 rules total
233
- ],
234
- "productDesignGuide": {
235
- "title": "Neuctra UI — AI Design Rules",
236
- "intro": "You are a senior product designer and frontend UI engineer using `@neuctra/ui`...",
237
- "sections": [
238
- { "number": 1, "title": "Core Design Philosophy", "content": "..." },
239
- { "number": 7, "title": "Cards", "content": "..." },
240
- // ...63 sections total
241
- ],
242
- "goldenRule": { "title": "Golden Rule", "content": "..." }
243
- }
86
+ "action": "setup",
87
+ "framework": "nextjs",
88
+ "setupMode": "cli"
244
89
  }
245
90
  ```
246
91
 
247
- ### `neuctra-ui-seo-setup`
248
-
249
- Returns the complete SEO/AEO/GEO rules and practical implementation steps from
250
- `data/seoGuide.json`. The JSON contains two main portions: `seoRules` (the full rules
251
- covering technical SEO, keywords, titles, descriptions, headings, content, JSON-LD,
252
- FAQs, performance, trust, and launch checks) and `implementationSteps` (ordered shared
253
- steps plus framework-specific instructions).
254
-
255
- Pass `framework` as `auto`, `nextjs-app`, `nextjs-pages`, `react-vite`, `react-router`,
256
- `remix`, or another supported framework. With `auto`, inspect project files and select
257
- steps that match the detected router and rendering mode. You can pass `projectContext`
258
- with relevant project configuration when helpful. The tool returns the complete rules
259
- alongside the applicable framework instructions; it does not emit a one-off metadata
260
- snippet or accept a page audit payload.
92
+ ### `neuctra-ui-page-builder`
261
93
 
262
- ---
94
+ Describe the page and the task it should support. The tool infers a page type, selects a matching layout recipe, and combines it with relevant Neuctra UI component specs, design rules, and framework-aware SEO guidance.
263
95
 
264
- ## 6. Local development
96
+ Supported page recipes include tool pages, blog pages, dashboards, landing pages, forms, authentication, settings, data tables, ecommerce, documentation, and custom pages.
265
97
 
266
- ```bash
267
- npm install
268
- npm run sync-registry # pulls the latest registry.json from neuctra-ui-package
269
- npm start # runs the server on stdio — it will sit there silently, that's correct
98
+ ```json
99
+ {
100
+ "request": "Build an online image compressor with upload, preview, and download steps.",
101
+ "pageType": "auto",
102
+ "framework": "auto"
103
+ }
270
104
  ```
271
105
 
272
- `npm start` alone won't show you anything (it's waiting for a client to speak JSON-RPC
273
- to it, not for a human to type at it). To actually exercise it, either wire it into a
274
- real client (section 7) or write a small script using
275
- `@modelcontextprotocol/sdk`'s `Client` + `StdioClientTransport` to spawn `bin/cli.mjs`
276
- and call the tools programmatically — that's how this server was verified while building
277
- it.
106
+ Use `pageType: "auto"` to infer the closest specific layout from the request, or choose any layout ID from the grouped catalog in `data/layouts.json`. The catalog covers marketing, SaaS applications, e-commerce, publishing, support, portfolios, communities, events, forms, and system pages. Use `framework: "auto"` to have the assistant identify the project framework, or provide a framework such as `nextjs-app`, `react-vite`, `react-router`, or `remix`.
278
107
 
279
- ---
280
-
281
- ## 7. Connecting it to a client
108
+ ### `get-neuctra-ui-component`
282
109
 
283
- All MCP clients use the same JSON shape — the differences are just *where* the config
284
- file lives.
110
+ Find components by describing what the interface needs. Results include the component’s exact package import, full prop definitions, and documented usage example.
285
111
 
286
- **Claude Code** — project-scoped, via CLI:
287
- ```bash
288
- claude mcp add neuctra-ui -- npx -y @neuctra/ui-mcp
289
- ```
290
- or by hand in `.mcp.json` at the repo root:
291
112
  ```json
292
113
  {
293
- "mcpServers": {
294
- "neuctra-ui": { "command": "npx", "args": ["-y", "@neuctra/ui-mcp"] }
295
- }
114
+ "request": "A responsive carousel for product images",
115
+ "limit": 3
296
116
  }
297
117
  ```
298
118
 
299
- **Cursor** — Settings → MCP → "Add new MCP server", or edit `.cursor/mcp.json`
300
- (project) / `~/.cursor/mcp.json` (global) with the same JSON shape as above.
119
+ You can also provide an exact `componentName` such as `Container`, `Input`, `Carousel`, `Card`, `Modal`, or `Drawer`. Use `category` to browse a component group (`layout`, `typography`, `form`, `actions`, `data-display`, `feedback`, `overlay`, or `navigation`).
301
120
 
302
- **Antigravity** — Settings → search "MCP" → "Manage MCP Servers" opens a JSON config
303
- using the same `mcpServers` shape (or a form asking for command + args — use `npx` and
304
- `-y @neuctra/ui-mcp`).
121
+ Example component usage:
305
122
 
306
- **Local development, any client** (before publishing, or to test changes):
307
- ```json
308
- {
309
- "mcpServers": {
310
- "neuctra-ui": {
311
- "command": "node",
312
- "args": ["/absolute/path/to/neuctra-ui-mcp/bin/cli.mjs"]
313
- }
314
- }
123
+ ```jsx
124
+ import { Container } from "@neuctra/ui";
125
+
126
+ function BasicExample() {
127
+ return (
128
+ <Container size="md" center className="bg-zinc-800 p-4 rounded-lg">
129
+ Hello Developer! I am a container.
130
+ </Container>
131
+ );
315
132
  }
316
133
  ```
317
134
 
318
- Restart the client after editing its config — servers are only launched on startup.
135
+ Check the returned props and example before using a component. Component APIs can differ from similarly named components in other libraries.
319
136
 
320
- ---
137
+ ### `neuctra-ui-theme-setup`
321
138
 
322
- ## 8. Keeping the registry in sync
139
+ Returns the Neuctra UI semantic theme tokens, Tailwind theme mappings, and theme setup guidance. Use these tokens (such as `bg-primary` and `text-foreground`) so components work with the configured light and dark themes. The tool also explains the `toast()` API.
323
140
 
324
- The registry is generated, not hand-maintained. Whenever a component's props change:
141
+ ### `get_design_rules`
325
142
 
326
- ```bash
327
- cd neuctra-ui-package
328
- npm run registry:generate # re-parses source, re-scrapes docs examples
143
+ Returns Neuctra UI’s design guidance, including component composition requirements, theme usage, accessibility, responsive behavior, spacing, hierarchy, and visual consistency. Use it when planning or reviewing an interface. The page builder includes the rules most relevant to its selected page layout.
144
+
145
+ ### `neuctra-ui-seo-setup`
329
146
 
330
- cd ../neuctra-ui-mcp
331
- npm run sync-registry # copies the updated file in
147
+ Returns the complete SEO, AEO, and GEO rules and ordered implementation steps. Framework matters: Next.js metadata APIs differ from Vite React, Remix, and React Router. Pass a framework or use `auto` and give the assistant the project context when useful.
148
+
149
+ ```json
150
+ {
151
+ "framework": "auto",
152
+ "projectContext": "React Router app using server rendering"
153
+ }
332
154
  ```
333
155
 
334
- `registry:generate` also runs automatically as part of `neuctra-ui-package`'s
335
- `prepublishOnly`, and `sync-registry` runs automatically as part of this package's own
336
- `prepublishOnly` — so a normal `npm publish` in each package keeps things current without
337
- remembering these steps by hand. `data/theme.json` and `data/aiDesignRules.json` are the
338
- two files with no generator; edit them directly — `theme.json` if the token set in
339
- `neuctra-ui-cli/lib/update-css.js` ever changes or a rule needs adding, `aiDesignRules.json`
340
- if the product-design guidance itself needs revising.
156
+ The guidance covers titles and descriptions, keyword and search intent, heading structure, canonical URLs, robots directives, sitemaps, structured data (JSON-LD), visible FAQs, performance, trust signals, and framework-specific implementation. It is a reference for the assistant; it does not generate a one-off metadata snippet or audit a page.
341
157
 
342
- ---
158
+ ## Tips for better results
343
159
 
344
- ## 9. Publishing
160
+ - Describe the page’s purpose and the user’s main task, not just its visual style.
161
+ - Mention the framework and router when you know them.
162
+ - Include important constraints such as mobile-first layout, primary actions, or existing project conventions.
163
+ - Ask the assistant to inspect component specs before writing code with unfamiliar components.
164
+ - For public pages, ask it to keep metadata and JSON-LD consistent with content that is actually visible.
345
165
 
346
- ```bash
347
- npm run sync-registry
348
- npm publish --access public # --access public is required: scoped packages default to private
349
- ```
166
+ ## Troubleshooting
350
167
 
351
- ---
168
+ **The tools do not appear in my client**
352
169
 
353
- ## 10. Project structure
170
+ Check that the MCP server entry uses command `npx` with arguments `-y` and `@neuctra/ui-mcp`, then restart or reload the client. Confirm that Node.js and npm are installed and available to the client process.
354
171
 
355
- ```
356
- neuctra-ui-mcp/
357
- ├── bin/
358
- │ └── cli.mjs # entry point: connects the server to a stdio transport
359
- ├── src/
360
- │ ├── server.mjs # registers the MCP tool modules
361
- │ └── seo.mjs # pure SEO builders used by neuctra-ui-seo-setup
362
- ├── scripts/
363
- │ └── sync-registry.mjs # copies registry/components.json from neuctra-ui-package
364
- ├── data/
365
- │ ├── components.json # synced (generated) — don't edit by hand
366
- │ ├── theme.json # hand-curated token + styling/anti-AI-look rules
367
- │ ├── aiDesignRules.json # hand-curated 63-section product/UX design guide
368
- │ ├── seoGuide.json # SEO / AEO / GEO rules and implementation steps
369
- │ └── layouts.json # editable page layout recipes
370
- └── package.json
371
- ```
172
+ **The assistant selected the wrong page layout**
173
+
174
+ Specify `pageType` directly (for example, `tool-page`, `blog-page`, or `dashboard`) and describe the main user task more clearly.
175
+
176
+ **The assistant is unsure which component to use**
177
+
178
+ Call `get-neuctra-ui-component` with a concrete need, such as “date input with calendar selection” or “drawer for mobile filters.” Review the returned component names and props before implementation.
179
+
180
+ **SEO instructions do not match my app**
372
181
 
373
- ---
182
+ Pass the actual framework and router, such as `nextjs-app`, `react-vite`, `react-router`, or `remix`. For `auto`, provide relevant project details or ask the assistant to inspect the project configuration first.
374
183
 
375
- ## 11. Extending it
184
+ ## License
376
185
 
377
- To add a new tool (e.g. `get_example` returning just the code snippet, or
378
- `list_categories`), open `src/server.mjs` and add another `server.registerTool(...)`
379
- call following the existing pattern: a name, a `title`/`description` (the description is
380
- what the AI reads to decide *when* to call it — be specific), a `zod` input schema, and
381
- an async handler returning `{ content: [{ type: "text", text: ... }] }`. No other file
382
- needs to change — `bin/cli.mjs` just connects whatever `createServer()` returns.
186
+ MIT