mozaic-mcp-server 2.0.5 → 2.0.6
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 +382 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
# Mozaic MCP Server
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/mozaic-mcp-server)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://merzoukemansouri.github.io/adeo-mozaic-mcp/)
|
|
6
|
+
|
|
7
|
+
Self-contained Claude Code skills and MCP server for the [Mozaic Design System](https://mozaic.adeo.cloud/) by ADEO.
|
|
8
|
+
|
|
9
|
+
**📚 [Documentation](https://merzoukemansouri.github.io/adeo-mozaic-mcp/) • 🎮 [MCP Playground](https://merzoukemansouri.github.io/adeo-mozaic-mcp/#/playground)**
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
This package provides two complementary tools for working with the Mozaic Design System in AI assistants:
|
|
14
|
+
|
|
15
|
+
- **🤖 Claude Code Skills** - 5 interactive skills for guided component building and design token usage
|
|
16
|
+
- **🔌 MCP Server** - Model Context Protocol server with 11 tools for programmatic access to Mozaic resources
|
|
17
|
+
|
|
18
|
+
### What's Included
|
|
19
|
+
|
|
20
|
+
| Resource Type | Count | Description |
|
|
21
|
+
|--------------|-------|-------------|
|
|
22
|
+
| Design Tokens | 586 | Colors, typography, spacing, shadows, borders, breakpoints |
|
|
23
|
+
| Components | 91 | Vue 3 and React components with full documentation |
|
|
24
|
+
| Icons | 1,473 | SVG icons across 15 categories |
|
|
25
|
+
| CSS Utilities | 6 | Flexy grid, Container, Margin, Padding, Ratio, Scroll |
|
|
26
|
+
| Documentation | 281 | Searchable usage guides and best practices |
|
|
27
|
+
| MCP Tools | 11 | Programmatic access to all resources |
|
|
28
|
+
| Claude Skills | 5 | Interactive workflows for Vue, React, and agnostic use |
|
|
29
|
+
|
|
30
|
+
## Quick Start
|
|
31
|
+
|
|
32
|
+
### Interactive Installation (Recommended)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Use arrow keys and space to select components, then press Enter to install.
|
|
39
|
+
|
|
40
|
+
### One-Command Installation
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Install everything (skills + MCP server)
|
|
44
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools all
|
|
45
|
+
|
|
46
|
+
# Install only skills (for Claude Code)
|
|
47
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools skills
|
|
48
|
+
|
|
49
|
+
# Install only MCP server (for Claude Desktop)
|
|
50
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools mcp
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Check Installation Status
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools list
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Try Before Installing
|
|
60
|
+
|
|
61
|
+
Test the MCP tools directly in your browser without installation:
|
|
62
|
+
|
|
63
|
+
**[🎮 Open MCP Playground](https://merzoukemansouri.github.io/adeo-mozaic-mcp/#/playground)**
|
|
64
|
+
|
|
65
|
+
The playground lets you:
|
|
66
|
+
- Test all 11 MCP tools interactively
|
|
67
|
+
- Browse components, tokens, and icons
|
|
68
|
+
- Generate code snippets
|
|
69
|
+
- Search documentation
|
|
70
|
+
|
|
71
|
+
## Claude Code Skills
|
|
72
|
+
|
|
73
|
+
5 self-contained skills that provide interactive workflows for building with Mozaic.
|
|
74
|
+
|
|
75
|
+
### Available Skills
|
|
76
|
+
|
|
77
|
+
| Skill | Description | Use Case |
|
|
78
|
+
|-------|-------------|----------|
|
|
79
|
+
| **mozaic-vue-builder** | Interactive Vue 3 component generator | Building Vue apps with Mozaic |
|
|
80
|
+
| **mozaic-react-builder** | Interactive React/TSX component generator | Building React apps with Mozaic |
|
|
81
|
+
| **mozaic-design-tokens** | Design tokens and styling expert | Accessing colors, typography, spacing |
|
|
82
|
+
| **mozaic-css-utilities** | CSS utility classes and layouts | Building responsive layouts |
|
|
83
|
+
| **mozaic-icons** | Icon search and integration | Finding and using Mozaic icons |
|
|
84
|
+
|
|
85
|
+
### How Skills Work
|
|
86
|
+
|
|
87
|
+
Skills are activated automatically in Claude Code based on context, or you can invoke them manually:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
User: "I need a login form with Mozaic"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Claude Code will automatically activate the appropriate skill (Vue or React builder) and guide you through:
|
|
94
|
+
1. Component selection
|
|
95
|
+
2. Props configuration
|
|
96
|
+
3. Code generation
|
|
97
|
+
4. Installation instructions
|
|
98
|
+
|
|
99
|
+
**See [SKILLS.md](./SKILLS.md) for detailed documentation.**
|
|
100
|
+
|
|
101
|
+
## MCP Server Tools
|
|
102
|
+
|
|
103
|
+
11 programmatic tools for accessing Mozaic resources via the Model Context Protocol.
|
|
104
|
+
|
|
105
|
+
### Available Tools
|
|
106
|
+
|
|
107
|
+
| Tool | Category | Description |
|
|
108
|
+
|------|----------|-------------|
|
|
109
|
+
| `get_design_tokens` | Tokens | Query tokens by category (colors, typography, spacing, etc.) |
|
|
110
|
+
| `get_component_info` | Components | Get component props, slots, events, and documentation |
|
|
111
|
+
| `list_components` | Components | List components by category or framework |
|
|
112
|
+
| `generate_vue_component` | Code Gen | Generate Vue 3 SFC code with props |
|
|
113
|
+
| `generate_react_component` | Code Gen | Generate React/TSX code with TypeScript |
|
|
114
|
+
| `search_documentation` | Docs | Full-text search across 281 documentation pages |
|
|
115
|
+
| `get_css_utility` | CSS | Get CSS utility classes and examples |
|
|
116
|
+
| `list_css_utilities` | CSS | List available CSS utilities |
|
|
117
|
+
| `search_icons` | Icons | Search 1,473 icons by name, type, or category |
|
|
118
|
+
| `get_icon` | Icons | Get icon SVG and framework code |
|
|
119
|
+
| `get_install_info` | Install | Get npm/yarn/pnpm installation commands |
|
|
120
|
+
|
|
121
|
+
### Configuration
|
|
122
|
+
|
|
123
|
+
Add to your Claude Code or Claude Desktop settings:
|
|
124
|
+
|
|
125
|
+
**For Claude Code** (in `.claude/settings.json`):
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"mcpServers": {
|
|
129
|
+
"mozaic": {
|
|
130
|
+
"command": "npx",
|
|
131
|
+
"args": ["-y", "mozaic-mcp-server"]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**For Claude Desktop** (in `~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"mcpServers": {
|
|
141
|
+
"mozaic": {
|
|
142
|
+
"command": "npx",
|
|
143
|
+
"args": ["-y", "mozaic-mcp-server"]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Usage Examples
|
|
150
|
+
|
|
151
|
+
### Using Skills in Claude Code
|
|
152
|
+
|
|
153
|
+
Skills activate automatically based on your request:
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
You: "I need a responsive grid with 3 columns"
|
|
157
|
+
Claude: [activates mozaic-css-utilities skill]
|
|
158
|
+
Here's the Flexy grid solution...
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
You: "Add a shopping cart icon"
|
|
163
|
+
Claude: [activates mozaic-icons skill]
|
|
164
|
+
I found these cart icons...
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Using MCP Tools Programmatically
|
|
168
|
+
|
|
169
|
+
When configured, Claude can use MCP tools directly:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
You: "What design tokens are available?"
|
|
173
|
+
Claude: [calls get_design_tokens tool]
|
|
174
|
+
Found 586 tokens across 7 categories...
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
You: "Generate a React button component"
|
|
179
|
+
Claude: [calls get_component_info, then generate_react_component]
|
|
180
|
+
Here's your Button component with TypeScript...
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## CLI Commands
|
|
184
|
+
|
|
185
|
+
The `adeo-mozaic-install-tools` CLI provides several commands:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Interactive mode (default)
|
|
189
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools
|
|
190
|
+
|
|
191
|
+
# Install all components
|
|
192
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools all
|
|
193
|
+
|
|
194
|
+
# Install skills only
|
|
195
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools skills
|
|
196
|
+
|
|
197
|
+
# Install MCP server only
|
|
198
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools mcp
|
|
199
|
+
|
|
200
|
+
# Check status
|
|
201
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools list
|
|
202
|
+
|
|
203
|
+
# Remove components
|
|
204
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools remove skills
|
|
205
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools remove mcp
|
|
206
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools remove all
|
|
207
|
+
|
|
208
|
+
# Show help
|
|
209
|
+
npx -p mozaic-mcp-server@latest adeo-mozaic-install-tools --help
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Architecture
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
┌─────────────────────────────────────┐
|
|
216
|
+
│ Claude Code / Claude Desktop │
|
|
217
|
+
│ │
|
|
218
|
+
│ ┌─────────────┐ ┌─────────────┐ │
|
|
219
|
+
│ │ Skills │ │ MCP Server │ │
|
|
220
|
+
│ │ (5 total) │ │ (11 tools) │ │
|
|
221
|
+
│ └─────────────┘ └─────────────┘ │
|
|
222
|
+
│ │ │ │
|
|
223
|
+
└──────────┼────────────────┼─────────┘
|
|
224
|
+
│ │
|
|
225
|
+
▼ ▼
|
|
226
|
+
┌──────────────────────────┐
|
|
227
|
+
│ Shell Scripts (14) │
|
|
228
|
+
│ ↓ sqlite3 queries │
|
|
229
|
+
└──────────────────────────┘
|
|
230
|
+
▼
|
|
231
|
+
┌──────────────────────────┐
|
|
232
|
+
│ SQLite Database │
|
|
233
|
+
│ ~/.claude/mozaic.db │
|
|
234
|
+
│ │
|
|
235
|
+
│ • 586 tokens │
|
|
236
|
+
│ • 91 components │
|
|
237
|
+
│ • 1,473 icons │
|
|
238
|
+
│ • 281 docs │
|
|
239
|
+
└──────────────────────────┘
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## File Locations
|
|
243
|
+
|
|
244
|
+
After installation:
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
~/.claude/
|
|
248
|
+
├── mozaic.db # SQLite database (all Mozaic data)
|
|
249
|
+
├── skills/ # Claude Code skills
|
|
250
|
+
│ ├── mozaic-vue-builder/
|
|
251
|
+
│ ├── mozaic-react-builder/
|
|
252
|
+
│ ├── mozaic-design-tokens/
|
|
253
|
+
│ ├── mozaic-css-utilities/
|
|
254
|
+
│ └── mozaic-icons/
|
|
255
|
+
└── (Claude Code settings.json) # MCP server config
|
|
256
|
+
|
|
257
|
+
~/Library/Application Support/Claude/
|
|
258
|
+
└── claude_desktop_config.json # Claude Desktop MCP config
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Development
|
|
262
|
+
|
|
263
|
+
### Prerequisites
|
|
264
|
+
|
|
265
|
+
- Node.js ≥25.2.0
|
|
266
|
+
- pnpm (recommended)
|
|
267
|
+
|
|
268
|
+
### Setup
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
# Clone the repository
|
|
272
|
+
git clone https://github.com/MerzoukeMansouri/adeo-mozaic-mcp.git
|
|
273
|
+
cd mozaic-mcp-server
|
|
274
|
+
|
|
275
|
+
# Install dependencies
|
|
276
|
+
pnpm install
|
|
277
|
+
|
|
278
|
+
# Build the project (compiles TypeScript + builds database)
|
|
279
|
+
pnpm build
|
|
280
|
+
|
|
281
|
+
# Run tests
|
|
282
|
+
pnpm test
|
|
283
|
+
|
|
284
|
+
# Start MCP server in debug mode
|
|
285
|
+
pnpm start:debug
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Project Structure
|
|
289
|
+
|
|
290
|
+
```
|
|
291
|
+
mozaic-mcp-server/
|
|
292
|
+
├── src/ # TypeScript source code
|
|
293
|
+
│ ├── index.ts # MCP server entry point
|
|
294
|
+
│ ├── tools/ # MCP tool implementations
|
|
295
|
+
│ └── database/ # Database utilities
|
|
296
|
+
├── skills/ # Claude Code skills
|
|
297
|
+
│ ├── mozaic-vue-builder/
|
|
298
|
+
│ │ ├── skill.md # Skill instructions
|
|
299
|
+
│ │ └── scripts/ # Shell scripts (4)
|
|
300
|
+
│ └── ... # Other skills
|
|
301
|
+
├── scripts/ # Build and utility scripts
|
|
302
|
+
│ ├── build-index.ts # Database builder
|
|
303
|
+
│ └── generate-docs.ts # Documentation generator
|
|
304
|
+
├── data/ # Generated database
|
|
305
|
+
│ └── mozaic.db
|
|
306
|
+
├── repos/ # Mozaic Design System repositories (git submodules)
|
|
307
|
+
│ ├── mozaic-design-system/
|
|
308
|
+
│ ├── mozaic-vue/
|
|
309
|
+
│ └── mozaic-react/
|
|
310
|
+
├── bin/ # CLI entry points
|
|
311
|
+
│ └── install.js # Installation CLI
|
|
312
|
+
└── website/ # Documentation website
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Building the Database
|
|
316
|
+
|
|
317
|
+
The SQLite database is built from the Mozaic Design System repositories:
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
# Update submodules
|
|
321
|
+
git submodule update --init --recursive
|
|
322
|
+
|
|
323
|
+
# Build database
|
|
324
|
+
pnpm build
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
This indexes:
|
|
328
|
+
- Design tokens from `mozaic-design-system/packages/tokens`
|
|
329
|
+
- Components from `mozaic-vue` and `mozaic-react`
|
|
330
|
+
- Icons from `mozaic-design-system/packages/icons`
|
|
331
|
+
- Documentation from all repositories
|
|
332
|
+
|
|
333
|
+
## Contributing
|
|
334
|
+
|
|
335
|
+
Contributions are welcome! Please follow these guidelines:
|
|
336
|
+
|
|
337
|
+
1. Fork the repository
|
|
338
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
339
|
+
3. Commit your changes using [Conventional Commits](https://www.conventionalcommits.org/)
|
|
340
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
341
|
+
5. Open a Pull Request
|
|
342
|
+
|
|
343
|
+
### Commit Convention
|
|
344
|
+
|
|
345
|
+
We use semantic versioning with conventional commits:
|
|
346
|
+
|
|
347
|
+
- `feat:` - New feature (minor version bump)
|
|
348
|
+
- `fix:` - Bug fix (patch version bump)
|
|
349
|
+
- `feat!:` or `BREAKING CHANGE:` - Breaking change (major version bump)
|
|
350
|
+
- `chore:`, `docs:`, `style:`, `refactor:`, `test:` - No version bump
|
|
351
|
+
|
|
352
|
+
## Resources
|
|
353
|
+
|
|
354
|
+
### Documentation & Tools
|
|
355
|
+
- **📚 Documentation**: https://merzoukemansouri.github.io/adeo-mozaic-mcp/
|
|
356
|
+
- **🎮 MCP Playground**: https://merzoukemansouri.github.io/adeo-mozaic-mcp/#/playground
|
|
357
|
+
- **GitHub**: https://github.com/MerzoukeMansouri/adeo-mozaic-mcp
|
|
358
|
+
- **npm**: https://www.npmjs.com/package/mozaic-mcp-server
|
|
359
|
+
|
|
360
|
+
### Related Resources
|
|
361
|
+
- **Mozaic Design System**: https://mozaic.adeo.cloud/
|
|
362
|
+
- **MCP Protocol**: https://modelcontextprotocol.io/
|
|
363
|
+
- **Claude Code**: https://code.claude.com/
|
|
364
|
+
|
|
365
|
+
## License
|
|
366
|
+
|
|
367
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
368
|
+
|
|
369
|
+
## Support
|
|
370
|
+
|
|
371
|
+
For issues or questions:
|
|
372
|
+
- 📚 Read the [online documentation](https://merzoukemansouri.github.io/adeo-mozaic-mcp/)
|
|
373
|
+
- 🎮 Try the [MCP playground](https://merzoukemansouri.github.io/adeo-mozaic-mcp/#/playground)
|
|
374
|
+
- 🐛 Open an issue on [GitHub](https://github.com/MerzoukeMansouri/adeo-mozaic-mcp/issues)
|
|
375
|
+
- 📖 Check the [Skills documentation](SKILLS.md)
|
|
376
|
+
- 🎨 Review [Mozaic Design System docs](https://mozaic.adeo.cloud/)
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
**Built with ❤️ for the ADEO community**
|
|
381
|
+
|
|
382
|
+
*Mozaic Design System is maintained by ADEO*
|