flowengine-mcp-app 1.2.1 → 2.0.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/build/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * FlowEngine MCP Server
3
+ * FlowEngine MCP Server - Modern MCP Apps Implementation
4
4
  * Manage your white-label automation platform from Claude
5
5
  *
6
6
  * Core Features:
package/build/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * FlowEngine MCP Server
3
+ * FlowEngine MCP Server - Modern MCP Apps Implementation
4
4
  * Manage your white-label automation platform from Claude
5
5
  *
6
6
  * Core Features:
@@ -8,12 +8,12 @@
8
8
  * 2. Client Portals - Monitor and access client portals
9
9
  * 3. AI FlowBuilder - Create forms, chatbots, and UI components
10
10
  */
11
- import { Server } from '@modelcontextprotocol/sdk/server/index.js';
11
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
12
12
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
13
- import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
13
+ import { registerAppTool, registerAppResource, RESOURCE_MIME_TYPE } from '@modelcontextprotocol/ext-apps/server';
14
14
  import { FlowEngineClient } from './client.js';
15
- import { renderUnifiedDashboard, renderPortalDetails as renderUnifiedPortalDetails } from './ui/dashboard.js';
16
- import { renderWidgetBuilder, renderWidgetDetails } from './ui/widgets.js';
15
+ import { renderUnifiedDashboard } from './ui/dashboard.js';
16
+ import { renderWidgetBuilder } from './ui/widgets.js';
17
17
  import { renderN8nViewer } from './ui/n8n-viewer.js';
18
18
  import { renderComponentViewer } from './ui/component-viewer.js';
19
19
  import { renderError } from './ui/base.js';
@@ -31,9 +31,10 @@ function ensureClient() {
31
31
  }
32
32
  return flowengine;
33
33
  }
