flowengine-mcp-app 1.0.0 → 1.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.
- package/README.md +188 -112
- package/build/client.d.ts +8 -3
- package/build/client.d.ts.map +1 -1
- package/build/client.js +32 -5
- package/build/client.js.map +1 -1
- package/build/index.d.ts +7 -2
- package/build/index.d.ts.map +1 -1
- package/build/index.js +199 -338
- package/build/index.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,37 +1,53 @@
|
|
|
1
|
-
# FlowEngine MCP
|
|
1
|
+
# FlowEngine MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Control your white-label automation platform directly from Claude**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The official Model Context Protocol (MCP) server for FlowEngine. Manage instances, client portals, and build UI components using AI - all from Claude Desktop, VSCode, or Claude Code CLI.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **🏢 Client Portals** - Manage your client instances and portals with visual dashboards
|
|
9
|
-
- **⚡ Workflow Manager** - View, toggle, and monitor automation workflows
|
|
10
|
-
- **🎨 UI Builder** - Create and manage forms, chatbots, and interactive components
|
|
11
|
-
- **🚀 Hosting Management** - Monitor instance health, storage, and status
|
|
7
|
+
## What is FlowEngine?
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
FlowEngine is a white-label n8n automation platform that lets you build and deploy workflow automations for your clients. This MCP server brings FlowEngine's core capabilities into Claude for seamless management.
|
|
14
10
|
|
|
15
|
-
##
|
|
11
|
+
## Core Features
|
|
16
12
|
|
|
17
|
-
###
|
|
13
|
+
### Instance Management
|
|
14
|
+
Provision and manage FlowEngine instances for your clients:
|
|
15
|
+
- List all instances with status
|
|
16
|
+
- Monitor health and performance
|
|
17
|
+
- Create new instances
|
|
18
|
+
- Update configurations
|
|
19
|
+
- Delete instances
|
|
20
|
+
|
|
21
|
+
### Client Portals
|
|
22
|
+
Access and monitor your client portals:
|
|
23
|
+
- View all client portal URLs
|
|
24
|
+
- Check portal status
|
|
25
|
+
- Monitor workflows and components per portal
|
|
26
|
+
|
|
27
|
+
### AI FlowBuilder
|
|
28
|
+
Create and manage UI components with AI:
|
|
29
|
+
- Build forms, chatbots, and widgets
|
|
30
|
+
- List all components across instances
|
|
31
|
+
- Update component configurations
|
|
32
|
+
- Delete components
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
18
35
|
|
|
36
|
+
### Prerequisites
|
|
19
37
|
- Node.js 18 or higher
|
|
20
|
-
- FlowEngine account with API key
|
|
21
|
-
- Claude
|
|
38
|
+
- FlowEngine account with API key ([Get one here](https://flowengine.cloud))
|
|
39
|
+
- Claude Desktop, VSCode, or Claude Code CLI
|
|
22
40
|
|
|
23
|
-
###
|
|
41
|
+
### Get Your API Key
|
|
24
42
|
|
|
25
43
|
1. Log in to [FlowEngine](https://flowengine.cloud)
|
|
26
|
-
2. Go to
|
|
27
|
-
3. Click
|
|
28
|
-
4. Copy
|
|
29
|
-
|
|
30
|
-
### Step 2: Configure Claude Code
|
|
44
|
+
2. Go to Settings → API Access
|
|
45
|
+
3. Click "Generate API Key"
|
|
46
|
+
4. Copy your key (shown only once)
|
|
31
47
|
|
|
32
|
-
|
|
48
|
+
### Quick Setup
|
|
33
49
|
|
|
34
|
-
|
|
50
|
+
#### Claude Desktop
|
|
35
51
|
|
|
36
52
|
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
37
53
|
|
|
@@ -40,176 +56,236 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
|
40
56
|
"mcpServers": {
|
|
41
57
|
"flowengine": {
|
|
42
58
|
"command": "npx",
|
|
43
|
-
"args": ["-y", "
|
|
59
|
+
"args": ["-y", "flowengine-mcp-app"],
|
|
44
60
|
"env": {
|
|
45
|
-
"FLOWENGINE_API_KEY": "your-api-key-here"
|
|
46
|
-
"FLOWENGINE_BASE_URL": "https://flowengine.cloud"
|
|
61
|
+
"FLOWENGINE_API_KEY": "your-api-key-here"
|
|
47
62
|
}
|
|
48
63
|
}
|
|
49
64
|
}
|
|
50
65
|
}
|
|
51
66
|
```
|
|
52
67
|
|
|
53
|
-
|
|
68
|
+
#### Claude Code CLI
|
|
54
69
|
|
|
55
|
-
Edit `~/.
|
|
70
|
+
Edit `~/.claude/claude_code_config.json`:
|
|
56
71
|
|
|
57
72
|
```json
|
|
58
73
|
{
|
|
59
74
|
"mcpServers": {
|
|
60
75
|
"flowengine": {
|
|
61
76
|
"command": "npx",
|
|
62
|
-
"args": ["-y", "
|
|
77
|
+
"args": ["-y", "flowengine-mcp-app"],
|
|
63
78
|
"env": {
|
|
64
|
-
"FLOWENGINE_API_KEY": "your-api-key-here"
|
|
65
|
-
"FLOWENGINE_BASE_URL": "https://flowengine.cloud"
|
|
79
|
+
"FLOWENGINE_API_KEY": "your-api-key-here"
|
|
66
80
|
}
|
|
67
81
|
}
|
|
68
82
|
}
|
|
69
83
|
}
|
|
70
84
|
```
|
|
71
85
|
|
|
72
|
-
|
|
86
|
+
#### VSCode (Claude Extension)
|
|
73
87
|
|
|
74
|
-
|
|
88
|
+
Add to your VSCode settings:
|
|
75
89
|
|
|
76
90
|
```json
|
|
77
91
|
{
|
|
78
92
|
"mcp.servers": {
|
|
79
93
|
"flowengine": {
|
|
80
94
|
"command": "npx",
|
|
81
|
-
"args": ["-y", "
|
|
95
|
+
"args": ["-y", "flowengine-mcp-app"],
|
|
82
96
|
"env": {
|
|
83
|
-
"FLOWENGINE_API_KEY": "your-api-key-here"
|
|
84
|
-
"FLOWENGINE_BASE_URL": "https://flowengine.cloud"
|
|
97
|
+
"FLOWENGINE_API_KEY": "your-api-key-here"
|
|
85
98
|
}
|
|
86
99
|
}
|
|
87
100
|
}
|
|
88
101
|
}
|
|
89
102
|
```
|
|
90
103
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
Restart Claude Desktop, start a new Claude Code CLI session, or reload your VSCode window to load the MCP App.
|
|
104
|
+
**Then restart** Claude Desktop, start a new Claude Code session, or reload VSCode.
|
|
94
105
|
|
|
95
|
-
|
|
106
|
+
## Usage
|
|
96
107
|
|
|
97
|
-
|
|
108
|
+
### 🎨 Interactive Dashboards (MCP Apps)
|
|
98
109
|
|
|
99
|
-
|
|
110
|
+
**NEW!** Visual dashboards with interactive HTML interfaces. Ask Claude:
|
|
100
111
|
|
|
101
|
-
|
|
112
|
+
| Command | What You Get |
|
|
113
|
+
|---------|--------------|
|
|
114
|
+
| **"Show me the FlowEngine client portals dashboard"** | Interactive dashboard with all your client portals, URLs, status, and storage info |
|
|
115
|
+
| **"Show me the AI FlowBuilder"** | Visual dashboard for managing forms, chatbots, and widgets across all instances |
|
|
116
|
+
| **"Show me my FlowEngine instances"** | Instance manager dashboard with health status, resource usage, and quick actions |
|
|
102
117
|
|
|
103
|
-
|
|
118
|
+
**How it works:**
|
|
119
|
+
1. Ask Claude using the exact commands above
|
|
120
|
+
2. Claude will display a rich HTML dashboard
|
|
121
|
+
3. View all your data in a visual, organized format
|
|
104
122
|
|
|
123
|
+
**Fallback:** If dashboards don't appear, use text-based tools:
|
|
105
124
|
```
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"Show me the UI builder"
|
|
110
|
-
"Show me my hosting instances"
|
|
125
|
+
"Use flowengine_list_portals to show my portals"
|
|
126
|
+
"Use flowengine_list_instances"
|
|
127
|
+
"Use flowengine_list_components"
|
|
111
128
|
```
|
|
112
129
|
|
|
113
|
-
|
|
130
|
+
### 💬 Natural Language Commands
|
|
114
131
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
You can also ask Claude to perform actions:
|
|
132
|
+
Manage your platform through conversation:
|
|
118
133
|
|
|
119
134
|
```
|
|
120
|
-
"List all my
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
135
|
+
"List all my FlowEngine instances"
|
|
136
|
+
"What's the status of instance abc123?"
|
|
137
|
+
"Create a new contact form widget"
|
|
138
|
+
"Show me all UI components"
|
|
139
|
+
"Provision a new instance for Acme Corp"
|
|
124
140
|
```
|
|
125
141
|
|
|
126
|
-
|
|
142
|
+
## Available Tools
|
|
127
143
|
|
|
128
|
-
|
|
129
|
-
- `
|
|
130
|
-
- `
|
|
131
|
-
- `
|
|
132
|
-
- `
|
|
144
|
+
### Instance Management (5 tools)
|
|
145
|
+
- `flowengine_list_instances` - List all instances
|
|
146
|
+
- `flowengine_get_instance_status` - Get instance health
|
|
147
|
+
- `flowengine_create_instance` - Provision new instance
|
|
148
|
+
- `flowengine_update_instance` - Update settings
|
|
149
|
+
- `flowengine_delete_instance` - Delete instance
|
|
133
150
|
|
|
134
|
-
###
|
|
151
|
+
### Client Portals (1 tool)
|
|
152
|
+
- `flowengine_list_portals` - List all portals
|
|
135
153
|
|
|
136
|
-
|
|
137
|
-
- `
|
|
138
|
-
- `flowengine_get_workflow_executions` - Get workflow execution history
|
|
139
|
-
- `flowengine_list_instances` - List all instances
|
|
140
|
-
- `flowengine_get_instance_status` - Get instance health status
|
|
141
|
-
- `flowengine_list_ui_components` - List forms/chatbots/widgets
|
|
154
|
+
### AI FlowBuilder (5 tools)
|
|
155
|
+
- `flowengine_list_components` - List UI components
|
|
142
156
|
- `flowengine_get_component` - Get component details
|
|
143
|
-
- `
|
|
157
|
+
- `flowengine_create_component` - Create form/chatbot/widget
|
|
158
|
+
- `flowengine_update_component` - Update component
|
|
159
|
+
- `flowengine_delete_component` - Delete component
|
|
160
|
+
|
|
161
|
+
**Total: 11 tools** (optimized to prevent API concurrency issues)
|
|
162
|
+
|
|
163
|
+
## Resources
|
|
164
|
+
|
|
165
|
+
Interactive UI dashboards available via MCP Apps (MCP v1.1+):
|
|
166
|
+
|
|
167
|
+
- `ui://flowengine/portals` - Client Portals Dashboard
|
|
168
|
+
- `ui://flowengine/ui-builder` - AI FlowBuilder
|
|
169
|
+
- `ui://flowengine/instances` - Instance Manager
|
|
170
|
+
|
|
171
|
+
**Note**: MCP Apps is a new feature announced January 26, 2026. Support may vary by client:
|
|
172
|
+
- ✅ Claude Desktop: Coming soon
|
|
173
|
+
- ✅ Claude Code: Check version compatibility
|
|
174
|
+
- ✅ VSCode: Depends on extension version
|
|
175
|
+
|
|
176
|
+
## Configuration
|
|
177
|
+
|
|
178
|
+
### Environment Variables
|
|
179
|
+
|
|
180
|
+
- `FLOWENGINE_API_KEY` (required) - Your FlowEngine API key
|
|
181
|
+
- `FLOWENGINE_BASE_URL` (optional) - Custom base URL (defaults to https://flowengine.cloud)
|
|
182
|
+
|
|
183
|
+
### Custom Base URL
|
|
184
|
+
|
|
185
|
+
For self-hosted or custom deployments:
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"env": {
|
|
190
|
+
"FLOWENGINE_API_KEY": "your-key",
|
|
191
|
+
"FLOWENGINE_BASE_URL": "https://your-domain.com"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
```
|
|
144
195
|
|
|
145
|
-
##
|
|
196
|
+
## Development
|
|
146
197
|
|
|
147
|
-
|
|
198
|
+
### Local Development
|
|
148
199
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
200
|
+
```bash
|
|
201
|
+
# Clone and install
|
|
202
|
+
git clone https://github.com/FlowEngine-cloud/flowengine.git
|
|
203
|
+
cd flowengine/flowengine-mcp
|
|
204
|
+
npm install
|
|
154
205
|
|
|
155
|
-
|
|
206
|
+
# Build
|
|
207
|
+
npm run build
|
|
208
|
+
|
|
209
|
+
# Test locally
|
|
210
|
+
node build/index.js
|
|
211
|
+
```
|
|
156
212
|
|
|
157
213
|
### Project Structure
|
|
158
214
|
|
|
159
215
|
```
|
|
160
216
|
flowengine-mcp/
|
|
161
217
|
├── src/
|
|
162
|
-
│ ├── index.ts
|
|
163
|
-
│ ├── client.ts
|
|
164
|
-
│ └── ui/
|
|
165
|
-
│ ├── base.ts
|
|
166
|
-
│ ├──
|
|
167
|
-
│ ├──
|
|
168
|
-
│
|
|
169
|
-
│ ├── widgets.ts # UI builder UI
|
|
170
|
-
│ └── instances.ts # Hosting management UI
|
|
218
|
+
│ ├── index.ts # MCP server
|
|
219
|
+
│ ├── client.ts # FlowEngine API client
|
|
220
|
+
│ └── ui/ # Dashboard renderers
|
|
221
|
+
│ ├── base.ts
|
|
222
|
+
│ ├── portals.ts
|
|
223
|
+
│ ├── widgets.ts
|
|
224
|
+
│ └── instances.ts
|
|
171
225
|
├── package.json
|
|
172
226
|
├── tsconfig.json
|
|
173
227
|
└── README.md
|
|
174
228
|
```
|
|
175
229
|
|
|
176
|
-
### Build
|
|
230
|
+
### Using Local Build
|
|
177
231
|
|
|
178
|
-
|
|
179
|
-
|
|
232
|
+
Point your MCP config to local build:
|
|
233
|
+
|
|
234
|
+
```json
|
|
235
|
+
{
|
|
236
|
+
"mcpServers": {
|
|
237
|
+
"flowengine": {
|
|
238
|
+
"command": "node",
|
|
239
|
+
"args": ["/path/to/flowengine-mcp/build/index.js"],
|
|
240
|
+
"env": {
|
|
241
|
+
"FLOWENGINE_API_KEY": "your-key"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
180
246
|
```
|
|
181
247
|
|
|
182
|
-
|
|
248
|
+
## Troubleshooting
|
|
183
249
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
250
|
+
### API Key Issues
|
|
251
|
+
|
|
252
|
+
**Error: "FlowEngine API key not configured"**
|
|
253
|
+
|
|
254
|
+
Solution: Verify `FLOWENGINE_API_KEY` is set in your MCP config
|
|
255
|
+
|
|
256
|
+
### Connection Issues
|
|
257
|
+
|
|
258
|
+
**Error: "Failed to connect to FlowEngine API"**
|
|
259
|
+
|
|
260
|
+
Solutions:
|
|
261
|
+
- Check your internet connection
|
|
262
|
+
- Verify API key is valid
|
|
263
|
+
- Ensure `FLOWENGINE_BASE_URL` is correct (if using custom)
|
|
264
|
+
|
|
265
|
+
### MCP Server Not Starting
|
|
187
266
|
|
|
188
|
-
|
|
267
|
+
**Server doesn't appear in Claude**
|
|
189
268
|
|
|
190
|
-
|
|
269
|
+
Solutions:
|
|
270
|
+
- Restart Claude Desktop / reload VSCode / start new Claude Code session
|
|
271
|
+
- Check MCP config JSON syntax is valid
|
|
272
|
+
- View logs: `~/.claude/debug/latest` (Claude Code)
|
|
191
273
|
|
|
192
|
-
##
|
|
274
|
+
## Support
|
|
193
275
|
|
|
194
|
-
|
|
276
|
+
- **FlowEngine Support**: [flowengine.cloud/support](https://flowengine.cloud/support)
|
|
277
|
+
- **Documentation**: [docs.flowengine.cloud](https://docs.flowengine.cloud)
|
|
278
|
+
- **GitHub Issues**: [github.com/FlowEngine-cloud/flowengine/issues](https://github.com/FlowEngine-cloud/flowengine/issues)
|
|
279
|
+
- **MCP Protocol**: [modelcontextprotocol.io](https://modelcontextprotocol.io)
|
|
195
280
|
|
|
196
|
-
##
|
|
281
|
+
## License
|
|
197
282
|
|
|
198
|
-
|
|
199
|
-
- FlowEngine: [https://flowengine.cloud/support](https://flowengine.cloud/support)
|
|
200
|
-
- MCP Documentation: [https://modelcontextprotocol.io](https://modelcontextprotocol.io)
|
|
283
|
+
MIT License - See LICENSE file for details
|
|
201
284
|
|
|
202
|
-
##
|
|
285
|
+
## Contributing
|
|
203
286
|
|
|
204
|
-
|
|
287
|
+
Contributions welcome! Please read our contributing guidelines before submitting PRs.
|
|
205
288
|
|
|
206
|
-
|
|
207
|
-
- [ ] Workflow editor integration
|
|
208
|
-
- [ ] Template marketplace
|
|
209
|
-
- [ ] Advanced analytics dashboard
|
|
210
|
-
- [ ] Team collaboration features
|
|
211
|
-
- [ ] Webhook testing UI
|
|
212
|
-
- [ ] Credential management UI
|
|
213
|
-
- [ ] Backup & restore UI
|
|
289
|
+
---
|
|
214
290
|
|
|
215
|
-
|
|
291
|
+
Built by the FlowEngine team
|
package/build/client.d.ts
CHANGED
|
@@ -10,20 +10,25 @@ export declare class FlowEngineClient {
|
|
|
10
10
|
private apiKey;
|
|
11
11
|
private baseUrl;
|
|
12
12
|
constructor(config: FlowEngineConfig);
|
|
13
|
+
/**
|
|
14
|
+
* Parse error response based on Content-Type
|
|
15
|
+
* Handles JSON, HTML, and plain text responses
|
|
16
|
+
*/
|
|
17
|
+
private parseErrorResponse;
|
|
13
18
|
private request;
|
|
14
|
-
getClientInstances(): Promise<
|
|
19
|
+
getClientInstances(): Promise<any[]>;
|
|
15
20
|
getClientPanelWorkflows(instanceId: string): Promise<unknown>;
|
|
16
21
|
getClientPanelWidgets(instanceId: string): Promise<unknown>;
|
|
17
22
|
getWorkflows(instanceId?: string): Promise<unknown>;
|
|
18
23
|
toggleWorkflow(workflowId: string, enabled: boolean): Promise<unknown>;
|
|
19
24
|
archiveWorkflow(workflowId: string): Promise<unknown>;
|
|
20
25
|
getWorkflowParameters(workflowId: string): Promise<unknown>;
|
|
21
|
-
getWidgets(instanceId?: string): Promise<
|
|
26
|
+
getWidgets(instanceId?: string): Promise<any[]>;
|
|
22
27
|
getWidget(widgetId: string): Promise<unknown>;
|
|
23
28
|
createWidget(data: any): Promise<unknown>;
|
|
24
29
|
updateWidget(widgetId: string, data: any): Promise<unknown>;
|
|
25
30
|
deleteWidget(widgetId: string): Promise<unknown>;
|
|
26
|
-
getInstances(): Promise<
|
|
31
|
+
getInstances(): Promise<any[]>;
|
|
27
32
|
getInstanceStatus(instanceId: string): Promise<unknown>;
|
|
28
33
|
provisionInstance(data: any): Promise<unknown>;
|
|
29
34
|
updateInstance(data: any): Promise<unknown>;
|
package/build/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,O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,CAAC,EAAE,MAAM,CAAA;KAAE;IAOhG,cAAc,CAAC,IAAI,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;IAO/D,aAAa;IAKb,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM;IAKlC,kBAAkB;IAIlB,gBAAgB,CAAC,IAAI,EAAE,GAAG;IAO1B,gBAAgB,CAAC,YAAY,EAAE,MAAM;IAMrC,cAAc,CAAC,IAAI,EAAE,GAAG;IAQxB,aAAa;IAIb,aAAa;CAGpB"}
|
package/build/client.js
CHANGED
|
@@ -9,6 +9,30 @@ export class FlowEngineClient {
|
|
|
9
9
|
this.apiKey = config.apiKey;
|
|
10
10
|
this.baseUrl = config.baseUrl || 'https://flowengine.cloud';
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Parse error response based on Content-Type
|
|
14
|
+
* Handles JSON, HTML, and plain text responses
|
|
15
|
+
*/
|
|
16
|
+
async parseErrorResponse(response) {
|
|
17
|
+
const contentType = response.headers.get('content-type') || '';
|
|
18
|
+
// Handle JSON error responses
|
|
19
|
+
if (contentType.includes('application/json')) {
|
|
20
|
+
try {
|
|
21
|
+
const json = await response.json();
|
|
22
|
+
return json.error || json.message || JSON.stringify(json);
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return 'Invalid JSON error response';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// Handle HTML error pages
|
|
29
|
+
const text = await response.text();
|
|
30
|
+
if (text.includes('<!DOCTYPE') || text.includes('<html')) {
|
|
31
|
+
return `Server error (HTTP ${response.status})`;
|
|
32
|
+
}
|
|
33
|
+
// Handle plain text, truncate if too long
|
|
34
|
+
return text.length > 200 ? text.substring(0, 200) + '...' : text;
|
|
35
|
+
}
|
|
12
36
|
async request(endpoint, options = {}) {
|
|
13
37
|
const url = `${this.baseUrl}${endpoint}`;
|
|
14
38
|
const headers = {
|
|
@@ -18,14 +42,15 @@ export class FlowEngineClient {
|
|
|
18
42
|
};
|
|
19
43
|
const response = await fetch(url, { ...options, headers });
|
|
20
44
|
if (!response.ok) {
|
|
21
|
-
const error = await
|
|
45
|
+
const error = await this.parseErrorResponse(response);
|
|
22
46
|
throw new Error(`FlowEngine API Error (${response.status}): ${error}`);
|
|
23
47
|
}
|
|
24
48
|
return response.json();
|
|
25
49
|
}
|
|
26
50
|
// Portal / Client Panel APIs
|
|
27
51
|
async getClientInstances() {
|
|
28
|
-
|
|
52
|
+
const response = await this.request('/api/mcp/portals');
|
|
53
|
+
return response.portals || [];
|
|
29
54
|
}
|
|
30
55
|
async getClientPanelWorkflows(instanceId) {
|
|
31
56
|
return this.request(`/api/client-panel/${instanceId}/workflows`);
|
|
@@ -36,7 +61,7 @@ export class FlowEngineClient {
|
|
|
36
61
|
// Workflow APIs
|
|
37
62
|
async getWorkflows(instanceId) {
|
|
38
63
|
const params = instanceId ? `?instanceId=${instanceId}` : '';
|
|
39
|
-
return this.request(`/api/
|
|
64
|
+
return this.request(`/api/mcp/workflows${params}`);
|
|
40
65
|
}
|
|
41
66
|
async toggleWorkflow(workflowId, enabled) {
|
|
42
67
|
return this.request(`/api/client/workflows/${workflowId}/toggle`, {
|
|
@@ -55,7 +80,8 @@ export class FlowEngineClient {
|
|
|
55
80
|
// Widget / UI Builder APIs
|
|
56
81
|
async getWidgets(instanceId) {
|
|
57
82
|
const params = instanceId ? `?instanceId=${instanceId}` : '';
|
|
58
|
-
|
|
83
|
+
const response = await this.request(`/api/mcp/components${params}`);
|
|
84
|
+
return response.components || [];
|
|
59
85
|
}
|
|
60
86
|
async getWidget(widgetId) {
|
|
61
87
|
return this.request(`/api/client/widgets/${widgetId}`);
|
|
@@ -79,7 +105,8 @@ export class FlowEngineClient {
|
|
|
79
105
|
}
|
|
80
106
|
// Instance / Hosting APIs
|
|
81
107
|
async getInstances() {
|
|
82
|
-
|
|
108
|
+
const response = await this.request('/api/mcp/instances');
|
|
109
|
+
return response.instances || [];
|
|
83
110
|
}
|
|
84
111
|
async getInstanceStatus(instanceId) {
|
|
85
112
|
return this.request(`/api/n8n/status?instanceId=${instanceId}`);
|
package/build/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,MAAM,OAAO,gBAAgB;IACnB,MAAM,CAAS;IACf,OAAO,CAAS;IAExB,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,0BAA0B,CAAC;IAC9D,CAAC;IAEO,KAAK,CAAC,OAAO,CAAI,QAAgB,EAAE,UAAuB,EAAE;QAClE,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,OAAO,GAAG,QAAQ,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG;YACd,eAAe,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;YACxC,cAAc,EAAE,kBAAkB;YAClC,GAAG,OAAO,CAAC,OAAO;SACnB,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAE3D,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,KAAK,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,MAAM,OAAO,gBAAgB;IACnB,MAAM,CAAS;IACf,OAAO,CAAS;IAExB,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,0BAA0B,CAAC;IAC9D,CAAC;IAED;;;OAGG;IACK,KAAK,CAAC,kBAAkB,CAAC,QA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S;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,8BAA8B,EAAE;YAClD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,qBAAqB;IACrB,KAAK,CAAC,aAAa;QACjB,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACjD,CAAC;CACF"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* FlowEngine MCP
|
|
4
|
-
*
|
|
3
|
+
* FlowEngine MCP Server
|
|
4
|
+
* Manage your white-label automation platform from Claude
|
|
5
|
+
*
|
|
6
|
+
* Core Features:
|
|
7
|
+
* 1. Instance Management - Provision and manage FlowEngine instances
|
|
8
|
+
* 2. Client Portals - Monitor and access client portals
|
|
9
|
+
* 3. AI FlowBuilder - Create forms, chatbots, and UI components
|
|
5
10
|
*/
|
|
6
11
|
export {};
|
|
7
12
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG"}
|