@db-ux/mcp-server 4.5.4-mcp-server-migrate-tool-test-1-eb724df → 4.5.4-postcss2-6de35db
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 +104 -98
- package/agent/_instructions.md +166 -0
- package/dist/index.js +5459 -1834
- package/package.json +12 -10
- package/CONTEXT.md +0 -132
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/mcp-server",
|
|
3
|
-
"version": "4.5.4-
|
|
3
|
+
"version": "4.5.4-postcss2-6de35db",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP server for DB UX Design System – gives LLMs access to UI components and code examples",
|
|
6
6
|
"repository": {
|
|
@@ -12,40 +12,42 @@
|
|
|
12
12
|
"node": ">=22"
|
|
13
13
|
},
|
|
14
14
|
"bin": {
|
|
15
|
-
"db-ux-
|
|
15
|
+
"@db-ux/mcp-server": "./dist/index.js"
|
|
16
16
|
},
|
|
17
17
|
"exports": {
|
|
18
18
|
".": "./dist/index.js"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
|
-
"
|
|
21
|
+
"CHANGELOG.md",
|
|
22
|
+
"agent",
|
|
22
23
|
"dist"
|
|
23
24
|
],
|
|
24
25
|
"scripts": {
|
|
25
|
-
"build": "
|
|
26
|
+
"build": "node esbuild.js",
|
|
26
27
|
"build-manifest": "tsx src/build-manifest.ts",
|
|
27
28
|
"copy-build": "npm-run-all copy-build:*",
|
|
29
|
+
"copy-build:agent": "cpr agent ../../build-outputs/mcp-server/agent --overwrite",
|
|
30
|
+
"copy-build:context": "cpr CONTEXT.md ../../build-outputs/mcp-server/CONTEXT.md --overwrite",
|
|
28
31
|
"copy-build:dist": "cpr dist ../../build-outputs/mcp-server/dist --overwrite",
|
|
29
32
|
"copy-build:package.json": "cpr package.json ../../build-outputs/mcp-server/package.json --overwrite",
|
|
30
|
-
"copy-build:context": "cpr CONTEXT.md ../../build-outputs/mcp-server/CONTEXT.md --overwrite",
|
|
31
33
|
"copy-build:readme": "cpr README.md ../../build-outputs/mcp-server/README.md --overwrite",
|
|
32
34
|
"dev": "npm run build && node dist/index.js",
|
|
33
35
|
"lint": "eslint src/ --ext .ts",
|
|
34
36
|
"start": "node dist/index.js",
|
|
35
|
-
"test": "vitest run",
|
|
37
|
+
"test": "npm run build && vitest run",
|
|
36
38
|
"test:watch": "vitest"
|
|
37
39
|
},
|
|
38
40
|
"dependencies": {
|
|
39
|
-
"@modelcontextprotocol/sdk": "
|
|
41
|
+
"@modelcontextprotocol/sdk": "1.27.1",
|
|
40
42
|
"zod": "4.1.13"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"cpr": "3.0.1",
|
|
44
|
-
"esbuild": "0.
|
|
45
|
-
"npm-run-
|
|
46
|
+
"esbuild": "0.28.0",
|
|
47
|
+
"npm-run-all2": "8.0.4",
|
|
46
48
|
"tsx": "4.21.0",
|
|
47
49
|
"typescript": "5.9.3",
|
|
48
|
-
"vitest": "
|
|
50
|
+
"vitest": "4.1.2"
|
|
49
51
|
},
|
|
50
52
|
"publishConfig": {
|
|
51
53
|
"registry": "https://registry.npmjs.org/",
|
package/CONTEXT.md
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# DB UX Design System – MCP Server
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
This MCP server (Model Context Protocol) gives LLMs (e.g. Amazon Q, GitHub Copilot, Claude) structured access to the UI components and code examples of the DB UX Design System. All communication happens exclusively over **stdio**, so the server can be started as a local child process by any MCP-compatible client.
|
|
6
|
-
|
|
7
|
-
Concrete use cases:
|
|
8
|
-
|
|
9
|
-
- An LLM asks for the API of a component (e.g. `DBButton`) and receives the Mitosis source file along with generated framework outputs.
|
|
10
|
-
- An LLM looks up usage examples for a component in React, Angular, or Vue.
|
|
11
|
-
- An LLM checks which components are available in the design system.
|
|
12
|
-
|
|
13
|
-
## Tech Stack
|
|
14
|
-
|
|
15
|
-
| Technology | Purpose |
|
|
16
|
-
|---|---|
|
|
17
|
-
| **Node.js** (≥ 22) | Runtime environment |
|
|
18
|
-
| **TypeScript** | Type safety, consistent with the rest of the monorepo |
|
|
19
|
-
| **`@modelcontextprotocol/sdk`** | Official MCP SDK — provides `McpServer`, transport classes, and tool/resource primitives |
|
|
20
|
-
| **`tsx`** | Development runner (no separate build step required) |
|
|
21
|
-
| **`esbuild`** | Production build into a single standalone ESM bundle |
|
|
22
|
-
|
|
23
|
-
## Monorepo Structure (relevant to this server)
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
core-web/
|
|
27
|
-
├── packages/
|
|
28
|
-
│ ├── components/ # Mitosis source files (framework-agnostic)
|
|
29
|
-
│ │ └── src/
|
|
30
|
-
│ │ └── components/
|
|
31
|
-
│ │ └── {component}/
|
|
32
|
-
│ │ ├── {component}.lite.tsx # Mitosis component
|
|
33
|
-
│ │ ├── model.ts # Props / types
|
|
34
|
-
│ │ ├── docs/ # Component markdown docs
|
|
35
|
-
│ │ └── showcase/
|
|
36
|
-
│ │ └── {component}.showcase.lite.tsx # Example names
|
|
37
|
-
│ ├── foundations/ # Design tokens, icons, base styles
|
|
38
|
-
│ │ └── src/
|
|
39
|
-
│ │ └── all-icons.ts # Icon name list
|
|
40
|
-
│ │ └── scss/
|
|
41
|
-
│ │ ├── colors/_variables.scss
|
|
42
|
-
│ │ ├── fonts/_variables.scss
|
|
43
|
-
│ │ ├── density/_variables.scss
|
|
44
|
-
│ │ ├── animation/_animations.scss
|
|
45
|
-
│ │ ├── animation/_transitions.scss
|
|
46
|
-
│ │ └── _variables.scss # spacing / sizing
|
|
47
|
-
│ └── mcp-server/ # This package
|
|
48
|
-
│ └── src/
|
|
49
|
-
│ ├── index.ts # Bootstrap — connects transport, registers tools/prompts
|
|
50
|
-
│ ├── server.ts # McpServer singleton and lifecycle handlers
|
|
51
|
-
│ ├── types.ts # Framework type and FRAMEWORK_PKG mapping
|
|
52
|
-
│ ├── build-manifest.ts # Build-time script — generates manifest.json
|
|
53
|
-
│ ├── manifest.json # Generated — do not edit manually
|
|
54
|
-
│ ├── tools/ # Tool handler implementations
|
|
55
|
-
│ ├── prompts/ # Prompt handler implementations
|
|
56
|
-
│ └── utils/ # Shared utilities (path, manifest, formatting, async)
|
|
57
|
-
└── output/
|
|
58
|
-
├── react/ # Generated React code
|
|
59
|
-
│ └── src/components/
|
|
60
|
-
│ └── {component}/
|
|
61
|
-
│ └── examples/ # *.example.tsx
|
|
62
|
-
├── angular/ # Generated Angular code
|
|
63
|
-
│ └── src/components/
|
|
64
|
-
│ └── {component}/
|
|
65
|
-
│ └── examples/ # *.example.ts
|
|
66
|
-
└── vue/ # Generated Vue code
|
|
67
|
-
└── src/components/
|
|
68
|
-
└── {component}/
|
|
69
|
-
└── examples/ # *.example.vue
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
## MCP Concepts in This Server
|
|
73
|
-
|
|
74
|
-
### Tools (LLM-callable functions)
|
|
75
|
-
|
|
76
|
-
| Tool | Description |
|
|
77
|
-
|---|---|
|
|
78
|
-
| `list_components` | Returns all available component names |
|
|
79
|
-
| `get_component_props` | Returns the raw `model.ts` content for a component |
|
|
80
|
-
| `get_component_details` | Returns the list of example names from the showcase file |
|
|
81
|
-
| `get_example_code` | Returns generated framework-specific source for a component example |
|
|
82
|
-
| `list_icons` | Returns all valid icon names from `all-icons.ts` |
|
|
83
|
-
| `list_design_token_categories` | Returns all available design token categories |
|
|
84
|
-
| `get_design_tokens` | Returns CSS custom properties and SCSS variables for a token category |
|
|
85
|
-
| `docs_search` | Searches conceptual docs (guidelines, A11y, migration, ADRs) or component-specific markdown docs |
|
|
86
|
-
| `list_migration_guides` | Returns all available migration guide names from the manifest |
|
|
87
|
-
| `get_migration_guide` | Returns the full markdown content of a specific migration guide |
|
|
88
|
-
|
|
89
|
-
### Manifest (embedded data)
|
|
90
|
-
|
|
91
|
-
At build time, `build-manifest.ts` collects all component metadata and example source code into `src/manifest.json`. This file is bundled into the final `index.js` so the server can operate without access to the monorepo source tree — for example when invoked via `npx @db-ux/core-foundations db-ux-mcp` from a consumer project.
|
|
92
|
-
|
|
93
|
-
## Communication
|
|
94
|
-
|
|
95
|
-
The server uses `StdioServerTransport` from the MCP SDK. It is started as a child process by the MCP client:
|
|
96
|
-
|
|
97
|
-
```json
|
|
98
|
-
{
|
|
99
|
-
"mcpServers": {
|
|
100
|
-
"db-ux": {
|
|
101
|
-
"command": "npx",
|
|
102
|
-
"args": ["-y", "@db-ux/mcp-server", "db-ux-mcp"]
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
During development inside the monorepo, `tsx` can be used for live file access:
|
|
109
|
-
|
|
110
|
-
```json
|
|
111
|
-
{
|
|
112
|
-
"mcpServers": {
|
|
113
|
-
"db-ux": {
|
|
114
|
-
"command": "npx",
|
|
115
|
-
"args": ["tsx", "packages/mcp-server/src/index.ts"]
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## Development
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
# Install dependencies (from monorepo root)
|
|
125
|
-
npm install
|
|
126
|
-
|
|
127
|
-
# Start server directly (development mode, live file access)
|
|
128
|
-
npm run dev --workspace=packages/mcp-server
|
|
129
|
-
|
|
130
|
-
# Production build (generates manifest + standalone bundle)
|
|
131
|
-
npm run build --workspace=packages/mcp-server
|
|
132
|
-
```
|