@thesage/mcp 0.1.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 +223 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1170 -0
- package/dist/index.mjs +1172 -0
- package/package.json +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# @shalomormsby/mcp
|
|
2
|
+
|
|
3
|
+
**Model Context Protocol server for Sage UI**
|
|
4
|
+
|
|
5
|
+
Enable AI assistants like Claude Desktop, Cursor, and VS Code to browse, search, and install Sage UI components directly through natural language.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- 🔍 **Browse all 48 components** across 7 functional categories
|
|
10
|
+
- 🔎 **Semantic search** by keywords, use cases, or functionality
|
|
11
|
+
- 📖 **Detailed component info** including props, dependencies, and examples
|
|
12
|
+
- 📦 **Installation instructions** with all required dependencies
|
|
13
|
+
- 🤖 **AI-native** - Built specifically for LLM interaction
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
### Quick Start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm add -D @shalomormsby/mcp
|
|
21
|
+
# or
|
|
22
|
+
npm install --save-dev @shalomormsby/mcp
|
|
23
|
+
# or
|
|
24
|
+
yarn add -D @shalomormsby/mcp
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### MCP Client Configuration
|
|
28
|
+
|
|
29
|
+
#### Claude Desktop
|
|
30
|
+
|
|
31
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"mcpServers": {
|
|
36
|
+
"sds": {
|
|
37
|
+
"command": "npx",
|
|
38
|
+
"args": ["@shalomormsby/mcp"]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Restart Claude Desktop to activate.
|
|
45
|
+
|
|
46
|
+
#### Cursor
|
|
47
|
+
|
|
48
|
+
Add to `.cursor/mcp.json` in your project:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"mcpServers": {
|
|
53
|
+
"sds": {
|
|
54
|
+
"command": "npx",
|
|
55
|
+
"args": ["@shalomormsby/mcp"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### VS Code
|
|
62
|
+
|
|
63
|
+
Add to `.vscode/mcp.json`:
|
|
64
|
+
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"servers": {
|
|
68
|
+
"sds": {
|
|
69
|
+
"command": "npx",
|
|
70
|
+
"args": ["@shalomormsby/mcp"]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Available Tools
|
|
77
|
+
|
|
78
|
+
The MCP server provides four tools for AI interaction:
|
|
79
|
+
|
|
80
|
+
### 1. `list_components`
|
|
81
|
+
|
|
82
|
+
List all available components, optionally filtered by category.
|
|
83
|
+
|
|
84
|
+
**Parameters:**
|
|
85
|
+
- `category` (optional): Filter by `actions`, `forms`, `navigation`, `overlays`, `feedback`, `data-display`, or `layout`
|
|
86
|
+
|
|
87
|
+
**Example AI prompts:**
|
|
88
|
+
- "Show me all Sage UI components"
|
|
89
|
+
- "List all form components"
|
|
90
|
+
- "What overlay components are available?"
|
|
91
|
+
|
|
92
|
+
### 2. `search_components`
|
|
93
|
+
|
|
94
|
+
Search for components by keywords, descriptions, or use cases.
|
|
95
|
+
|
|
96
|
+
**Parameters:**
|
|
97
|
+
- `query` (required): Search term
|
|
98
|
+
|
|
99
|
+
**Example AI prompts:**
|
|
100
|
+
- "Find components for date selection"
|
|
101
|
+
- "Search for dropdown components"
|
|
102
|
+
- "Show me components for displaying user profiles"
|
|
103
|
+
|
|
104
|
+
### 3. `get_component`
|
|
105
|
+
|
|
106
|
+
Get detailed information about a specific component.
|
|
107
|
+
|
|
108
|
+
**Parameters:**
|
|
109
|
+
- `name` (required): Component name (case-insensitive, accepts PascalCase or kebab-case)
|
|
110
|
+
|
|
111
|
+
**Example AI prompts:**
|
|
112
|
+
- "Tell me about the Button component"
|
|
113
|
+
- "What props does the DataTable have?"
|
|
114
|
+
- "Show me details for the date-picker"
|
|
115
|
+
|
|
116
|
+
### 4. `install_component`
|
|
117
|
+
|
|
118
|
+
Get installation instructions for a component.
|
|
119
|
+
|
|
120
|
+
**Parameters:**
|
|
121
|
+
- `name` (required): Component name to install
|
|
122
|
+
|
|
123
|
+
**Example AI prompts:**
|
|
124
|
+
- "Install the Dialog component"
|
|
125
|
+
- "How do I add the DataTable to my project?"
|
|
126
|
+
- "Show me how to install the ComboBox"
|
|
127
|
+
|
|
128
|
+
## Component Categories
|
|
129
|
+
|
|
130
|
+
The Sage UI organizes components functionally (not atomically):
|
|
131
|
+
|
|
132
|
+
- **Actions** (3) - Interactive elements that trigger behaviors
|
|
133
|
+
- **Forms** (11) - Input controls for data collection
|
|
134
|
+
- **Navigation** (6) - Moving through content and hierarchy
|
|
135
|
+
- **Overlays** (9) - Contextual content above the main UI
|
|
136
|
+
- **Feedback** (5) - System state communication
|
|
137
|
+
- **Data Display** (6) - Presenting information visually
|
|
138
|
+
- **Layout** (8) - Spatial organization
|
|
139
|
+
|
|
140
|
+
## Usage Examples
|
|
141
|
+
|
|
142
|
+
Once configured, you can interact with the server through your AI assistant:
|
|
143
|
+
|
|
144
|
+
### Browse Components
|
|
145
|
+
|
|
146
|
+
> "Show me all components in the Sage UI"
|
|
147
|
+
|
|
148
|
+
The AI will use `list_components` to display all 48 components organized by category.
|
|
149
|
+
|
|
150
|
+
### Search for Specific Functionality
|
|
151
|
+
|
|
152
|
+
> "I need a component for selecting dates"
|
|
153
|
+
|
|
154
|
+
The AI will use `search_components` with query "date" and find:
|
|
155
|
+
- Calendar
|
|
156
|
+
- DatePicker
|
|
157
|
+
|
|
158
|
+
### Get Component Details
|
|
159
|
+
|
|
160
|
+
> "Tell me about the Button component"
|
|
161
|
+
|
|
162
|
+
The AI will use `get_component` to show:
|
|
163
|
+
- Description
|
|
164
|
+
- Use cases
|
|
165
|
+
- Dependencies
|
|
166
|
+
- Import statements
|
|
167
|
+
- Documentation link
|
|
168
|
+
|
|
169
|
+
### Install a Component
|
|
170
|
+
|
|
171
|
+
> "Add the Dialog component to my project"
|
|
172
|
+
|
|
173
|
+
The AI will use `install_component` to provide:
|
|
174
|
+
- Package installation commands
|
|
175
|
+
- Peer dependency requirements
|
|
176
|
+
- Import examples
|
|
177
|
+
- Usage code
|
|
178
|
+
|
|
179
|
+
## Architecture
|
|
180
|
+
|
|
181
|
+
The MCP server consists of:
|
|
182
|
+
|
|
183
|
+
1. **Component Registry** (`src/registry.ts`) - Metadata for all 48 @thesage/ui components
|
|
184
|
+
2. **MCP Server** (`src/index.ts`) - Model Context Protocol implementation
|
|
185
|
+
3. **Tool Handlers** - Four tools for listing, searching, viewing, and installing
|
|
186
|
+
|
|
187
|
+
All data is statically defined - no network requests or external dependencies required.
|
|
188
|
+
|
|
189
|
+
## Development
|
|
190
|
+
|
|
191
|
+
### Build
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
pnpm build
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Test Locally
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
pnpm start
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
The server runs in stdio mode, communicating via stdin/stdout per the MCP specification.
|
|
204
|
+
|
|
205
|
+
## Documentation
|
|
206
|
+
|
|
207
|
+
- **Full Documentation**: https://ui.shalomormsby.com/
|
|
208
|
+
- **GitHub**: https://github.com/shalomormsby/ecosystem
|
|
209
|
+
- **MCP Specification**: https://modelcontextprotocol.io/
|
|
210
|
+
|
|
211
|
+
## Support
|
|
212
|
+
|
|
213
|
+
For issues or questions:
|
|
214
|
+
- GitHub Issues: https://github.com/shalomormsby/ecosystem/issues
|
|
215
|
+
- Documentation: https://ui.shalomormsby.com/#mcp-server
|
|
216
|
+
|
|
217
|
+
## License
|
|
218
|
+
|
|
219
|
+
MIT © Shalom Ormsby
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
**Part of the [Sage UI](https://ui.shalomormsby.com/) - Build lovable products at AI speed.**
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|