@brander/mcp-demo 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 ADDED
@@ -0,0 +1,112 @@
1
+ # TechStore Pro — BranderUX MCP Demo
2
+
3
+ A reference implementation showing how to add [BranderUX](https://branderux.com) branded UI rendering to an MCP server using [`@brander/mcp-tools`](https://www.npmjs.com/package/@brander/mcp-tools).
4
+
5
+ This demo creates a fake B2B e-commerce company (TechStore Pro) with 8 business tools that Claude can use to search products, view orders, analyze customers, and display analytics — all rendered as branded, interactive UI inside Claude Desktop.
6
+
7
+ ## Setup
8
+
9
+ ```bash
10
+ # Clone the repo
11
+ git clone https://github.com/BranderUX/mcp-demo.git
12
+ cd mcp-demo
13
+
14
+ # Install dependencies
15
+ npm install
16
+
17
+ # Build
18
+ npm run build
19
+ ```
20
+
21
+ ## Configure Claude Desktop
22
+
23
+ Add this to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
24
+
25
+ ```json
26
+ {
27
+ "mcpServers": {
28
+ "techstore-pro": {
29
+ "command": "node",
30
+ "args": ["/absolute/path/to/mcp-demo/dist/index.js"],
31
+ "env": {
32
+ "BRANDER_PROJECT_ID": "your_project_id",
33
+ "BRANDER_BETA_KEY": "bux_dp_your_key"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ Then restart Claude Desktop.
41
+
42
+ ## Environment Variables
43
+
44
+ | Variable | Required | Description |
45
+ |---|---|---|
46
+ | `BRANDER_PROJECT_ID` | Yes | Your BranderUX project ID |
47
+ | `BRANDER_BETA_KEY` | Yes | Design partner key (`bux_dp_...`) |
48
+ | `BRANDER_API_BASE_URL` | No | API URL (defaults to `https://branderux.com`) |
49
+
50
+ ## Tools
51
+
52
+ | Tool | Description | Renders As |
53
+ |---|---|---|
54
+ | `search_products` | Search product catalog by name, category, price | Item Grid + Stats Grid |
55
+ | `get_product_details` | View full product details by ID | Header + Details Data + Alert |
56
+ | `get_orders` | List orders with filters (status, customer, date) | Data Table |
57
+ | `get_order_details` | View single order details | Header + Details Data |
58
+ | `get_customers` | Search customers by name, segment, tier | Data Table |
59
+ | `get_customer_profile` | View customer profile with order history | Header + Details Data + Line Chart |
60
+ | `get_analytics_summary` | Revenue, orders, and trend analytics | Header + Stats Grid + Line Chart + Pie Chart |
61
+ | `get_inventory_status` | Stock levels with low-stock alerts | Data Table + Alert |
62
+
63
+ ## Try It
64
+
65
+ Once configured, try these prompts in Claude Desktop:
66
+
67
+ - "Show me all laptops under $2000"
68
+ - "What are the latest orders?"
69
+ - "Show me the analytics dashboard"
70
+ - "Which products are low on stock?"
71
+ - "Show me customer John's profile"
72
+
73
+ ## Integration Pattern
74
+
75
+ The entire BranderUX integration is **one line** in [`src/index.ts`](src/index.ts):
76
+
77
+ ```typescript
78
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
79
+ import { registerBranderTools } from "@brander/mcp-tools";
80
+
81
+ const server = new McpServer({ name: "techstore-pro", version: "1.0.0" });
82
+
83
+ // Your business tools
84
+ registerProductTools(server);
85
+ registerOrderTools(server);
86
+ // ...
87
+
88
+ // One line — branded UI for all element types
89
+ await registerBranderTools(server, {
90
+ projectId: process.env.BRANDER_PROJECT_ID!,
91
+ betaKey: process.env.BRANDER_BETA_KEY!,
92
+ });
93
+
94
+ await server.connect(new StdioServerTransport());
95
+ ```
96
+
97
+ ## Development
98
+
99
+ ```bash
100
+ # Watch mode (auto-restarts on changes)
101
+ npm run dev
102
+
103
+ # Build for production
104
+ npm run build
105
+
106
+ # Run built server
107
+ npm start
108
+ ```
109
+
110
+ ## License
111
+
112
+ MIT
@@ -0,0 +1,2 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ export declare function createServer(): Promise<McpServer>;
@@ -0,0 +1,22 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { registerBranderTools } from "@brander/mcp-tools";
3
+ import { registerComponentTools } from "./tools/component-tools.js";
4
+ import { registerScenarioTools } from "./tools/scenario-tools.js";
5
+ import { registerCapabilityTools } from "./tools/capability-tools.js";
6
+ import { registerPlatformTools } from "./tools/platform-tools.js";
7
+ export async function createServer() {
8
+ const server = new McpServer({
9
+ name: "branderux-demo",
10
+ version: "1.0.0",
11
+ });
12
+ registerComponentTools(server);
13
+ registerScenarioTools(server);
14
+ registerCapabilityTools(server);
15
+ registerPlatformTools(server);
16
+ await registerBranderTools(server, {
17
+ projectId: process.env.BRANDER_PROJECT_ID,
18
+ betaKey: process.env.BRANDER_BETA_KEY,
19
+ ...(process.env.BRANDER_API_BASE_URL && { apiBaseUrl: process.env.BRANDER_API_BASE_URL }),
20
+ });
21
+ return server;
22
+ }
@@ -0,0 +1,15 @@
1
+ export interface BranderComponent {
2
+ id: string;
3
+ name: string;
4
+ elementType: string;
5
+ category: string;
6
+ description: string;
7
+ popularityScore: number;
8
+ usageCount: number;
9
+ props: string[];
10
+ useCases: string[];
11
+ bestFor: string[];
12
+ exampleQuery: string;
13
+ status: "stable" | "beta" | "new" | "coming-soon";
14
+ }
15
+ export declare const COMPONENTS: BranderComponent[];
@@ -0,0 +1,282 @@
1
+ // ============================================================================
2
+ // BranderUX Demo — Components
3
+ // ============================================================================
4
+ export const COMPONENTS = [
5
+ // --- Structure & Navigation ---
6
+ {
7
+ id: "comp-header",
8
+ name: "Header",
9
+ elementType: "header",
10
+ category: "Structure & Navigation",
11
+ description: "Page header with title, subtitle, and optional actions. The first element rendered on every screen — sets context and branding for the entire view.",
12
+ popularityScore: 98,
13
+ usageCount: 45200,
14
+ props: ["title", "subtitle"],
15
+ useCases: [
16
+ "Dashboard page titles",
17
+ "Section headers with subtitles",
18
+ "Branded welcome messages",
19
+ ],
20
+ bestFor: ["all-screens", "navigation", "branding"],
21
+ exampleQuery: "Show me the page header for my dashboard",
22
+ status: "stable",
23
+ },
24
+ // --- Data & Analytics ---
25
+ {
26
+ id: "comp-stats-grid",
27
+ name: "StatsGrid",
28
+ elementType: "stats-grid",
29
+ category: "Data & Analytics",
30
+ description: "Grid of KPI metric cards with trend indicators. Each stat shows a title, value, and optional trend (up/down with percentage). Perfect for executive summaries and dashboard overviews.",
31
+ popularityScore: 95,
32
+ usageCount: 38400,
33
+ props: ["stats[].id", "stats[].title", "stats[].value", "stats[].trend.direction", "stats[].trend.percentage"],
34
+ useCases: [
35
+ "Executive dashboard KPIs",
36
+ "Revenue and growth metrics",
37
+ "Real-time operational status",
38
+ ],
39
+ bestFor: ["dashboards", "analytics", "KPIs"],
40
+ exampleQuery: "Show me key metrics for my platform",
41
+ status: "stable",
42
+ },
43
+ {
44
+ id: "comp-data-table",
45
+ name: "DataTable",
46
+ elementType: "data-table",
47
+ category: "Data & Analytics",
48
+ description: "Dynamic sortable and filterable table with built-in search. Handles pagination, multiple column types (text, number, status, date, currency), and row click actions that trigger new AI queries.",
49
+ popularityScore: 92,
50
+ usageCount: 41300,
51
+ props: ["title", "columns[].key", "columns[].label", "rows[]", "pageSize"],
52
+ useCases: [
53
+ "Order and transaction lists",
54
+ "User management tables",
55
+ "Inventory tracking",
56
+ ],
57
+ bestFor: ["admin-panels", "CRMs", "data-management"],
58
+ exampleQuery: "Show me a table of recent transactions",
59
+ status: "stable",
60
+ },
61
+ {
62
+ id: "comp-line-chart",
63
+ name: "LineChart",
64
+ elementType: "line-chart",
65
+ category: "Data & Analytics",
66
+ description: "Time-series line chart for visualizing trends over time. Supports tooltips, labeled axes, and click-to-query on data points for deeper exploration.",
67
+ popularityScore: 88,
68
+ usageCount: 29800,
69
+ props: ["title", "labels[]", "data[]"],
70
+ useCases: [
71
+ "Revenue growth over time",
72
+ "User acquisition trends",
73
+ "Performance monitoring",
74
+ ],
75
+ bestFor: ["analytics", "trends", "forecasting"],
76
+ exampleQuery: "Show me revenue growth over the last 6 months",
77
+ status: "stable",
78
+ },
79
+ {
80
+ id: "comp-pie-chart",
81
+ name: "PieChart",
82
+ elementType: "pie-chart",
83
+ category: "Data & Analytics",
84
+ description: "Proportional data visualization with labeled segments. Ideal for showing category breakdowns and distribution. Each segment is clickable for drill-down queries.",
85
+ popularityScore: 82,
86
+ usageCount: 22100,
87
+ props: ["title", "data[].label", "data[].value"],
88
+ useCases: [
89
+ "Market share breakdown",
90
+ "Category distribution",
91
+ "Budget allocation",
92
+ ],
93
+ bestFor: ["breakdowns", "distribution", "reports"],
94
+ exampleQuery: "Show me the breakdown of users by region",
95
+ status: "stable",
96
+ },
97
+ {
98
+ id: "comp-bar-chart",
99
+ name: "BarChart",
100
+ elementType: "bar-chart",
101
+ category: "Data & Analytics",
102
+ description: "Comparative bar chart with multiple series support. Can be stacked or grouped with legend and interactive click behaviors. Great for side-by-side comparisons.",
103
+ popularityScore: 79,
104
+ usageCount: 18600,
105
+ props: ["title", "categories[]", "series[].name", "series[].data[]"],
106
+ useCases: [
107
+ "Quarterly revenue comparison",
108
+ "Feature usage across segments",
109
+ "A/B test result visualization",
110
+ ],
111
+ bestFor: ["comparisons", "benchmarks", "multi-metric"],
112
+ exampleQuery: "Compare feature usage across different segments",
113
+ status: "stable",
114
+ },
115
+ {
116
+ id: "comp-details-data",
117
+ name: "DetailsData",
118
+ elementType: "details-data",
119
+ category: "Data & Analytics",
120
+ description: "Structured key-value detail cards grouped by category. Shows status chips, prices, dates, and text fields with semantic coloring. Perfect for entity detail views.",
121
+ popularityScore: 90,
122
+ usageCount: 35200,
123
+ props: ["items[].id", "items[].title", "items[].value", "items[].type", "items[].category"],
124
+ useCases: [
125
+ "Order detail pages",
126
+ "User profile summaries",
127
+ "Product specifications",
128
+ ],
129
+ bestFor: ["detail-pages", "profiles", "specifications"],
130
+ exampleQuery: "Show me the details for this order",
131
+ status: "stable",
132
+ },
133
+ // --- Content & Media ---
134
+ {
135
+ id: "comp-item-grid",
136
+ name: "ItemGrid",
137
+ elementType: "item-grid",
138
+ category: "Content & Media",
139
+ description: "Responsive grid of cards with images, titles, descriptions, and metadata. Built-in search, pagination, and click-to-query on each card for drill-down navigation.",
140
+ popularityScore: 93,
141
+ usageCount: 39700,
142
+ props: ["title", "items[].id", "items[].title", "items[].subtitle", "items[].image"],
143
+ useCases: [
144
+ "Product catalog browsing",
145
+ "Team member directory",
146
+ "Content library",
147
+ ],
148
+ bestFor: ["catalogs", "product-pages", "galleries"],
149
+ exampleQuery: "Browse all available products",
150
+ status: "stable",
151
+ },
152
+ {
153
+ id: "comp-item-card",
154
+ name: "ItemCard",
155
+ elementType: "item-card",
156
+ category: "Content & Media",
157
+ description: "Individual card component with image, title, subtitle, and optional metadata. Used standalone for featured items or as building blocks within an ItemGrid.",
158
+ popularityScore: 85,
159
+ usageCount: 28400,
160
+ props: ["title", "subtitle", "image", "metadata"],
161
+ useCases: [
162
+ "Featured product spotlight",
163
+ "Highlighted announcement",
164
+ "Hero content card",
165
+ ],
166
+ bestFor: ["featured-items", "spotlights", "highlights"],
167
+ exampleQuery: "Show me the featured product",
168
+ status: "stable",
169
+ },
170
+ {
171
+ id: "comp-image",
172
+ name: "Image",
173
+ elementType: "image",
174
+ category: "Content & Media",
175
+ description: "Responsive image display with alt text, captions, and configurable sizing. Supports cover and contain fit modes for flexible visual presentation.",
176
+ popularityScore: 76,
177
+ usageCount: 15400,
178
+ props: ["src", "alt", "caption", "fit"],
179
+ useCases: [
180
+ "Architecture diagrams",
181
+ "Product screenshots",
182
+ "Visual documentation",
183
+ ],
184
+ bestFor: ["media", "illustrations", "screenshots"],
185
+ exampleQuery: "Show me the architecture diagram",
186
+ status: "stable",
187
+ },
188
+ // --- Communication ---
189
+ {
190
+ id: "comp-chat-bubble",
191
+ name: "ChatBubble",
192
+ elementType: "chat-bubble",
193
+ category: "Communication",
194
+ description: "Text message bubble for conversational AI responses. Supports full markdown rendering including headings, lists, code blocks, and links for rich formatted content.",
195
+ popularityScore: 74,
196
+ usageCount: 12800,
197
+ props: ["message"],
198
+ useCases: [
199
+ "AI explanations and summaries",
200
+ "Conversational responses",
201
+ "Text-heavy content display",
202
+ ],
203
+ bestFor: ["explanations", "AI-responses", "text-heavy"],
204
+ exampleQuery: "Explain how this feature works",
205
+ status: "stable",
206
+ },
207
+ {
208
+ id: "comp-alert",
209
+ name: "Alert",
210
+ elementType: "alert",
211
+ category: "Communication",
212
+ description: "Notification banner for success, error, warning, and info messages. Supports action buttons with click-to-query and dismissible states. Draws attention to important information.",
213
+ popularityScore: 80,
214
+ usageCount: 16900,
215
+ props: ["title", "message", "severity", "actionLabel", "actionQuery"],
216
+ useCases: [
217
+ "Low stock warnings",
218
+ "Success confirmations",
219
+ "System status notifications",
220
+ ],
221
+ bestFor: ["notifications", "warnings", "system-status"],
222
+ exampleQuery: "Are there any system alerts?",
223
+ status: "stable",
224
+ },
225
+ // --- User Interaction ---
226
+ {
227
+ id: "comp-form",
228
+ name: "Form",
229
+ elementType: "form",
230
+ category: "User Interaction",
231
+ description: "Dynamic form with text, email, date, number, select, textarea, and checkbox field types. Includes client-side validation, submit actions, and field-level event handling.",
232
+ popularityScore: 71,
233
+ usageCount: 11200,
234
+ props: ["title", "fields[].name", "fields[].label", "fields[].type", "submitLabel"],
235
+ useCases: [
236
+ "Configuration forms",
237
+ "Contact and feedback forms",
238
+ "Data entry interfaces",
239
+ ],
240
+ bestFor: ["data-entry", "configuration", "onboarding"],
241
+ exampleQuery: "Let me configure my project settings",
242
+ status: "stable",
243
+ },
244
+ {
245
+ id: "comp-button",
246
+ name: "Button",
247
+ elementType: "button",
248
+ category: "User Interaction",
249
+ description: "Interactive button with two behaviors: action (sends a query back to AI on click) or link (opens a URL). Three visual variants: primary, secondary, and tertiary.",
250
+ popularityScore: 78,
251
+ usageCount: 14300,
252
+ props: ["label", "action", "variant", "url"],
253
+ useCases: [
254
+ "Call-to-action buttons",
255
+ "Navigation actions",
256
+ "External link buttons",
257
+ ],
258
+ bestFor: ["CTAs", "navigation", "actions"],
259
+ exampleQuery: "Show me actions I can take",
260
+ status: "stable",
261
+ },
262
+ // --- Coming Soon ---
263
+ {
264
+ id: "comp-custom",
265
+ name: "Custom Elements (Vibe Coding)",
266
+ elementType: "custom",
267
+ category: "Customization",
268
+ description: "Create your own custom element types using AI-assisted vibe coding. Describe the component you need in natural language, and BranderUX generates a fully functional, branded element that integrates seamlessly with the platform — including click-to-query, streaming, and brand theming.",
269
+ popularityScore: 0,
270
+ usageCount: 0,
271
+ props: ["user-defined"],
272
+ useCases: [
273
+ "Industry-specific visualizations",
274
+ "Custom workflow components",
275
+ "Branded interactive widgets",
276
+ "Domain-specific data displays",
277
+ ],
278
+ bestFor: ["custom-needs", "industry-specific", "extensibility"],
279
+ exampleQuery: "Create a custom Gantt chart element for my project management app",
280
+ status: "coming-soon",
281
+ },
282
+ ];
@@ -0,0 +1,31 @@
1
+ export interface IntegrationMethod {
2
+ id: string;
3
+ name: string;
4
+ slug: string;
5
+ tagline: string;
6
+ description: string;
7
+ bestFor: string[];
8
+ setupTime: string;
9
+ techStack: string[];
10
+ codeExample: string;
11
+ steps: Array<{
12
+ step: number;
13
+ title: string;
14
+ description: string;
15
+ }>;
16
+ features: string[];
17
+ limitations: string[];
18
+ adoptionRate: number;
19
+ status: "stable" | "beta";
20
+ }
21
+ export declare const INTEGRATION_METHODS: IntegrationMethod[];
22
+ export interface AICapability {
23
+ id: string;
24
+ name: string;
25
+ category: string;
26
+ description: string;
27
+ howItWorks: string;
28
+ technicalDetail: string;
29
+ status: "ga" | "beta" | "coming-soon";
30
+ }
31
+ export declare const AI_CAPABILITIES: AICapability[];