34
- const server = new Server({
34
+ // Initialize MCP Server with modern API
35
+ const server = new McpServer({
35
36
  name: 'flowengine-mcp',
36
- version: '1.0.0',
37
+ version: '2.0.0',
37
38
  }, {
38
39
  capabilities: {
39
40
  resources: {},
@@ -41,473 +42,368 @@ const server = new Server({
41
42
  },
42
43
  });
43
44
  /**
44
- * Interactive UI Resources (MCP Apps)
45
- *
46
- * How to use UI resources:
47
- * 1. Ask Claude: "Show me the FlowEngine client portals dashboard"
48
- * 2. Ask Claude: "Show me the AI FlowBuilder"
49
- * 3. Ask Claude: "Show me my FlowEngine instances"
50
- *
51
- * These commands will display interactive HTML dashboards.
52
- * If UI resources don't work, use the regular tools:
53
- * - flowengine_list_portals
54
- * - flowengine_list_components
55
- * - flowengine_list_instances
45
+ * ===========================
46
+ * APP RESOURCES (UI Components)
47
+ * ===========================
56
48
  */
57
- server.setRequestHandler(ListResourcesRequestSchema, async () => {
49
+ // Dashboard Resource (Portals + Instances)
50
+ registerAppResource(server, 'FlowEngine Dashboard', 'ui://flowengine/dashboard', {
51
+ description: 'INTERACTIVE UI APP: Shows live dashboard with all portals, instances, storage stats, and management controls. USE THIS UI when user asks for: dashboard, portals, instances, client accounts, portal management, or "show me FlowEngine". This provides a rich visual interface instead of JSON data.',
52
+ }, async () => {
53
+ try {
54
+ const portals = await ensureClient().getClientInstances();
55
+ const html = renderUnifiedDashboard(portals);
56
+ return {
57
+ contents: [{
58
+ uri: 'ui://flowengine/dashboard',
59
+ mimeType: RESOURCE_MIME_TYPE,
60
+ text: html,
61
+ }],
62
+ };
63
+ }
64
+ catch (error) {
65
+ const html = renderError(error.message || 'Failed to load dashboard');
66
+ return {
67
+ contents: [{
68
+ uri: 'ui://flowengine/dashboard',
69
+ mimeType: RESOURCE_MIME_TYPE,
70
+ text: html,
71
+ }],
72
+ };
73
+ }
74
+ });
75
+ // n8n Workflow Viewer Resource
76
+ registerAppResource(server, 'n8n Workflow Viewer', 'ui://flowengine/workflow-viewer', {
77
+ description: 'INTERACTIVE UI APP: Full-screen n8n workflow visualization with interactive demo. USE THIS UI when user asks to: view workflow, show n8n workflow, visualize automation, or preview workflow. Shows live workflow editor with share/export capabilities.',
78
+ }, async () => {
79
+ const html = renderN8nViewer();
58
80
  return {
59
- resources: [
60
- {
61
- uri: 'ui://flowengine/dashboard',
62
- name: 'FlowEngine Dashboard',
63
- description: 'INTERACTIVE UI APP: Shows live dashboard with all portals, instances, storage stats, and management controls. USE THIS UI when user asks for: dashboard, portals, instances, client accounts, portal management, or "show me FlowEngine". This provides a rich visual interface instead of JSON data.',
64
- mimeType: 'text/html;profile=mcp-app',
65
- },
66
- {
81
+ contents: [{
67
82
  uri: 'ui://flowengine/workflow-viewer',
68
- name: 'n8n Workflow Viewer',
69
- description: 'INTERACTIVE UI APP: Full-screen n8n workflow visualization with interactive demo. USE THIS UI when user asks to: view workflow, show n8n workflow, visualize automation, or preview workflow. Shows live workflow editor with share/export capabilities.',
70
- mimeType: 'text/html;profile=mcp-app',
71
- },
72
- {
83
+ mimeType: RESOURCE_MIME_TYPE,
84
+ text: html,
85
+ }],
86
+ };
87
+ });
88
+ // UI Component Viewer Resource
89
+ registerAppResource(server, 'UI Component Viewer', 'ui://flowengine/component-viewer', {
90
+ description: 'INTERACTIVE UI APP: Live preview of forms, chatbots, widgets and UI components. USE THIS UI when user asks to: preview component, show chatbot, view form, see widget, or display UI component. Interactive preview with embed codes.',
91
+ }, async () => {
92
+ const html = renderComponentViewer();
93
+ return {
94
+ contents: [{
73
95
  uri: 'ui://flowengine/component-viewer',
74
- name: 'UI Component Viewer',
75
- description: 'INTERACTIVE UI APP: Live preview of forms, chatbots, widgets and UI components. USE THIS UI when user asks to: preview component, show chatbot, view form, see widget, or display UI component. Interactive preview with embed codes.',
76
- mimeType: 'text/html;profile=mcp-app',
77
- },
78
- {
79
- uri: 'ui://flowengine/ui-builder',
80
- name: 'AI FlowBuilder Dashboard',
81
- description: 'INTERACTIVE UI APP: Dashboard for building and managing all UI components (forms, chatbots, widgets). USE THIS UI when user asks for: UI builder, component builder, create form, build chatbot, or manage components. Shows component gallery with creation tools.',
82
- mimeType: 'text/html;profile=mcp-app',
83
- },
84
- ],
96
+ mimeType: RESOURCE_MIME_TYPE,
97
+ text: html,
98
+ }],
85
99
  };
86
100
  });
87
- /**
88
- * Render Resources
89
- */
90
- server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
91
- const uri = request.params.uri;
101
+ // AI FlowBuilder Dashboard Resource
102
+ registerAppResource(server, 'AI FlowBuilder Dashboard', 'ui://flowengine/ui-builder', {
103
+ description: 'INTERACTIVE UI APP: Dashboard for building and managing all UI components (forms, chatbots, widgets). USE THIS UI when user asks for: UI builder, component builder, create form, build chatbot, or manage components. Shows component gallery with creation tools.',
104
+ }, async () => {
92
105
  try {
93
- // Unified Dashboard (Portals + Instances)
94
- if (uri === 'ui://flowengine/dashboard') {
95
- const portals = await ensureClient().getClientInstances();
96
- const html = renderUnifiedDashboard(portals);
97
- return {
98
- contents: [{ uri, mimeType: 'text/html;profile=mcp-app', text: html }],
99
- };
100
- }
101
- // n8n Workflow Viewer
102
- if (uri === 'ui://flowengine/workflow-viewer') {
103
- // Default empty workflow - can be passed workflow data from MCP
104
- const html = renderN8nViewer();
105
- return {
106
- contents: [{ uri, mimeType: 'text/html;profile=mcp-app', text: html }],
107
- };
108
- }
109
- // UI Component Viewer
110
- if (uri === 'ui://flowengine/component-viewer') {
111
- // Default empty component - can be passed component data from MCP
112
- const html = renderComponentViewer();
113
- return {
114
- contents: [{ uri, mimeType: 'text/html;profile=mcp-app', text: html }],
115
- };
116
- }
117
- // Portal/Instance Details
118
- if (uri.startsWith('ui://flowengine/portal/')) {
119
- const portalId = uri.split('/').pop() || '';
120
- const portals = await ensureClient().getClientInstances();
121
- const portal = portals.find((p) => p.id === portalId);
122
- if (!portal) {
123
- throw new Error('Portal not found');
124
- }
125
- const html = renderUnifiedPortalDetails(portal);
126
- return {
127
- contents: [{ uri, mimeType: 'text/html;profile=mcp-app', text: html }],
128
- };
129
- }
130
- // AI FlowBuilder (UI Components)
131
- if (uri === 'ui://flowengine/ui-builder') {
132
- const widgets = await ensureClient().getWidgets();
133
- const html = renderWidgetBuilder(widgets);
134
- return {
135
- contents: [{ uri, mimeType: 'text/html;profile=mcp-app', text: html }],
136
- };
137
- }
138
- // Widget Details
139
- if (uri.startsWith('ui://flowengine/widget/')) {
140
- const widgetId = uri.split('/').pop() || '';
141
- const widget = await ensureClient().getWidget(widgetId);
142
- const html = renderWidgetDetails(widget);
143
- return {
144
- contents: [{ uri, mimeType: 'text/html;profile=mcp-app', text: html }],
145
- };
146
- }
147
- throw new Error(`Unknown resource: ${uri}`);
106
+ const widgets = await ensureClient().getWidgets();
107
+ const html = renderWidgetBuilder(widgets);
108
+ return {
109
+ contents: [{
110
+ uri: 'ui://flowengine/ui-builder',
111
+ mimeType: RESOURCE_MIME_TYPE,
112
+ text: html,
113
+ }],
114
+ };
148
115
  }
149
116
  catch (error) {
150
- const html = renderError(error.message || 'An error occurred');
117
+ const html = renderError(error.message || 'Failed to load UI builder');
151
118
  return {
152
- contents: [{ uri, mimeType: 'text/html;profile=mcp-app', text: html }],
119
+ contents: [{
120
+ uri: 'ui://flowengine/ui-builder',
121
+ mimeType: RESOURCE_MIME_TYPE,
122
+ text: html,
123
+ }],
153
124
  };
154
125
  }
155
126
  });
156
127
  /**
157
- * Available Tools
128
+ * ===========================
129
+ * TOOLS WITH UI (MCP Apps)
130
+ * ===========================
158
131
  */
159
- server.setRequestHandler(ListToolsRequestSchema, async () => {
132
+ // Instance Management - List with UI
133
+ registerAppTool(server, 'flowengine_list_instances', {
134
+ description: 'Show the FlowEngine Dashboard with interactive UI displaying all portals, instances, storage stats, and management controls. Use this when user wants to see the dashboard, view portals, check instances, or get an overview of FlowEngine. Renders a visual dashboard interface instead of JSON.',
135
+ inputSchema: {
136
+ type: 'object',
137
+ properties: {},
138
+ },
139
+ _meta: {
140
+ ui: {
141
+ resourceUri: 'ui://flowengine/dashboard',
142
+ },
143
+ },
144
+ }, async () => {
145
+ const instances = await ensureClient().getInstances();
160
146
  return {
161
- tools: [
162
- // Instance Management Tools
163
- {
164
- name: 'flowengine_list_instances',
165
- description: 'Show the FlowEngine Dashboard with interactive UI displaying all portals, instances, storage stats, and management controls. Use this when user wants to see the dashboard, view portals, check instances, or get an overview of FlowEngine. Renders a visual dashboard interface instead of JSON.',
166
- inputSchema: {
167
- type: 'object',
168
- properties: {},
169
- },
170
- _meta: {
171
- ui: {
172
- resourceUri: 'ui://flowengine/dashboard',
173
- },
174
- },
175
- },
176
- {
177
- name: 'flowengine_get_instance_status',
178
- description: 'Get health and status information for a specific instance',
179
- inputSchema: {
180
- type: 'object',
181
- properties: {
182
- instanceId: {
183
- type: 'string',
184
- description: 'The instance ID to check',
185
- },
186
- },
187
- required: ['instanceId'],
188
- },
189
- },
190
- {
191
- name: 'flowengine_create_instance',
192
- description: 'Provision a new FlowEngine instance for a client',
193
- inputSchema: {
194
- type: 'object',
195
- properties: {
196
- data: {
197
- type: 'object',
198
- description: 'Instance configuration with client info and settings',
199
- },
200
- },
201
- required: ['data'],
202
- },
147
+ content: [{
148
+ type: 'text',
149
+ text: JSON.stringify(instances, null, 2),
150
+ }],
151
+ };
152
+ });
153
+ // Portal Management - List with UI
154
+ registerAppTool(server, 'flowengine_list_portals', {
155
+ description: 'Show the FlowEngine Dashboard with interactive UI displaying all client portals, instances, and management controls. Use this when user wants to see portals, view client accounts, check portal status, or manage portals. Renders a visual dashboard interface instead of JSON.',
156
+ inputSchema: {
157
+ type: 'object',
158
+ properties: {},
159
+ },
160
+ _meta: {
161
+ ui: {
162
+ resourceUri: 'ui://flowengine/dashboard',
163
+ },
164
+ },
165
+ }, async () => {
166
+ const portals = await ensureClient().getClientInstances();
167
+ return {
168
+ content: [{
169
+ type: 'text',
170
+ text: JSON.stringify(portals, null, 2),
171
+ }],
172
+ };
173
+ });
174
+ // UI Components - List with UI
175
+ registerAppTool(server, 'flowengine_list_components', {
176
+ description: 'Show the AI FlowBuilder Dashboard with interactive UI displaying all forms, chatbots, widgets, and UI components. Use this when user wants to see the UI builder, view components, manage forms/chatbots, or build UI elements. Renders a component gallery interface instead of JSON. Optionally filter by instanceId.',
177
+ inputSchema: {
178
+ type: 'object',
179
+ properties: {
180
+ instanceId: {
181
+ type: 'string',
182
+ description: 'Optional: Filter by instance ID',
203
183
  },
204
- {
205
- name: 'flowengine_update_instance',
206
- description: 'Update instance settings and configuration',
207
- inputSchema: {
208
- type: 'object',
209
- properties: {
210
- data: {
211
- type: 'object',
212
- description: 'Updated instance configuration',
213
- },
214
- },
215
- required: ['data'],
216
- },
184
+ },
185
+ },
186
+ _meta: {
187
+ ui: {
188
+ resourceUri: 'ui://flowengine/ui-builder',
189
+ },
190
+ },
191
+ }, async (args) => {
192
+ const instanceId = args ? args.instanceId : undefined;
193
+ const widgets = await ensureClient().getWidgets(instanceId);
194
+ return {
195
+ content: [{
196
+ type: 'text',
197
+ text: JSON.stringify(widgets, null, 2),
198
+ }],
199
+ };
200
+ });
201
+ /**
202
+ * ===========================
203
+ * REGULAR TOOLS (No UI)
204
+ * ===========================
205
+ */
206
+ // Get Instance Status
207
+ server.registerTool('flowengine_get_instance_status', {
208
+ description: 'Get health and status information for a specific instance',
209
+ inputSchema: {
210
+ type: 'object',
211
+ properties: {
212
+ instanceId: {
213
+ type: 'string',
214
+ description: 'The instance ID to check',
217
215
  },
218
- {
219
- name: 'flowengine_delete_instance',
220
- description: 'Permanently delete a FlowEngine instance',
221
- inputSchema: {
222
- type: 'object',
223
- properties: {
224
- instanceId: {
225
- type: 'string',
226
- description: 'The instance ID to delete',
227
- },
228
- },
229
- required: ['instanceId'],
230
- },
216
+ },
217
+ required: ['instanceId'],
218
+ },
219
+ }, async (args) => {
220
+ const instanceId = args.instanceId;
221
+ const status = await ensureClient().getInstanceStatus(instanceId);
222
+ return {
223
+ content: [{
224
+ type: 'text',
225
+ text: JSON.stringify(status, null, 2),
226
+ }],
227
+ };
228
+ });
229
+ // Create Instance
230
+ server.registerTool('flowengine_create_instance', {
231
+ description: 'Provision a new FlowEngine instance for a client',
232
+ inputSchema: {
233
+ type: 'object',
234
+ properties: {
235
+ data: {
236
+ type: 'object',
237
+ description: 'Instance configuration with client info and settings',
231
238
  },
232
- // Portal Tools
233
- {
234
- name: 'flowengine_list_portals',
235
- description: 'Show the FlowEngine Dashboard with interactive UI displaying all client portals, instances, and management controls. Use this when user wants to see portals, view client accounts, check portal status, or manage portals. Renders a visual dashboard interface instead of JSON.',
236
- inputSchema: {
237
- type: 'object',
238
- properties: {},
239
- },
240
- _meta: {
241
- ui: {
242
- resourceUri: 'ui://flowengine/dashboard',
243
- },
244
- },
239
+ },
240
+ required: ['data'],
241
+ },
242
+ }, async (args) => {
243
+ const data = args.data;
244
+ const result = await ensureClient().provisionInstance(data);
245
+ return {
246
+ content: [{
247
+ type: 'text',
248
+ text: `Instance created successfully. ID: ${result.instanceId || result.id || 'N/A'}`,
249
+ }],
250
+ };
251
+ });
252
+ // Update Instance
253
+ server.registerTool('flowengine_update_instance', {
254
+ description: 'Update instance settings and configuration',
255
+ inputSchema: {
256
+ type: 'object',
257
+ properties: {
258
+ data: {
259
+ type: 'object',
260
+ description: 'Updated instance configuration',
245
261
  },
246
- // UI Component Tools (AI FlowBuilder)
247
- {
248
- name: 'flowengine_list_components',
249
- description: 'Show the AI FlowBuilder Dashboard with interactive UI displaying all forms, chatbots, widgets, and UI components. Use this when user wants to see the UI builder, view components, manage forms/chatbots, or build UI elements. Renders a component gallery interface instead of JSON. Optionally filter by instanceId.',
250
- inputSchema: {
251
- type: 'object',
252
- properties: {
253
- instanceId: {
254
- type: 'string',
255
- description: 'Optional: Filter by instance ID',
256
- },
257
- },
258
- },
259
- _meta: {
260
- ui: {
261
- resourceUri: 'ui://flowengine/ui-builder',
262
- },
263
- },
262
+ },
263
+ required: ['data'],
264
+ },
265
+ }, async (args) => {
266
+ const data = args.data;
267
+ await ensureClient().updateInstance(data);
268
+ return {
269
+ content: [{
270
+ type: 'text',
271
+ text: 'Instance updated successfully',
272
+ }],
273
+ };
274
+ });
275
+ // Delete Instance
276
+ server.registerTool('flowengine_delete_instance', {
277
+ description: 'Permanently delete a FlowEngine instance',
278
+ inputSchema: {
279
+ type: 'object',
280
+ properties: {
281
+ instanceId: {
282
+ type: 'string',
283
+ description: 'The instance ID to delete',
264
284
  },
265
- {
266
- name: 'flowengine_get_component',
267
- description: 'Get detailed configuration for a specific UI component',
268
- inputSchema: {
269
- type: 'object',
270
- properties: {
271
- componentId: {
272
- type: 'string',
273
- description: 'The component ID',
274
- },
275
- },
276
- required: ['componentId'],
277
- },
285
+ },
286
+ required: ['instanceId'],
287
+ },
288
+ }, async (args) => {
289
+ const instanceId = args.instanceId;
290
+ await ensureClient().deleteInstance(instanceId);
291
+ return {
292
+ content: [{
293
+ type: 'text',
294
+ text: 'Instance deleted successfully',
295
+ }],
296
+ };
297
+ });
298
+ // Get Component
299
+ server.registerTool('flowengine_get_component', {
300
+ description: 'Get detailed configuration for a specific UI component',
301
+ inputSchema: {
302
+ type: 'object',
303
+ properties: {
304
+ componentId: {
305
+ type: 'string',
306
+ description: 'The component ID',
278
307
  },
279
- {
280
- name: 'flowengine_create_component',
281
- description: 'Create a new UI component using AI FlowBuilder (form, chatbot, or widget)',
282
- inputSchema: {
283
- type: 'object',
284
- properties: {
285
- data: {
286
- type: 'object',
287
- description: 'Component configuration with type, name, and settings',
288
- },
289
- },
290
- required: ['data'],
291
- },
308
+ },
309
+ required: ['componentId'],
310
+ },
311
+ }, async (args) => {
312
+ const componentId = args.componentId;
313
+ const widget = await ensureClient().getWidget(componentId);
314
+ return {
315
+ content: [{
316
+ type: 'text',
317
+ text: JSON.stringify(widget, null, 2),
318
+ }],
319
+ };
320
+ });
321
+ // Create Component
322
+ server.registerTool('flowengine_create_component', {
323
+ description: 'Create a new UI component using AI FlowBuilder (form, chatbot, or widget)',
324
+ inputSchema: {
325
+ type: 'object',
326
+ properties: {
327
+ data: {
328
+ type: 'object',
329
+ description: 'Component configuration with type, name, and settings',
292
330
  },
293
- {
294
- name: 'flowengine_update_component',
295
- description: 'Update an existing UI component configuration',
296
- inputSchema: {
297
- type: 'object',
298
- properties: {
299
- componentId: {
300
- type: 'string',
301
- description: 'The component ID to update',
302
- },
303
- data: {
304
- type: 'object',
305
- description: 'Updated component configuration',
306
- },
307
- },
308
- required: ['componentId', 'data'],
309
- },
331
+ },
332
+ required: ['data'],
333
+ },
334
+ }, async (args) => {
335
+ const data = args.data;
336
+ const result = await ensureClient().createWidget(data);
337
+ return {
338
+ content: [{
339
+ type: 'text',
340
+ text: `Component created successfully. ID: ${result.id || result.widgetId || 'N/A'}`,
341
+ }],
342
+ };
343
+ });
344
+ // Update Component
345
+ server.registerTool('flowengine_update_component', {
346
+ description: 'Update an existing UI component configuration',
347
+ inputSchema: {
348
+ type: 'object',
349
+ properties: {
350
+ componentId: {
351
+ type: 'string',
352
+ description: 'The component ID to update',
310
353
  },
311
- {
312
- name: 'flowengine_delete_component',
313
- description: 'Delete a UI component',
314
- inputSchema: {
315
- type: 'object',
316
- properties: {
317
- componentId: {
318
- type: 'string',
319
- description: 'The component ID to delete',
320
- },
321
- },
322
- required: ['componentId'],
323
- },
354
+ data: {
355
+ type: 'object',
356
+ description: 'Updated component configuration',
324
357
  },
325
- ],
358
+ },
359
+ required: ['componentId', 'data'],
360
+ },
361
+ }, async (args) => {
362
+ const componentId = args.componentId;
363
+ const data = args.data;
364
+ await ensureClient().updateWidget(componentId, data);
365
+ return {
366
+ content: [{
367
+ type: 'text',
368
+ text: 'Component updated successfully',
369
+ }],
326
370
  };
327
371
  });
328
- /**
329
- * Handle Tool Calls
330
- */
331
- server.setRequestHandler(CallToolRequestSchema, async (request) => {
332
- const { name, arguments: args } = request.params;
333
- try {
334
- switch (name) {
335
- // Instance Management
336
- case 'flowengine_list_instances': {
337
- const instances = await ensureClient().getInstances();
338
- return {
339
- content: [
340
- {
341
- type: 'text',
342
- text: JSON.stringify(instances, null, 2),
343
- },
344
- ],
345
- };
346
- }
347
- case 'flowengine_get_instance_status': {
348
- if (!args)
349
- throw new Error('Missing arguments');
350
- const instanceId = args.instanceId;
351
- const status = await ensureClient().getInstanceStatus(instanceId);
352
- return {
353
- content: [
354
- {
355
- type: 'text',
356
- text: JSON.stringify(status, null, 2),
357
- },
358
- ],
359
- };
360
- }
361
- case 'flowengine_create_instance': {
362
- if (!args)
363
- throw new Error('Missing arguments');
364
- const data = args.data;
365
- const result = await ensureClient().provisionInstance(data);
366
- return {
367
- content: [
368
- {
369
- type: 'text',
370
- text: `Instance created successfully. ID: ${result.instanceId || result.id || 'N/A'}`,
371
- },
372
- ],
373
- };
374
- }
375
- case 'flowengine_update_instance': {
376
- if (!args)
377
- throw new Error('Missing arguments');
378
- const data = args.data;
379
- await ensureClient().updateInstance(data);
380
- return {
381
- content: [
382
- {
383
- type: 'text',
384
- text: 'Instance updated successfully',
385
- },
386
- ],
387
- };
388
- }
389
- case 'flowengine_delete_instance': {
390
- if (!args)
391
- throw new Error('Missing arguments');
392
- const instanceId = args.instanceId;
393
- await ensureClient().deleteInstance(instanceId);
394
- return {
395
- content: [
396
- {
397
- type: 'text',
398
- text: 'Instance deleted successfully',
399
- },
400
- ],
401
- };
402
- }
403
- // Portals
404
- case 'flowengine_list_portals': {
405
- const portals = await ensureClient().getClientInstances();
406
- return {
407
- content: [
408
- {
409
- type: 'text',
410
- text: JSON.stringify(portals, null, 2),
411
- },
412
- ],
413
- };
414
- }
415
- // UI Components (AI FlowBuilder)
416
- case 'flowengine_list_components': {
417
- const instanceId = args ? args.instanceId : undefined;
418
- const widgets = await ensureClient().getWidgets(instanceId);
419
- return {
420
- content: [
421
- {
422
- type: 'text',
423
- text: JSON.stringify(widgets, null, 2),
424
- },
425
- ],
426
- };
427
- }
428
- case 'flowengine_get_component': {
429
- if (!args)
430
- throw new Error('Missing arguments');
431
- const componentId = args.componentId;
432
- const widget = await ensureClient().getWidget(componentId);
433
- return {
434
- content: [
435
- {
436
- type: 'text',
437
- text: JSON.stringify(widget, null, 2),
438
- },
439
- ],
440
- };
441
- }
442
- case 'flowengine_create_component': {
443
- if (!args)
444
- throw new Error('Missing arguments');
445
- const data = args.data;
446
- const result = await ensureClient().createWidget(data);
447
- return {
448
- content: [
449
- {
450
- type: 'text',
451
- text: `Component created successfully. ID: ${result.id || result.widgetId || 'N/A'}`,
452
- },
453
- ],
454
- };
455
- }
456
- case 'flowengine_update_component': {
457
- if (!args)
458
- throw new Error('Missing arguments');
459
- const componentId = args.componentId;
460
- const data = args.data;
461
- await ensureClient().updateWidget(componentId, data);
462
- return {
463
- content: [
464
- {
465
- type: 'text',
466
- text: 'Component updated successfully',
467
- },
468
- ],
469
- };
470
- }
471
- case 'flowengine_delete_component': {
472
- if (!args)
473
- throw new Error('Missing arguments');
474
- const componentId = args.componentId;
475
- await ensureClient().deleteWidget(componentId);
476
- return {
477
- content: [
478
- {
479
- type: 'text',
480
- text: 'Component deleted successfully',
481
- },
482
- ],
483
- };
484
- }
485
- default:
486
- throw new Error(`Unknown tool: ${name}`);
487
- }
488
- }
489
- catch (error) {
490
- return {
491
- content: [
492
- {
493
- type: 'text',
494
- text: `Error: ${error.message}`,
495
- },
496
- ],
497
- isError: true,
498
- };
499
- }
372
+ // Delete Component
373
+ server.registerTool('flowengine_delete_component', {
374
+ description: 'Delete a UI component',
375
+ inputSchema: {
376
+ type: 'object',
377
+ properties: {
378
+ componentId: {
379
+ type: 'string',
380
+ description: 'The component ID to delete',
381
+ },
382
+ },
383
+ required: ['componentId'],
384
+ },
385
+ }, async (args) => {
386
+ const componentId = args.componentId;
387
+ await ensureClient().deleteWidget(componentId);
388
+ return {
389
+ content: [{
390
+ type: 'text',
391
+ text: 'Component deleted successfully',
392
+ }],
393
+ };
500
394
  });
501
395
  /**
502
- * Start Server
396
+ * ===========================
397
+ * SERVER STARTUP
398
+ * ===========================
503
399
  */
504
400
  async function main() {
505
401
  const transport = new StdioServerTransport();
506
- await server.connect(transport);
507
- console.error('FlowEngine MCP Server running');
402
+ await server.server.connect(transport);
403
+ console.error('FlowEngine MCP Server (Modern API) running on stdio');
508
404
  }
509
405
  main().catch((error) => {
510
- console.error('Fatal error:', error);
406
+ console.error('Fatal error in MCP server:', error);
511
407
  process.exit(1);
512
408
  });
513
409
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,IAAI,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,4BAA4B;AAC5B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;AAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,0BAA0B,CAAC;AAE/E,+BAA+B;AAC/B,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,gBAAgB,CAAC;IAChD,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,QAAQ;CAClB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAEV,SAAS,YAAY;IACnB,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MA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AI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "flowengine-mcp-app",
3
- "version": "1.2.1",
4
- "description": "FlowEngine Model Context Protocol server for Claude. Manage n8n workflows, build UI components, configure client portals, and provision instances directly from Claude Desktop, VSCode, or CLI.",
3
+ "version": "2.0.0",
4
+ "description": "FlowEngine Model Context Protocol server for Claude. Manage n8n workflows, build UI components, configure client portals, and provision instances directly from Claude Desktop, VSCode, or CLI. Built with modern MCP Apps API.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "flowengine-mcp": "./build/index.js"
@@ -31,6 +31,7 @@
31
31
  "flowengine",
32
32
  "mcp",
33
33
  "mcp-app",
34
+ "mcp-apps",
34
35
  "model-context-protocol",
35
36
  "claude",
36
37
  "automation",
@@ -43,7 +44,7 @@
43
44
  "license": "MIT",
44
45
  "dependencies": {
45
46
  "@modelcontextprotocol/ext-apps": "^1.0.1",
46
- "@modelcontextprotocol/sdk": "^1.0.4"
47
+ "@modelcontextprotocol/sdk": "^1.25.0"
47
48
  },
48
49
  "devDependencies": {
49
50
  "@types/node": "^22.10.5",