@nysds/mcp-server 1.16.0-alpha5 → 1.16.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 +83 -28
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,22 +5,48 @@ MCP (Model Context Protocol) server for the New York State Design System. Expose
|
|
|
5
5
|
> [!WARNING]
|
|
6
6
|
> This MCP server is a work-in-progress and the current tool results are being refined. The server is functional, but the quality of the output depends on the robustness of the underlying documentation, and we're enhancing component JSDoc with patterns, accessibility guidance, and usage rules based on guidance from ["Effective Writing for AI" by Benny Powers](https://bennypowers.dev/cem/docs/mcp/writing-descriptions/).
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Getting Started
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
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
|
+
|
|
12
|
+
Jump to the configuration for your assistant:
|
|
13
|
+
- [GitHub Copilot](#github-copilot)
|
|
14
|
+
- [Claude Desktop](#claude-desktop)
|
|
15
|
+
- [Claude Code](#claude-code)
|
|
16
|
+
- [Cursor](#cursor)
|
|
17
|
+
- [Gemini CLI](#gemini-cli)
|
|
18
|
+
|
|
19
|
+
### Using the Next Channel
|
|
20
|
+
|
|
21
|
+
To pull in the latest bleeding-edge changes before they hit the stable release, point to the `next` dist-tag by replacing `@nysds/mcp-server` with `@nysds/mcp-server@next` in any of the configurations below. For example:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
"args": ["-y", "@nysds/mcp-server@next"]
|
|
12
25
|
```
|
|
13
26
|
|
|
14
|
-
|
|
27
|
+
To go back to stable, just remove `@next`.
|
|
28
|
+
|
|
29
|
+
> [!NOTE]
|
|
30
|
+
> Next releases may include breaking changes, incomplete features, or components not fully supported. They're useful for previewing upcoming work, but stick with the stable channel for production use.
|
|
31
|
+
|
|
32
|
+
### Optional: Local Installation
|
|
33
|
+
|
|
34
|
+
If you prefer to install the server locally — for example, to use the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) or to pin a specific version — you can install it globally:
|
|
15
35
|
|
|
16
36
|
```bash
|
|
17
37
|
npm install -g @nysds/mcp-server
|
|
18
38
|
nysds-mcp
|
|
19
39
|
```
|
|
20
40
|
|
|
21
|
-
|
|
41
|
+
Or run it directly without installing:
|
|
22
42
|
|
|
23
|
-
|
|
43
|
+
```bash
|
|
44
|
+
npx -y @nysds/mcp-server
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Connecting to Your AI Assistant
|
|
48
|
+
|
|
49
|
+
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.
|
|
24
50
|
|
|
25
51
|
### GitHub Copilot
|
|
26
52
|
|
|
@@ -43,8 +69,8 @@ See the [Copilot MCP documentation](https://docs.github.com/en/copilot/using-git
|
|
|
43
69
|
|
|
44
70
|
Add to your Claude Desktop configuration:
|
|
45
71
|
|
|
46
|
-
- macOS:
|
|
47
|
-
- Windows:
|
|
72
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
73
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
48
74
|
|
|
49
75
|
```json
|
|
50
76
|
{
|
|
@@ -89,6 +115,23 @@ Add to your Cursor MCP settings (`.cursor/mcp.json`):
|
|
|
89
115
|
}
|
|
90
116
|
```
|
|
91
117
|
|
|
118
|
+
### Gemini CLI
|
|
119
|
+
|
|
120
|
+
Add to your Gemini CLI settings file (`~/.gemini/settings.json`) or your project's `.gemini/settings.json`:
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"mcpServers": {
|
|
125
|
+
"nysds": {
|
|
126
|
+
"command": "npx",
|
|
127
|
+
"args": ["-y", "@nysds/mcp-server"]
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
See the [Gemini CLI documentation](https://github.com/google-gemini/gemini-cli) for the latest setup instructions.
|
|
134
|
+
|
|
92
135
|
## Available Tools
|
|
93
136
|
|
|
94
137
|
### Components
|
|
@@ -138,28 +181,40 @@ Add to your Cursor MCP settings (`.cursor/mcp.json`):
|
|
|
138
181
|
|
|
139
182
|
## Example Prompts
|
|
140
183
|
|
|
141
|
-
Once configured, you can ask your AI assistant
|
|
184
|
+
Once configured, you can ask your AI assistant to help you build real applications with the design system.
|
|
185
|
+
|
|
186
|
+
**Building applications from requirements:**
|
|
187
|
+
|
|
188
|
+
> Read the PDF from this folder and create a PRD for a multi-step front end application. Use the NYS Design System. Build with Vite and TypeScript. Break up the tasks into a step-by-step list. Before you start, ask any clarifying questions to do this task well.
|
|
189
|
+
|
|
190
|
+
> Build out a newsletter signup form using the NYS Design System. Use existing DS components where possible. Where not, build new components using the same approach as existing components, and style with appropriate NYSDS design tokens and utility classes. Afterward, perform a gap analysis that documents everything not in the design system that was created.
|
|
191
|
+
|
|
192
|
+
**Scaffolding and setup:**
|
|
193
|
+
|
|
194
|
+
> Set up a new Vite project with TypeScript and install the NYS Design System. Configure it with the correct fonts, tokens, and page structure. Show me a working hello world page that follows the NYSDS page layout guide.
|
|
195
|
+
|
|
196
|
+
> I have an existing .NET Razor Pages app. Walk me through integrating NYSDS components into it step by step.
|
|
197
|
+
|
|
198
|
+
**Building pages and features:**
|
|
199
|
+
|
|
200
|
+
> Build a search results page with a text input, filters using checkboxes and selects, and a results list. Use NYSDS components for all form elements and follow the grid system for layout.
|
|
201
|
+
|
|
202
|
+
> Create an accessible multi-step wizard form for a permit application with validation on each step. Use NYSDS form components and show error states using the design system's error patterns.
|
|
203
|
+
|
|
204
|
+
**Working with design tokens and theming:**
|
|
205
|
+
|
|
206
|
+
> I'm building a page for the Department of Health. Show me how to apply their agency theme using NYSDS tokens, and build a dashboard header that uses the correct brand colors.
|
|
207
|
+
|
|
208
|
+
> Show me all the spacing tokens available and explain the scale. Then refactor this layout to use NYSDS spacing tokens instead of hardcoded values.
|
|
209
|
+
|
|
210
|
+
**Code review and validation:**
|
|
142
211
|
|
|
143
|
-
|
|
144
|
-
- "What NYSDS components are available for forms?"
|
|
145
|
-
- "Show me the documentation for the nys-button component"
|
|
146
|
-
- "What properties does nys-alert support?"
|
|
212
|
+
> Review this HTML page and identify everywhere I'm using NYSDS components incorrectly — wrong attributes, missing required properties, or deprecated patterns.
|
|
147
213
|
|
|
148
|
-
|
|
149
|
-
- "Create a contact form using NYSDS components with fields for name, email, and message"
|
|
150
|
-
- "Build a page header with the global header component and navigation"
|
|
151
|
-
- "Add form validation to this input using NYSDS error message components"
|
|
214
|
+
> Check if I'm using the right token layers. I want to make sure my component-level styles reference the correct semantic tokens instead of raw values.
|
|
152
215
|
|
|
153
|
-
**
|
|
154
|
-
- "What color tokens are available in NYSDS?"
|
|
155
|
-
- "Show me the spacing tokens I should use for consistent layouts"
|
|
156
|
-
- "What's the correct token for the primary brand color?"
|
|
216
|
+
**Exploring the system:**
|
|
157
217
|
|
|
158
|
-
|
|
159
|
-
- "How do I set up NYSDS components in my Angular project?"
|
|
160
|
-
- "Show me how to use nys-button in React"
|
|
161
|
-
- "How do I integrate NYSDS with Drupal?"
|
|
218
|
+
> What NYSDS components are available for forms? Show me the documentation for each one with code examples.
|
|
162
219
|
|
|
163
|
-
|
|
164
|
-
- "Is this the correct way to use the nys-select component?"
|
|
165
|
-
- "Check if I'm using valid attributes on this nys-checkbox"
|
|
220
|
+
> Show me the token dependency graph for the primary color. I want to understand how the base, semantic, and component layers connect.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/mcp-server",
|
|
3
|
-
"version": "1.16.0
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "MCP server for the New York State Design System. Exposes components, tokens, and documentation to AI assistants.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"nysds-mcp": "
|
|
7
|
+
"nysds-mcp": "dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"build": "tsc",
|
|
23
23
|
"dev": "tsc --watch",
|
|
24
24
|
"start": "node dist/index.js",
|
|
25
|
-
"inspect": "npx @modelcontextprotocol/inspector node dist/index.js"
|
|
25
|
+
"inspect": "npx -y @modelcontextprotocol/inspector node dist/index.js"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.26.0",
|