@mohityadav0903/branintelle-mcp 3.1.0 → 3.1.1
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/MCP-V3-RELEASE-NOTES.md +32 -74
- package/mcp-server.js +33 -29
- package/package.json +1 -1
package/MCP-V3-RELEASE-NOTES.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 🎉 MCP v3.
|
|
1
|
+
# 🎉 MCP v3.0 - Enhanced with Screen Patterns & Figma Screenshots
|
|
2
2
|
|
|
3
3
|
## ✅ What Was Completed
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ Comprehensive screen pattern database including:
|
|
|
24
24
|
- Key interactions
|
|
25
25
|
- **Screenshot URLs** 🎯
|
|
26
26
|
|
|
27
|
-
### 3. **Enhanced MCP Server (v3.
|
|
27
|
+
### 3. **Enhanced MCP Server (v3.0.0)**
|
|
28
28
|
|
|
29
29
|
#### 🆕 New Tools Added:
|
|
30
30
|
|
|
@@ -72,21 +72,6 @@ search_by_pattern({
|
|
|
72
72
|
search_by_pattern({ workflow: "active_management" })
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
**🆕 `get_screen_image` - NEW IN v3.1!**
|
|
76
|
-
```typescript
|
|
77
|
-
// Fetch screenshot as base64 data URL for LLM vision
|
|
78
|
-
get_screen_image({ screen_id: "screen_001" })
|
|
79
|
-
|
|
80
|
-
// Returns:
|
|
81
|
-
{
|
|
82
|
-
screen_id: "screen_001",
|
|
83
|
-
screen_name: "Briefs Listing - Drafts Tab",
|
|
84
|
-
image_data_url: "data:image/png;base64,iVBORw0KGgoAAAANS...",
|
|
85
|
-
image_url: "https://...",
|
|
86
|
-
size_kb: 245
|
|
87
|
-
}
|
|
88
|
-
```
|
|
89
|
-
|
|
90
75
|
### 4. **All Existing Tools Still Work**
|
|
91
76
|
✅ `list_components`
|
|
92
77
|
✅ `get_component_docs`
|
|
@@ -100,39 +85,37 @@ get_screen_image({ screen_id: "screen_001" })
|
|
|
100
85
|
|
|
101
86
|
### Example 1: "Show me how to build a listing page"
|
|
102
87
|
```typescript
|
|
103
|
-
//
|
|
88
|
+
// LLM calls:
|
|
104
89
|
get_screen_patterns({ screen_type: "listing_page" })
|
|
105
90
|
|
|
106
|
-
//
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
91
|
+
// Gets back:
|
|
92
|
+
{
|
|
93
|
+
screens: [{
|
|
94
|
+
name: "Briefs Listing",
|
|
95
|
+
screenshot_url: "https://...", // ← LLM can SEE the screen!
|
|
96
|
+
components_used: ["stats-cards", "tabs", "scrollable-data-table"],
|
|
97
|
+
features: { has_bulk_selection: true, has_tabs: true }
|
|
98
|
+
}]
|
|
99
|
+
}
|
|
110
100
|
|
|
111
|
-
//
|
|
101
|
+
// Then LLM can:
|
|
112
102
|
get_component_docs({ components: ["StatsCards", "Tabs", "ScrollableDataTable"] })
|
|
113
103
|
|
|
114
|
-
// And implement the exact pattern
|
|
104
|
+
// And implement the exact pattern!
|
|
115
105
|
```
|
|
116
106
|
|
|
117
|
-
### Example 2: "
|
|
107
|
+
### Example 2: "Find screens with inline actions"
|
|
118
108
|
```typescript
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
// Returns
|
|
122
|
-
// LLM can identify:
|
|
123
|
-
// - "Assign Buyer" inline action buttons
|
|
124
|
-
// - Time urgency indicators
|
|
125
|
-
// - Stats cards layout
|
|
126
|
-
// - Bulk selection checkboxes
|
|
109
|
+
search_by_pattern({ features: ["inline_actions"] })
|
|
110
|
+
|
|
111
|
+
// Returns screen_002 (RFP Triage) with screenshot showing inline "Assign Buyer" buttons
|
|
127
112
|
```
|
|
128
113
|
|
|
129
|
-
### Example 3: "Show me wizard
|
|
114
|
+
### Example 3: "Show me wizard forms"
|
|
130
115
|
```typescript
|
|
131
116
|
get_screen_patterns({ screen_type: "form_wizard" })
|
|
132
|
-
// Returns screen_004 and screen_005
|
|
133
117
|
|
|
134
|
-
|
|
135
|
-
// LLM sees the step-by-step wizard with visual stepper
|
|
118
|
+
// Returns screen_004 and screen_005 with step-by-step wizard screenshots
|
|
136
119
|
```
|
|
137
120
|
|
|
138
121
|
---
|
|
@@ -166,46 +149,28 @@ cd /Users/mohityadav/Downloads/branintelle-mcp
|
|
|
166
149
|
npm publish
|
|
167
150
|
```
|
|
168
151
|
|
|
169
|
-
Version: **3.
|
|
152
|
+
Version: **3.0.0**
|
|
170
153
|
|
|
171
154
|
---
|
|
172
155
|
|
|
173
156
|
## 🎁 **Benefits**
|
|
174
157
|
|
|
175
|
-
✅ **Visual Context** - LLMs can
|
|
158
|
+
✅ **Visual Context** - LLMs can see actual screens
|
|
176
159
|
✅ **Pattern-Based** - Find by workflow, not just components
|
|
177
160
|
✅ **Feature-Driven** - Search by capabilities (bulk ops, filters, etc.)
|
|
178
|
-
✅ **
|
|
161
|
+
✅ **Screenshot URLs** - Direct visual reference
|
|
179
162
|
✅ **Component Mapping** - Know exactly which components to use
|
|
180
163
|
✅ **Workflow Guidance** - Understand the user flow
|
|
181
|
-
✅ **No External Dependencies** - Images fetched on-demand from S3
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## 🆕 **What's New in v3.1?**
|
|
186
|
-
|
|
187
|
-
### `get_screen_image` Tool
|
|
188
|
-
- **Fetches screenshots from S3** and converts to base64
|
|
189
|
-
- **Returns data URLs** in `data:image/png;base64,...` format
|
|
190
|
-
- **LLM vision compatible** - Can be analyzed by Claude, GPT-4V, etc.
|
|
191
|
-
- **245 KB average** - Optimized PNG images
|
|
192
|
-
- **On-demand loading** - Only fetches when requested
|
|
193
|
-
|
|
194
|
-
### Why Base64?
|
|
195
|
-
- ✅ LLMs can "see" the image directly
|
|
196
|
-
- ✅ No external image hosting required for LLM context
|
|
197
|
-
- ✅ Works with any vision-enabled model
|
|
198
|
-
- ✅ Self-contained responses
|
|
199
164
|
|
|
200
165
|
---
|
|
201
166
|
|
|
202
167
|
## 📝 **Next Steps**
|
|
203
168
|
|
|
204
|
-
1. ✅ Publish MCP v3.
|
|
205
|
-
2. ✅ Test with Claude/LLMs
|
|
169
|
+
1. ✅ Publish MCP v3.0.0
|
|
170
|
+
2. ✅ Test with Claude/LLMs
|
|
206
171
|
3. ⏳ Add more screens as they're designed
|
|
207
|
-
4. ⏳ Consider
|
|
208
|
-
5. ⏳ Add
|
|
172
|
+
4. ⏳ Consider adding component-to-screen mapping
|
|
173
|
+
5. ⏳ Add video/GIF support for interactions
|
|
209
174
|
|
|
210
175
|
---
|
|
211
176
|
|
|
@@ -214,18 +179,11 @@ Version: **3.1.0**
|
|
|
214
179
|
Try these in your MCP-enabled LLM:
|
|
215
180
|
|
|
216
181
|
```
|
|
217
|
-
"Show me
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
"
|
|
221
|
-
→ get_screen_image({ screen_id: "screen_002" }) + pattern analysis
|
|
222
|
-
|
|
223
|
-
"Find screens with bulk selection and show me one"
|
|
224
|
-
→ search_by_pattern + get_screen_image
|
|
225
|
-
|
|
226
|
-
"Show me all wizard form screens"
|
|
227
|
-
→ get_screen_patterns({ screen_type: "form_wizard" }) + get_screen_image for each
|
|
182
|
+
"Show me listing page patterns with screenshots"
|
|
183
|
+
"Find screens that have bulk selection"
|
|
184
|
+
"What components are used in the RFP triage screen?"
|
|
185
|
+
"Show me wizard form examples"
|
|
228
186
|
```
|
|
229
187
|
|
|
230
|
-
The LLM will now get back
|
|
188
|
+
The LLM will now get back visual references + component documentation! 🎯
|
|
231
189
|
|
package/mcp-server.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Branintelle UI Library - MCP Server v3.
|
|
5
|
-
* Enhanced with screen patterns, Figma screenshots, and
|
|
4
|
+
* Branintelle UI Library - MCP Server v3.0
|
|
5
|
+
* Enhanced with screen patterns, Figma screenshots, and workflow-based search
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
@@ -19,20 +19,7 @@ import https from 'https';
|
|
|
19
19
|
const __filename = fileURLToPath(import.meta.url);
|
|
20
20
|
const __dirname = dirname(__filename);
|
|
21
21
|
|
|
22
|
-
//
|
|
23
|
-
const designTokens = JSON.parse(
|
|
24
|
-
readFileSync(join(__dirname, 'design-tokens.json'), 'utf-8')
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
// Load component data
|
|
28
|
-
import { COMPONENTS_DATA, COMPONENT_CATEGORIES, USAGE_PATTERNS } from './components-data.js';
|
|
29
|
-
|
|
30
|
-
// Load screen patterns
|
|
31
|
-
const screenPatterns = JSON.parse(
|
|
32
|
-
readFileSync(join(__dirname, 'screen-patterns.json'), 'utf-8')
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
// Helper function to fetch image and convert to base64
|
|
22
|
+
// Helper function to fetch image from URL and convert to base64
|
|
36
23
|
async function fetchImageAsBase64(url) {
|
|
37
24
|
return new Promise((resolve, reject) => {
|
|
38
25
|
https.get(url, (response) => {
|
|
@@ -46,19 +33,30 @@ async function fetchImageAsBase64(url) {
|
|
|
46
33
|
response.on('end', () => {
|
|
47
34
|
const buffer = Buffer.concat(chunks);
|
|
48
35
|
const base64 = buffer.toString('base64');
|
|
49
|
-
|
|
50
|
-
resolve(`data:${mimeType};base64,${base64}`);
|
|
36
|
+
resolve(base64);
|
|
51
37
|
});
|
|
52
|
-
response.on('error', reject);
|
|
53
38
|
}).on('error', reject);
|
|
54
39
|
});
|
|
55
40
|
}
|
|
56
41
|
|
|
42
|
+
// Load design tokens
|
|
43
|
+
const designTokens = JSON.parse(
|
|
44
|
+
readFileSync(join(__dirname, 'design-tokens.json'), 'utf-8')
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
// Load component data
|
|
48
|
+
import { COMPONENTS_DATA, COMPONENT_CATEGORIES, USAGE_PATTERNS } from './components-data.js';
|
|
49
|
+
|
|
50
|
+
// Load screen patterns
|
|
51
|
+
const screenPatterns = JSON.parse(
|
|
52
|
+
readFileSync(join(__dirname, 'screen-patterns.json'), 'utf-8')
|
|
53
|
+
);
|
|
54
|
+
|
|
57
55
|
// Create server instance
|
|
58
56
|
const server = new Server(
|
|
59
57
|
{
|
|
60
58
|
name: 'branintelle-ui-lib',
|
|
61
|
-
version: '3.
|
|
59
|
+
version: '3.0.0',
|
|
62
60
|
},
|
|
63
61
|
{
|
|
64
62
|
capabilities: {
|
|
@@ -624,7 +622,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
624
622
|
}
|
|
625
623
|
|
|
626
624
|
try {
|
|
627
|
-
|
|
625
|
+
// Fetch image from S3 and convert to base64
|
|
626
|
+
const base64Data = await fetchImageAsBase64(screen.screenshot_url);
|
|
628
627
|
|
|
629
628
|
return {
|
|
630
629
|
content: [
|
|
@@ -633,12 +632,17 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
633
632
|
text: JSON.stringify({
|
|
634
633
|
screen_id: screen.id,
|
|
635
634
|
screen_name: screen.name,
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
635
|
+
screen_type: screen.type,
|
|
636
|
+
module: screen.module,
|
|
637
|
+
url: screen.screenshot_url,
|
|
638
|
+
message: 'Image fetched successfully. See image below.'
|
|
640
639
|
}, null, 2),
|
|
641
640
|
},
|
|
641
|
+
{
|
|
642
|
+
type: 'image',
|
|
643
|
+
data: base64Data,
|
|
644
|
+
mimeType: 'image/png'
|
|
645
|
+
}
|
|
642
646
|
],
|
|
643
647
|
};
|
|
644
648
|
} catch (error) {
|
|
@@ -648,8 +652,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
648
652
|
type: 'text',
|
|
649
653
|
text: JSON.stringify({
|
|
650
654
|
error: 'Failed to fetch image',
|
|
651
|
-
|
|
652
|
-
|
|
655
|
+
details: error.message,
|
|
656
|
+
url: screen.screenshot_url
|
|
653
657
|
}, null, 2),
|
|
654
658
|
},
|
|
655
659
|
],
|
|
@@ -681,9 +685,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
681
685
|
async function main() {
|
|
682
686
|
const transport = new StdioServerTransport();
|
|
683
687
|
await server.connect(transport);
|
|
684
|
-
console.error('Branintelle UI Library MCP Server v3.
|
|
688
|
+
console.error('Branintelle UI Library MCP Server v3.0 running on stdio');
|
|
685
689
|
console.error('✨ Enhanced with screen patterns and Figma screenshots');
|
|
686
|
-
console.error('📸 6 screens with
|
|
690
|
+
console.error('📸 6 screens available with visual references');
|
|
687
691
|
}
|
|
688
692
|
|
|
689
693
|
main().catch((error) => {
|
package/package.json
CHANGED