@mohityadav0903/branintelle-mcp 3.1.0 → 3.1.2

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.
@@ -1,4 +1,4 @@
1
- # 🎉 MCP v3.1 - Enhanced with Base64 Image Support for LLM Vision
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.1.0)**
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
- // Step 1: Get pattern with screenshot URL
88
+ // LLM calls:
104
89
  get_screen_patterns({ screen_type: "listing_page" })
105
90
 
106
- // Step 2: Fetch the actual image for vision analysis
107
- get_screen_image({ screen_id: "screen_001" })
108
-
109
- // LLM can now SEE the screen layout, colors, spacing, and UI patterns!
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
- // Step 3: Get component documentation
101
+ // Then LLM can:
112
102
  get_component_docs({ components: ["StatsCards", "Tabs", "ScrollableDataTable"] })
113
103
 
114
- // And implement the exact pattern with visual context!
104
+ // And implement the exact pattern!
115
105
  ```
116
106
 
117
- ### Example 2: "What does the RFP triage screen look like?"
107
+ ### Example 2: "Find screens with inline actions"
118
108
  ```typescript
119
- get_screen_image({ screen_id: "screen_002" })
120
-
121
- // Returns base64 image that LLM can analyze visually
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 form examples"
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
- get_screen_image({ screen_id: "screen_004" })
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.1.0**
152
+ Version: **3.0.0**
170
153
 
171
154
  ---
172
155
 
173
156
  ## 🎁 **Benefits**
174
157
 
175
- ✅ **Visual Context** - LLMs can SEE actual screens via base64 images
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
- ✅ **Base64 Data URLs** - Direct image analysis for vision-enabled LLMs
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.1.0
205
- 2. ✅ Test with Claude/LLMs with vision
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 image caching for performance
208
- 5. ⏳ Add thumbnail versions for faster previews
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 the briefs listing screen"
218
- get_screen_image({ screen_id: "screen_001" })
219
-
220
- "What UI patterns are used in the RFP triage screen?"
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 **visual references as base64 images** + component documentation! 🎯👀
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.1
5
- * Enhanced with screen patterns, Figma screenshots, and base64 image fetching
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
- // Load design tokens
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
- const mimeType = response.headers['content-type'] || 'image/png';
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.1.0',
59
+ version: '3.0.0',
62
60
  },
63
61
  {
64
62
  capabilities: {
@@ -624,21 +622,26 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
624
622
  }
625
623
 
626
624
  try {
627
- const base64Image = await fetchImageAsBase64(screen.screenshot_url);
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: [
630
+ {
631
+ type: 'image',
632
+ data: base64Data,
633
+ mimeType: 'image/png'
634
+ },
631
635
  {
632
636
  type: 'text',
633
637
  text: JSON.stringify({
634
638
  screen_id: screen.id,
635
639
  screen_name: screen.name,
636
- image_data_url: base64Image,
637
- image_url: screen.screenshot_url,
638
- usage: 'Use the image_data_url in <img src="..." /> or display directly',
639
- size_kb: Math.round(base64Image.length / 1024)
640
+ screen_type: screen.type,
641
+ module: screen.module,
642
+ url: screen.screenshot_url
640
643
  }, null, 2),
641
- },
644
+ }
642
645
  ],
643
646
  };
644
647
  } catch (error) {
@@ -648,8 +651,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
648
651
  type: 'text',
649
652
  text: JSON.stringify({
650
653
  error: 'Failed to fetch image',
651
- message: error.message,
652
- screenshot_url: screen.screenshot_url
654
+ details: error.message,
655
+ url: screen.screenshot_url
653
656
  }, null, 2),
654
657
  },
655
658
  ],
@@ -681,9 +684,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
681
684
  async function main() {
682
685
  const transport = new StdioServerTransport();
683
686
  await server.connect(transport);
684
- console.error('Branintelle UI Library MCP Server v3.1 running on stdio');
687
+ console.error('Branintelle UI Library MCP Server v3.0 running on stdio');
685
688
  console.error('✨ Enhanced with screen patterns and Figma screenshots');
686
- console.error('📸 6 screens with base64 image support for LLM vision');
689
+ console.error('📸 6 screens available with visual references');
687
690
  }
688
691
 
689
692
  main().catch((error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohityadav0903/branintelle-mcp",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "type": "module",
5
5
  "description": "MCP server for Branintelle UI Library - provides component documentation via Model Context Protocol",
6
6
  "main": "mcp-server.js",