@chandshantanu/agentbuilder-mcp-server 0.2.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/.env.example +7 -0
- package/AGENT_CREATION_GUIDE.md +724 -0
- package/AGENT_CREATION_TEST_PLAN.md +514 -0
- package/AGENT_DEPLOYMENT_GUIDE.md +509 -0
- package/GETTING_STARTED.md +435 -0
- package/LOCAL_DEVELOPMENT_TESTING_GUIDE.md +358 -0
- package/PRODUCTION_DEPLOYMENT_GUIDE.md +486 -0
- package/README.md +978 -0
- package/claude_desktop_config.example.json +13 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2751 -0
- package/dist/index.js.map +1 -0
- package/package.json +46 -0
- package/setup-production.sh +130 -0
- package/setup.sh +88 -0
- package/src/index.ts +3104 -0
- package/test-connection.js +154 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
# Getting Started with AgentBuilder MCP Server
|
|
2
|
+
|
|
3
|
+
**Quick Start Guide** for integrating workflow management with Claude Code
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🎯 What is This?
|
|
8
|
+
|
|
9
|
+
The **AgentBuilder MCP Server** is a bridge that lets you use Claude Code to create and manage workflows in your AgentBuilder platform through natural language commands.
|
|
10
|
+
|
|
11
|
+
**Instead of manually coding workflows**, you can now say things like:
|
|
12
|
+
|
|
13
|
+
> "Create a workflow that sends an email when a webhook is triggered"
|
|
14
|
+
|
|
15
|
+
And Claude will build it for you!
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ⚡ Quick Setup (5 minutes)
|
|
20
|
+
|
|
21
|
+
### 1. Run the Setup Script
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
cd agentbuilder-mcp-server
|
|
25
|
+
./setup.sh
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This will:
|
|
29
|
+
- ✅ Install dependencies
|
|
30
|
+
- ✅ Build the TypeScript project
|
|
31
|
+
- ✅ Create `.env` configuration file
|
|
32
|
+
- ✅ Show you the configuration to add to Claude Code
|
|
33
|
+
|
|
34
|
+
### 2. Configure Claude Code
|
|
35
|
+
|
|
36
|
+
Copy the configuration shown by the setup script and add it to:
|
|
37
|
+
|
|
38
|
+
**File**: `~/.claude/settings.local.json`
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"agentbuilder": {
|
|
44
|
+
"command": "node",
|
|
45
|
+
"args": ["/Users/shantanuchandra/code/agentbuilder/agentbuilder-mcp-server/dist/index.js"],
|
|
46
|
+
"env": {
|
|
47
|
+
"AGENTBUILDER_API_URL": "http://localhost:8000"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 3. Restart Claude Code
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Exit current session
|
|
58
|
+
exit
|
|
59
|
+
|
|
60
|
+
# Start new session
|
|
61
|
+
claude code
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 4. Verify Installation
|
|
65
|
+
|
|
66
|
+
In Claude Code, ask:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
List the available agentbuilder MCP tools
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Expected Output**: You should see 10 tools listed:
|
|
73
|
+
- `set_auth_token`
|
|
74
|
+
- `create_workflow`
|
|
75
|
+
- `list_workflows`
|
|
76
|
+
- `get_workflow`
|
|
77
|
+
- `update_workflow`
|
|
78
|
+
- `execute_workflow`
|
|
79
|
+
- `get_execution_status`
|
|
80
|
+
- `list_executions`
|
|
81
|
+
- `delete_workflow`
|
|
82
|
+
- `validate_workflow`
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 🔑 Getting Your Authentication Token
|
|
87
|
+
|
|
88
|
+
Before you can create workflows, you need to authenticate:
|
|
89
|
+
|
|
90
|
+
### Step 1: Login to Frontend
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Make sure frontend is running
|
|
94
|
+
cd frontend
|
|
95
|
+
npm run dev
|
|
96
|
+
|
|
97
|
+
# Open browser
|
|
98
|
+
open http://localhost:5173
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Step 2: Get JWT Token
|
|
102
|
+
|
|
103
|
+
1. Login as any user (e.g., `seller@agentbuilder.test` / `Seller123!@#`)
|
|
104
|
+
2. Open Browser DevTools (F12 or Cmd+Option+I)
|
|
105
|
+
3. Go to **Application** tab
|
|
106
|
+
4. Navigate to **Local Storage** → `http://localhost:5173`
|
|
107
|
+
5. Find key that starts with `supabase.auth.token`
|
|
108
|
+
6. Copy the **entire JSON value**
|
|
109
|
+
7. Extract the `access_token` field value
|
|
110
|
+
|
|
111
|
+
### Step 3: Set Token in Claude Code
|
|
112
|
+
|
|
113
|
+
In Claude Code:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Set my agentbuilder auth token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
(Use your actual token from Step 2)
|
|
120
|
+
|
|
121
|
+
**Response**:
|
|
122
|
+
> ✅ Authentication token set successfully. You can now use workflow tools.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 🎮 Your First Workflow
|
|
127
|
+
|
|
128
|
+
Now let's create your first workflow!
|
|
129
|
+
|
|
130
|
+
### Example 1: Simple Email Notification
|
|
131
|
+
|
|
132
|
+
In Claude Code, say:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Create a workflow using agentbuilder that:
|
|
136
|
+
- Name: "Welcome Email"
|
|
137
|
+
- Triggers on webhook
|
|
138
|
+
- Sends a welcome email
|
|
139
|
+
- Logs the action
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Claude will:**
|
|
143
|
+
1. Use `create_workflow` tool
|
|
144
|
+
2. Build the node structure
|
|
145
|
+
3. Connect nodes with edges
|
|
146
|
+
4. Return the created workflow with ID
|
|
147
|
+
|
|
148
|
+
**You'll see output like:**
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"success": true,
|
|
152
|
+
"data": {
|
|
153
|
+
"workflow_id": "67abc123def...",
|
|
154
|
+
"name": "Welcome Email",
|
|
155
|
+
"status": "draft",
|
|
156
|
+
"nodes": [...],
|
|
157
|
+
"edges": [...]
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Example 2: List Your Workflows
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
Show me all my workflows using agentbuilder
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Claude will call** `list_workflows` and show you all workflows in a formatted table.
|
|
169
|
+
|
|
170
|
+
### Example 3: Execute a Workflow
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
Execute workflow "67abc123def" with this input:
|
|
174
|
+
{
|
|
175
|
+
"email": "user@example.com",
|
|
176
|
+
"name": "John Doe"
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**Claude will:**
|
|
181
|
+
1. Call `execute_workflow`
|
|
182
|
+
2. Return execution ID
|
|
183
|
+
3. You can then check status with: "What's the status of that execution?"
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 🏗️ Complex Workflow Example
|
|
188
|
+
|
|
189
|
+
Let's build something more sophisticated:
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
Create a customer onboarding workflow in agentbuilder with these requirements:
|
|
193
|
+
|
|
194
|
+
Name: "Customer Onboarding v1"
|
|
195
|
+
Description: "Complete onboarding flow for new customers"
|
|
196
|
+
|
|
197
|
+
Steps:
|
|
198
|
+
1. Webhook trigger receives customer signup data
|
|
199
|
+
2. Validate email format using regex
|
|
200
|
+
3. Check if email already exists in database
|
|
201
|
+
4. If new customer:
|
|
202
|
+
a. Create user account in database
|
|
203
|
+
b. Send welcome email with activation link
|
|
204
|
+
c. Add to "New Customers" mailing list in HubSpot
|
|
205
|
+
d. Schedule follow-up email for 3 days later
|
|
206
|
+
5. If existing customer:
|
|
207
|
+
a. Update last_login timestamp
|
|
208
|
+
b. Send "Welcome Back" email
|
|
209
|
+
6. Log all actions to audit log
|
|
210
|
+
7. On any error:
|
|
211
|
+
a. Log error details
|
|
212
|
+
b. Send alert to admin@company.com
|
|
213
|
+
c. Create support ticket in Zendesk
|
|
214
|
+
|
|
215
|
+
Make sure to include:
|
|
216
|
+
- Proper error handling on each node
|
|
217
|
+
- Retry logic for external API calls
|
|
218
|
+
- Conditional branching for new vs existing customers
|
|
219
|
+
- Parallel execution where possible (email + mailing list)
|
|
220
|
+
|
|
221
|
+
Category: automation
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Claude will:**
|
|
225
|
+
- Analyze the requirements
|
|
226
|
+
- Design the workflow structure
|
|
227
|
+
- Create appropriate nodes for each step
|
|
228
|
+
- Add conditional logic nodes
|
|
229
|
+
- Set up error handling
|
|
230
|
+
- Connect everything with proper edges
|
|
231
|
+
- Create the workflow via MCP
|
|
232
|
+
|
|
233
|
+
**Result**: A production-ready workflow with 15+ nodes, conditional logic, error handling, and parallel execution!
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## 📊 Common Use Cases
|
|
238
|
+
|
|
239
|
+
### 1. Data Processing Pipeline
|
|
240
|
+
|
|
241
|
+
```
|
|
242
|
+
Build a CSV data processing workflow:
|
|
243
|
+
- Upload CSV file
|
|
244
|
+
- Validate columns
|
|
245
|
+
- Clean data (remove duplicates, fix formats)
|
|
246
|
+
- Enrich with external API data
|
|
247
|
+
- Save to database
|
|
248
|
+
- Generate summary report
|
|
249
|
+
- Email report to stakeholders
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### 2. Monitoring & Alerts
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
Create a system monitoring workflow that:
|
|
256
|
+
- Runs every 5 minutes (cron trigger)
|
|
257
|
+
- Checks API health endpoints
|
|
258
|
+
- Tests database connectivity
|
|
259
|
+
- Monitors disk space
|
|
260
|
+
- If any check fails, send Slack alert
|
|
261
|
+
- Log all results to MongoDB
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### 3. Content Publishing
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
Build a content publishing workflow:
|
|
268
|
+
- Trigger: New blog post drafted in CMS
|
|
269
|
+
- Check for plagiarism using API
|
|
270
|
+
- Generate SEO metadata
|
|
271
|
+
- Optimize images
|
|
272
|
+
- Schedule social media posts
|
|
273
|
+
- Publish to website
|
|
274
|
+
- Notify marketing team
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### 4. E-commerce Order Processing
|
|
278
|
+
|
|
279
|
+
```
|
|
280
|
+
Create an order fulfillment workflow:
|
|
281
|
+
- Trigger: New order received
|
|
282
|
+
- Validate payment status
|
|
283
|
+
- Check inventory levels
|
|
284
|
+
- If in stock:
|
|
285
|
+
- Reserve items
|
|
286
|
+
- Generate packing slip
|
|
287
|
+
- Send to warehouse API
|
|
288
|
+
- Update inventory
|
|
289
|
+
- Send confirmation email to customer
|
|
290
|
+
- If out of stock:
|
|
291
|
+
- Add to backorder queue
|
|
292
|
+
- Send delay notification
|
|
293
|
+
- Alert procurement team
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## 🔧 Advanced Features
|
|
299
|
+
|
|
300
|
+
### Workflow Validation
|
|
301
|
+
|
|
302
|
+
Before creating a complex workflow, validate it:
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
Validate this workflow structure:
|
|
306
|
+
{
|
|
307
|
+
"nodes": [...],
|
|
308
|
+
"edges": [...]
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Workflow Updates
|
|
313
|
+
|
|
314
|
+
Modify existing workflows:
|
|
315
|
+
|
|
316
|
+
```
|
|
317
|
+
Update workflow "67abc123" to add a new email node after the validation step
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Execution Monitoring
|
|
321
|
+
|
|
322
|
+
Track workflow executions:
|
|
323
|
+
|
|
324
|
+
```
|
|
325
|
+
Show me all failed executions from the last 24 hours
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
---
|
|
329
|
+
|
|
330
|
+
## 🐛 Troubleshooting
|
|
331
|
+
|
|
332
|
+
### "Auth token required" Error
|
|
333
|
+
|
|
334
|
+
**Solution**: Set your token again (tokens expire after ~1 hour)
|
|
335
|
+
|
|
336
|
+
```
|
|
337
|
+
Set my agentbuilder auth token: <new_token>
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### "Workflow validation failed" Error
|
|
341
|
+
|
|
342
|
+
**Check**:
|
|
343
|
+
- All nodes have unique IDs
|
|
344
|
+
- Edges connect existing nodes
|
|
345
|
+
- No circular dependencies
|
|
346
|
+
- At least one TRIGGER node exists
|
|
347
|
+
|
|
348
|
+
### "Backend connection refused" Error
|
|
349
|
+
|
|
350
|
+
**Solution**: Make sure backend is running
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
cd backend
|
|
354
|
+
source venv/bin/activate
|
|
355
|
+
uvicorn app.main:app --reload --port 8000
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Tools Not Showing in Claude Code
|
|
359
|
+
|
|
360
|
+
**Solution**:
|
|
361
|
+
1. Check settings file: `cat ~/.claude/settings.local.json`
|
|
362
|
+
2. Verify path to `dist/index.js` is correct
|
|
363
|
+
3. Rebuild MCP server: `npm run build`
|
|
364
|
+
4. Restart Claude Code
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## 📚 Learn More
|
|
369
|
+
|
|
370
|
+
- **Full Documentation**: See [README.md](README.md)
|
|
371
|
+
- **API Reference**: See [AgentBuilder API Docs](../docs/api/)
|
|
372
|
+
- **MCP Protocol**: https://modelcontextprotocol.io/
|
|
373
|
+
- **Claude Code**: https://claude.ai/code
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## 🎯 Next Steps
|
|
378
|
+
|
|
379
|
+
Now that you have the MCP server running, try:
|
|
380
|
+
|
|
381
|
+
1. **Create 5 different workflows** to get familiar with the tool
|
|
382
|
+
2. **Execute workflows** and monitor their status
|
|
383
|
+
3. **Build a complex multi-step workflow** for a real use case
|
|
384
|
+
4. **Integrate with your existing systems** (APIs, databases, etc.)
|
|
385
|
+
5. **Automate repetitive tasks** in your development workflow
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## 💡 Pro Tips
|
|
390
|
+
|
|
391
|
+
### Tip 1: Use Natural Language
|
|
392
|
+
|
|
393
|
+
Don't worry about exact syntax - Claude understands context:
|
|
394
|
+
|
|
395
|
+
✅ Good: "Create a workflow that sends emails when users sign up"
|
|
396
|
+
❌ Over-specific: "Use create_workflow tool with nodes array containing..."
|
|
397
|
+
|
|
398
|
+
### Tip 2: Iterate Quickly
|
|
399
|
+
|
|
400
|
+
Build workflows incrementally:
|
|
401
|
+
|
|
402
|
+
```
|
|
403
|
+
1. Create simple workflow
|
|
404
|
+
2. Test it
|
|
405
|
+
3. Add more complexity
|
|
406
|
+
4. Test again
|
|
407
|
+
5. Repeat
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Tip 3: Save Workflow IDs
|
|
411
|
+
|
|
412
|
+
Keep track of important workflow IDs in a note:
|
|
413
|
+
|
|
414
|
+
```markdown
|
|
415
|
+
# My Workflows
|
|
416
|
+
|
|
417
|
+
- Welcome Email: 67abc123def
|
|
418
|
+
- Order Processing: 67xyz789ghi
|
|
419
|
+
- Daily Report: 67mnp456jkl
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### Tip 4: Use Descriptive Names
|
|
423
|
+
|
|
424
|
+
Name workflows clearly:
|
|
425
|
+
|
|
426
|
+
✅ Good: "Customer Onboarding - Email + CRM"
|
|
427
|
+
❌ Bad: "Workflow 1"
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
## 🚀 You're Ready!
|
|
432
|
+
|
|
433
|
+
You now have a powerful workflow automation system at your fingertips. Start building!
|
|
434
|
+
|
|
435
|
+
**Happy automating!** 🎉
|