@nysds/mcp-server 1.18.1 → 1.19.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 +44 -29
- package/data/cem/custom-elements.json +799 -372
- package/data/guides/frameworks/react.md +70 -0
- package/data/guides/themes.md +61 -0
- package/data/tokens/tokens.css +1 -1
- package/data/tokens/tokens.json +1092 -399
- package/dist/lib/token-parser.d.ts +19 -31
- package/dist/lib/token-parser.d.ts.map +1 -1
- package/dist/lib/token-parser.js +57 -87
- package/dist/tools/guide-tools.d.ts.map +1 -1
- package/dist/tools/guide-tools.js +3 -1
- package/dist/tools/token-tools.d.ts +2 -3
- package/dist/tools/token-tools.d.ts.map +1 -1
- package/dist/tools/token-tools.js +66 -343
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ MCP (Model Context Protocol) server for the New York State Design System. Expose
|
|
|
10
10
|
No installation is required. The MCP server runs on-demand via `npx` — your AI assistant downloads and starts it automatically when you add the configuration below. You just need [Node.js](https://nodejs.org/) (v18 or later) installed on your machine.
|
|
11
11
|
|
|
12
12
|
Jump to the configuration for your assistant:
|
|
13
|
+
|
|
13
14
|
- [GitHub Copilot](#github-copilot)
|
|
14
15
|
- [Claude Desktop](#claude-desktop)
|
|
15
16
|
- [Claude Code](#claude-code)
|
|
@@ -44,6 +45,20 @@ Or run it directly without installing:
|
|
|
44
45
|
npx -y @nysds/mcp-server
|
|
45
46
|
```
|
|
46
47
|
|
|
48
|
+
## Local Development
|
|
49
|
+
|
|
50
|
+
If you're working on the NYSDS repo itself and want your changes reflected in the MCP server:
|
|
51
|
+
|
|
52
|
+
1. **Build** — run `npm run build:link` (or `npm run build:all` for a full production build) from the repo root. This rebuilds the `custom-elements.json` manifest and the MCP server bundle that your AI assistant reads.
|
|
53
|
+
2. **Restart your AI assistant** — the MCP server process is loaded at startup, so changes won't take effect until you restart (e.g. quit and relaunch Claude Desktop, or run `/mcp` → restart in Claude Code).
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Fastest rebuild loop during MCP development
|
|
57
|
+
npm run build:link
|
|
58
|
+
|
|
59
|
+
# Then restart your AI assistant to pick up the changes
|
|
60
|
+
```
|
|
61
|
+
|
|
47
62
|
## Connecting to Your AI Assistant
|
|
48
63
|
|
|
49
64
|
Each assistant has its own configuration format, but they all follow the same pattern: tell the assistant how to start the server (via `npx`), and it handles the rest.
|
|
@@ -136,47 +151,47 @@ See the [Gemini CLI documentation](https://github.com/google-gemini/gemini-cli)
|
|
|
136
151
|
|
|
137
152
|
### Components
|
|
138
153
|
|
|
139
|
-
| Tool
|
|
140
|
-
|
|
141
|
-
| `find_components`
|
|
142
|
-
| `get_component`
|
|
143
|
-
| `validate_component_api` | Validate that attributes/properties are valid for a component
|
|
154
|
+
| Tool | Description |
|
|
155
|
+
| ------------------------ | ------------------------------------------------------------------------------------------- |
|
|
156
|
+
| `find_components` | Search for components by name/description, or list all (omit query) |
|
|
157
|
+
| `get_component` | Full documentation for a specific component. Use `includeExamples: true` for code examples. |
|
|
158
|
+
| `validate_component_api` | Validate that attributes/properties are valid for a component |
|
|
144
159
|
|
|
145
160
|
### Design Tokens
|
|
146
161
|
|
|
147
|
-
| Tool
|
|
148
|
-
|
|
149
|
-
| `get_tokens`
|
|
150
|
-
| `find_tokens`
|
|
151
|
-
| `get_token_info`
|
|
152
|
-
| `get_token_graph` | Token dependency graph showing references and usage
|
|
162
|
+
| Tool | Description |
|
|
163
|
+
| ----------------- | ---------------------------------------------------------------------- |
|
|
164
|
+
| `get_tokens` | Get tokens, categories, or agency themes. Filter by category or layer. |
|
|
165
|
+
| `find_tokens` | Search tokens by CSS variable name, value, or description |
|
|
166
|
+
| `get_token_info` | Detailed info for a specific token with optional context validation |
|
|
167
|
+
| `get_token_graph` | Token dependency graph showing references and usage |
|
|
153
168
|
|
|
154
169
|
### Styles & Guides
|
|
155
170
|
|
|
156
|
-
| Tool
|
|
157
|
-
|
|
158
|
-
| `get_utility_classes` | Grid, flexbox, spacing, display, and typography utility classes
|
|
159
|
-
| `get_guide`
|
|
171
|
+
| Tool | Description |
|
|
172
|
+
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
173
|
+
| `get_utility_classes` | Grid, flexbox, spacing, display, and typography utility classes |
|
|
174
|
+
| `get_guide` | Guides for installation, forms, styles, fonts, page structure, or framework setup (angular, react, dotnet, drupal, vanilla). Angular, React, .NET, and Drupal guides are currently untested. |
|
|
160
175
|
|
|
161
176
|
## Available Resources
|
|
162
177
|
|
|
163
|
-
| URI
|
|
164
|
-
|
|
165
|
-
| `nysds://components`
|
|
166
|
-
| `nysds://component/{tag}` | Individual component docs
|
|
167
|
-
| `nysds://tokens`
|
|
168
|
-
| `nysds://tokens/css`
|
|
169
|
-
| `nysds://tokens/graph`
|
|
170
|
-
| `nysds://tokens/color`
|
|
171
|
-
| `nysds://tokens/font`
|
|
172
|
-
| `nysds://tokens/space`
|
|
173
|
-
| `nysds://tokens/size`
|
|
174
|
-
| `nysds://installation`
|
|
178
|
+
| URI | Description |
|
|
179
|
+
| ------------------------- | ----------------------------------------------------- |
|
|
180
|
+
| `nysds://components` | Component overview list |
|
|
181
|
+
| `nysds://component/{tag}` | Individual component docs |
|
|
182
|
+
| `nysds://tokens` | All design tokens with CSS variables and descriptions |
|
|
183
|
+
| `nysds://tokens/css` | Raw tokens.css file content |
|
|
184
|
+
| `nysds://tokens/graph` | Token dependency graph with stats |
|
|
185
|
+
| `nysds://tokens/color` | Color tokens only |
|
|
186
|
+
| `nysds://tokens/font` | Typography tokens |
|
|
187
|
+
| `nysds://tokens/space` | Spacing tokens |
|
|
188
|
+
| `nysds://tokens/size` | Size tokens |
|
|
189
|
+
| `nysds://installation` | Installation guide |
|
|
175
190
|
|
|
176
191
|
## Prompts
|
|
177
192
|
|
|
178
|
-
| Prompt
|
|
179
|
-
|
|
193
|
+
| Prompt | Description |
|
|
194
|
+
| ------------ | --------------------------------------- |
|
|
180
195
|
| `nysds_mode` | Activates NYSDS-aware coding assistance |
|
|
181
196
|
|
|
182
197
|
## Example Prompts
|