@letsprogram/ng-oat-mcp 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 ADDED
@@ -0,0 +1,177 @@
1
+ # @letsprogram/ng-oat-mcp
2
+
3
+ MCP (Model Context Protocol) server for the **ng-oat** Angular component library. Gives AI coding assistants — like Copilot, Cursor, Windsurf, and others — instant access to every ng-oat component API, design token, theming guide, recipe, and utility class.
4
+
5
+ ## Quick Start
6
+
7
+ ### npm (recommended — works everywhere)
8
+
9
+ ```bash
10
+ npx -y @letsprogram/ng-oat-mcp
11
+ ```
12
+
13
+ ### From source
14
+
15
+ ```bash
16
+ cd mcp-server
17
+ npm install
18
+ npm run build
19
+ ```
20
+
21
+ ## Integration
22
+
23
+ ### VS Code / GitHub Copilot
24
+
25
+ Add to `.vscode/mcp.json` (workspace) **or** `~/.vscode/mcp.json` (global):
26
+
27
+ ```jsonc
28
+ {
29
+ "servers": {
30
+ "ng-oat": {
31
+ "type": "stdio",
32
+ "command": "npx",
33
+ "args": ["-y", "@letsprogram/ng-oat-mcp"],
34
+ },
35
+ },
36
+ }
37
+ ```
38
+
39
+ <details>
40
+ <summary>Local development (from source)</summary>
41
+
42
+ ```jsonc
43
+ {
44
+ "servers": {
45
+ "ng-oat": {
46
+ "type": "stdio",
47
+ "command": "node",
48
+ "args": ["${workspaceFolder}/mcp-server/dist/index.js"],
49
+ },
50
+ },
51
+ }
52
+ ```
53
+
54
+ </details>
55
+
56
+ ### Cursor
57
+
58
+ Add to `.cursor/mcp.json`:
59
+
60
+ ```jsonc
61
+ {
62
+ "mcpServers": {
63
+ "ng-oat": {
64
+ "command": "npx",
65
+ "args": ["-y", "@letsprogram/ng-oat-mcp"],
66
+ },
67
+ },
68
+ }
69
+ ```
70
+
71
+ ### Windsurf
72
+
73
+ Add to `~/.codeium/windsurf/mcp_config.json`:
74
+
75
+ ```jsonc
76
+ {
77
+ "mcpServers": {
78
+ "ng-oat": {
79
+ "command": "npx",
80
+ "args": ["-y", "@letsprogram/ng-oat-mcp"],
81
+ },
82
+ },
83
+ }
84
+ ```
85
+
86
+ ### Claude Desktop
87
+
88
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
89
+
90
+ ```jsonc
91
+ {
92
+ "mcpServers": {
93
+ "ng-oat": {
94
+ "command": "npx",
95
+ "args": ["-y", "@letsprogram/ng-oat-mcp"],
96
+ },
97
+ },
98
+ }
99
+ ```
100
+
101
+ ---
102
+
103
+ ## Tools
104
+
105
+ | Tool | Description |
106
+ | ------------------------- | -------------------------------------------------------------------------------------------------------- |
107
+ | `get_component` | Look up any ng-oat component by name or selector. Returns inputs, outputs, slots, and example. |
108
+ | `get_tokens` | List design tokens (CSS custom properties). Filter by category: color, spacing, radius, typography, etc. |
109
+ | `generate_component_code` | Generate a ready-to-paste Angular standalone component using ng-oat. |
110
+ | `get_recipe` | Get full-page layout recipes (login, dashboard, pricing, blog, etc.) with HTML skeletons. |
111
+ | `get_utilities` | List 300+ CSS utility classes across 30 categories. Includes responsive variants (sm:/md:/lg:/xl:). |
112
+ | `get_setup` | Installation & setup guide: requirements, CSS, tokens, signal forms, utilities. |
113
+ | `get_theming` | Theming docs: provideNgOatTheme, NgOatThemeRef, light-dark(), color tokens, CSS-only theming. |
114
+
115
+ ## Resources
116
+
117
+ | URI | Description |
118
+ | ------------------------ | ---------------------------------------------------------------------------------------------------------- |
119
+ | `ng-oat://llms-full.txt` | Complete API reference — all 37 components, 87 tokens, 12 recipes, 300+ utilities, theming & setup guides. |
120
+
121
+ ## Prompts
122
+
123
+ | Prompt | Description |
124
+ | ------------------- | ----------------------------------------------------------------------------------------- |
125
+ | `create-page` | Scaffold a full Angular page using ng-oat components from a natural language description. |
126
+ | `style-with-tokens` | Generate CSS using ng-oat design tokens from a description of what to style. |
127
+
128
+ ---
129
+
130
+ ## Publishing to npm
131
+
132
+ ```bash
133
+ cd mcp-server
134
+ npm run build
135
+ npm publish --access public
136
+ ```
137
+
138
+ After publishing, anyone can use it with:
139
+
140
+ ```bash
141
+ npx -y @letsprogram/ng-oat-mcp
142
+ ```
143
+
144
+ ## Development
145
+
146
+ ```bash
147
+ npm run dev # Watch mode — recompiles on save
148
+ npm run start # Run the server directly (for testing)
149
+ ```
150
+
151
+ ### Testing with MCP Inspector
152
+
153
+ ```bash
154
+ npx @modelcontextprotocol/inspector node dist/index.js
155
+ ```
156
+
157
+ ## Architecture
158
+
159
+ ```
160
+ mcp-server/
161
+ ├── src/
162
+ │ ├── index.ts # Server entry — tools, resources, prompts
163
+ │ └── data/
164
+ │ ├── components.ts # 37 component API definitions
165
+ │ ├── tokens.ts # 87 design token definitions
166
+ │ ├── recipes.ts # 12 full-page recipe skeletons
167
+ │ ├── utilities.ts # 300+ CSS utility class catalog
168
+ │ ├── setup.ts # Installation & setup guide
169
+ │ └── theming.ts # Theming documentation
170
+ ├── dist/ # Compiled JS (after build)
171
+ ├── package.json
172
+ └── tsconfig.json
173
+ ```
174
+
175
+ ## License
176
+
177
+ MIT
@@ -0,0 +1,30 @@
1
+ /**
2
+ * ng-oat component metadata for MCP tool lookups.
3
+ */
4
+ export interface ComponentMeta {
5
+ name: string;
6
+ selector: string;
7
+ import: string;
8
+ category: 'component' | 'directive-wrapper' | 'form' | 'directive' | 'cva';
9
+ description: string;
10
+ inputs: {
11
+ name: string;
12
+ type: string;
13
+ default: string;
14
+ kind?: string;
15
+ }[];
16
+ outputs: {
17
+ name: string;
18
+ type: string;
19
+ }[];
20
+ methods?: string[];
21
+ contentSlots?: string[];
22
+ notes?: string;
23
+ example: string;
24
+ }
25
+ export declare const COMPONENTS: ComponentMeta[];
26
+ /**
27
+ * Fuzzy-match a component by name or selector.
28
+ */
29
+ export declare function findComponent(query: string): ComponentMeta[];
30
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/data/components.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,WAAW,GAAG,mBAAmB,GAAG,MAAM,GAAG,WAAW,GAAG,KAAK,CAAC;IAC3E,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACzE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,EAAE,aAAa,EA4nBrC,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAO5D"}