@kelpi/mcp 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 +312 -0
- package/bin/kelpi-mcp +3 -0
- package/dist/__tests__/integration-api/fixtures.d.ts +382 -0
- package/dist/__tests__/integration-api/fixtures.d.ts.map +1 -0
- package/dist/__tests__/integration-api/fixtures.js +478 -0
- package/dist/__tests__/integration-api/fixtures.js.map +1 -0
- package/dist/__tests__/integration-api/index.d.ts +19 -0
- package/dist/__tests__/integration-api/index.d.ts.map +1 -0
- package/dist/__tests__/integration-api/index.js +33 -0
- package/dist/__tests__/integration-api/index.js.map +1 -0
- package/dist/__tests__/integration-api/setup.d.ts +176 -0
- package/dist/__tests__/integration-api/setup.d.ts.map +1 -0
- package/dist/__tests__/integration-api/setup.js +329 -0
- package/dist/__tests__/integration-api/setup.js.map +1 -0
- package/dist/__tests__/setup.d.ts +2 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/__tests__/setup.js +11 -0
- package/dist/__tests__/setup.js.map +1 -0
- package/dist/__tests__/unit/test-utils.d.ts +46 -0
- package/dist/__tests__/unit/test-utils.d.ts.map +1 -0
- package/dist/__tests__/unit/test-utils.js +50 -0
- package/dist/__tests__/unit/test-utils.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/api-client.d.ts +17 -0
- package/dist/lib/api-client.d.ts.map +1 -0
- package/dist/lib/api-client.js +169 -0
- package/dist/lib/api-client.js.map +1 -0
- package/dist/lib/auth-state.d.ts +54 -0
- package/dist/lib/auth-state.d.ts.map +1 -0
- package/dist/lib/auth-state.js +131 -0
- package/dist/lib/auth-state.js.map +1 -0
- package/dist/lib/config.d.ts +39 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +170 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/error-formatter.d.ts +40 -0
- package/dist/lib/error-formatter.d.ts.map +1 -0
- package/dist/lib/error-formatter.js +149 -0
- package/dist/lib/error-formatter.js.map +1 -0
- package/dist/lib/errors.d.ts +44 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +56 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/tool-helpers.d.ts +49 -0
- package/dist/lib/tool-helpers.d.ts.map +1 -0
- package/dist/lib/tool-helpers.js +101 -0
- package/dist/lib/tool-helpers.js.map +1 -0
- package/dist/lib/tool-registry.d.ts +111 -0
- package/dist/lib/tool-registry.d.ts.map +1 -0
- package/dist/lib/tool-registry.js +112 -0
- package/dist/lib/tool-registry.js.map +1 -0
- package/dist/lib/version.d.ts +13 -0
- package/dist/lib/version.d.ts.map +1 -0
- package/dist/lib/version.js +13 -0
- package/dist/lib/version.js.map +1 -0
- package/dist/prompts/flow-generator.d.ts +45 -0
- package/dist/prompts/flow-generator.d.ts.map +1 -0
- package/dist/prompts/flow-generator.js +177 -0
- package/dist/prompts/flow-generator.js.map +1 -0
- package/dist/prompts/index.d.ts +7 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +7 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/server.d.ts +66 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +140 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/auth/index.d.ts +18 -0
- package/dist/tools/auth/index.d.ts.map +1 -0
- package/dist/tools/auth/index.js +50 -0
- package/dist/tools/auth/index.js.map +1 -0
- package/dist/tools/auth/login.d.ts +37 -0
- package/dist/tools/auth/login.d.ts.map +1 -0
- package/dist/tools/auth/login.js +257 -0
- package/dist/tools/auth/login.js.map +1 -0
- package/dist/tools/auth/schemas.d.ts +69 -0
- package/dist/tools/auth/schemas.d.ts.map +1 -0
- package/dist/tools/auth/schemas.js +36 -0
- package/dist/tools/auth/schemas.js.map +1 -0
- package/dist/tools/auth/status.d.ts +11 -0
- package/dist/tools/auth/status.d.ts.map +1 -0
- package/dist/tools/auth/status.js +50 -0
- package/dist/tools/auth/status.js.map +1 -0
- package/dist/tools/contacts/create.d.ts +11 -0
- package/dist/tools/contacts/create.d.ts.map +1 -0
- package/dist/tools/contacts/create.js +47 -0
- package/dist/tools/contacts/create.js.map +1 -0
- package/dist/tools/contacts/index.d.ts +10 -0
- package/dist/tools/contacts/index.d.ts.map +1 -0
- package/dist/tools/contacts/index.js +40 -0
- package/dist/tools/contacts/index.js.map +1 -0
- package/dist/tools/contacts/schemas.d.ts +37 -0
- package/dist/tools/contacts/schemas.d.ts.map +1 -0
- package/dist/tools/contacts/schemas.js +15 -0
- package/dist/tools/contacts/schemas.js.map +1 -0
- package/dist/tools/events/index.d.ts +10 -0
- package/dist/tools/events/index.d.ts.map +1 -0
- package/dist/tools/events/index.js +42 -0
- package/dist/tools/events/index.js.map +1 -0
- package/dist/tools/events/schemas.d.ts +37 -0
- package/dist/tools/events/schemas.d.ts.map +1 -0
- package/dist/tools/events/schemas.js +17 -0
- package/dist/tools/events/schemas.js.map +1 -0
- package/dist/tools/events/track.d.ts +11 -0
- package/dist/tools/events/track.d.ts.map +1 -0
- package/dist/tools/events/track.js +41 -0
- package/dist/tools/events/track.js.map +1 -0
- package/dist/tools/flows/activate.d.ts +11 -0
- package/dist/tools/flows/activate.d.ts.map +1 -0
- package/dist/tools/flows/activate.js +46 -0
- package/dist/tools/flows/activate.js.map +1 -0
- package/dist/tools/flows/create.d.ts +11 -0
- package/dist/tools/flows/create.d.ts.map +1 -0
- package/dist/tools/flows/create.js +72 -0
- package/dist/tools/flows/create.js.map +1 -0
- package/dist/tools/flows/index.d.ts +24 -0
- package/dist/tools/flows/index.d.ts.map +1 -0
- package/dist/tools/flows/index.js +183 -0
- package/dist/tools/flows/index.js.map +1 -0
- package/dist/tools/flows/list.d.ts +11 -0
- package/dist/tools/flows/list.d.ts.map +1 -0
- package/dist/tools/flows/list.js +34 -0
- package/dist/tools/flows/list.js.map +1 -0
- package/dist/tools/flows/schemas.d.ts +621 -0
- package/dist/tools/flows/schemas.d.ts.map +1 -0
- package/dist/tools/flows/schemas.js +135 -0
- package/dist/tools/flows/schemas.js.map +1 -0
- package/dist/tools/flows/transform.d.ts +39 -0
- package/dist/tools/flows/transform.d.ts.map +1 -0
- package/dist/tools/flows/transform.js +139 -0
- package/dist/tools/flows/transform.js.map +1 -0
- package/dist/tools/index.d.ts +34 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +46 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/sdk/index.d.ts +18 -0
- package/dist/tools/sdk/index.d.ts.map +1 -0
- package/dist/tools/sdk/index.js +69 -0
- package/dist/tools/sdk/index.js.map +1 -0
- package/dist/tools/sdk/public-key.d.ts +11 -0
- package/dist/tools/sdk/public-key.d.ts.map +1 -0
- package/dist/tools/sdk/public-key.js +24 -0
- package/dist/tools/sdk/public-key.js.map +1 -0
- package/dist/tools/sdk/schemas.d.ts +48 -0
- package/dist/tools/sdk/schemas.d.ts.map +1 -0
- package/dist/tools/sdk/schemas.js +35 -0
- package/dist/tools/sdk/schemas.js.map +1 -0
- package/dist/tools/sdk/snippet.d.ts +11 -0
- package/dist/tools/sdk/snippet.d.ts.map +1 -0
- package/dist/tools/sdk/snippet.js +50 -0
- package/dist/tools/sdk/snippet.js.map +1 -0
- package/dist/tools/sdk/templates/index.d.ts +5 -0
- package/dist/tools/sdk/templates/index.d.ts.map +1 -0
- package/dist/tools/sdk/templates/index.js +5 -0
- package/dist/tools/sdk/templates/index.js.map +1 -0
- package/dist/tools/sdk/templates/nextjs.d.ts +5 -0
- package/dist/tools/sdk/templates/nextjs.d.ts.map +1 -0
- package/dist/tools/sdk/templates/nextjs.js +71 -0
- package/dist/tools/sdk/templates/nextjs.js.map +1 -0
- package/dist/tools/sdk/templates/node.d.ts +9 -0
- package/dist/tools/sdk/templates/node.d.ts.map +1 -0
- package/dist/tools/sdk/templates/node.js +170 -0
- package/dist/tools/sdk/templates/node.js.map +1 -0
- package/dist/tools/sdk/templates/react.d.ts +5 -0
- package/dist/tools/sdk/templates/react.d.ts.map +1 -0
- package/dist/tools/sdk/templates/react.js +54 -0
- package/dist/tools/sdk/templates/react.js.map +1 -0
- package/dist/tools/sdk/templates/vanilla.d.ts +5 -0
- package/dist/tools/sdk/templates/vanilla.d.ts.map +1 -0
- package/dist/tools/sdk/templates/vanilla.js +61 -0
- package/dist/tools/sdk/templates/vanilla.js.map +1 -0
- package/dist/tools/templates/create.d.ts +11 -0
- package/dist/tools/templates/create.d.ts.map +1 -0
- package/dist/tools/templates/create.js +39 -0
- package/dist/tools/templates/create.js.map +1 -0
- package/dist/tools/templates/index.d.ts +17 -0
- package/dist/tools/templates/index.d.ts.map +1 -0
- package/dist/tools/templates/index.js +68 -0
- package/dist/tools/templates/index.js.map +1 -0
- package/dist/tools/templates/list.d.ts +11 -0
- package/dist/tools/templates/list.d.ts.map +1 -0
- package/dist/tools/templates/list.js +31 -0
- package/dist/tools/templates/list.js.map +1 -0
- package/dist/tools/templates/schemas.d.ts +90 -0
- package/dist/tools/templates/schemas.d.ts.map +1 -0
- package/dist/tools/templates/schemas.js +37 -0
- package/dist/tools/templates/schemas.js.map +1 -0
- package/dist/types.d.ts +55 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +76 -0
package/README.md
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# @kelpi/mcp
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for Kelpi customer engagement automation. This package enables AI assistants like Claude to interact with the Kelpi API for managing email templates, automation flows, contacts, and events.
|
|
4
|
+
|
|
5
|
+
## What is Kelpi MCP Server?
|
|
6
|
+
|
|
7
|
+
The Kelpi MCP Server provides a standardized interface for AI assistants to:
|
|
8
|
+
|
|
9
|
+
- Authenticate with your Kelpi workspace
|
|
10
|
+
- Create and manage email templates
|
|
11
|
+
- Build and activate automation flows
|
|
12
|
+
- Create contacts and track events
|
|
13
|
+
- Generate SDK integration snippets
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
### Using npx (Recommended)
|
|
18
|
+
|
|
19
|
+
No installation required. Configure Claude Desktop to use npx:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"kelpi": {
|
|
25
|
+
"command": "npx",
|
|
26
|
+
"args": ["@kelpi/mcp"]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Global Installation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install -g @kelpi/mcp
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Then configure Claude Desktop:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"mcpServers": {
|
|
43
|
+
"kelpi": {
|
|
44
|
+
"command": "kelpi-mcp"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Claude Desktop Configuration
|
|
51
|
+
|
|
52
|
+
1. Open Claude Desktop settings
|
|
53
|
+
2. Navigate to the MCP Servers section
|
|
54
|
+
3. Add the following configuration to your `claude_desktop_config.json`:
|
|
55
|
+
|
|
56
|
+
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
57
|
+
|
|
58
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"kelpi": {
|
|
64
|
+
"command": "npx",
|
|
65
|
+
"args": ["@kelpi/mcp"]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
4. Restart Claude Desktop
|
|
72
|
+
5. The Kelpi tools will now be available in your conversations
|
|
73
|
+
|
|
74
|
+
## Available Tools
|
|
75
|
+
|
|
76
|
+
### Authentication
|
|
77
|
+
|
|
78
|
+
#### `kelpi_login`
|
|
79
|
+
Authenticate with your Kelpi workspace using device code flow.
|
|
80
|
+
|
|
81
|
+
**Usage:** Just ask Claude to "log in to Kelpi" or "authenticate with Kelpi"
|
|
82
|
+
|
|
83
|
+
#### `kelpi_status`
|
|
84
|
+
Check current authentication status and workspace information.
|
|
85
|
+
|
|
86
|
+
**Returns:**
|
|
87
|
+
- `authenticated`: Whether you're logged in
|
|
88
|
+
- `workspace_id`: Your workspace ID
|
|
89
|
+
- `workspace_name`: Your workspace name
|
|
90
|
+
- `key_type`: API key type (public/secret)
|
|
91
|
+
|
|
92
|
+
### Templates
|
|
93
|
+
|
|
94
|
+
#### `kelpi_create_template`
|
|
95
|
+
Create a new email template.
|
|
96
|
+
|
|
97
|
+
**Parameters:**
|
|
98
|
+
| Name | Type | Required | Description |
|
|
99
|
+
|------|------|----------|-------------|
|
|
100
|
+
| `slug` | string | Yes | URL-friendly identifier (lowercase, hyphens) |
|
|
101
|
+
| `name` | string | Yes | Display name for the template |
|
|
102
|
+
| `subject` | string | Yes | Email subject line |
|
|
103
|
+
| `body_html` | string | Yes | HTML content of the email |
|
|
104
|
+
| `variables` | array | No | Template variables with defaults |
|
|
105
|
+
|
|
106
|
+
**Example:**
|
|
107
|
+
```
|
|
108
|
+
Create an email template called "welcome-email" with subject "Welcome to Our Service!" and body with a greeting for {{name}}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### `kelpi_list_templates`
|
|
112
|
+
List all templates in your workspace.
|
|
113
|
+
|
|
114
|
+
**Parameters:**
|
|
115
|
+
| Name | Type | Required | Description |
|
|
116
|
+
|------|------|----------|-------------|
|
|
117
|
+
| `limit` | number | No | Maximum templates to return (1-100) |
|
|
118
|
+
| `offset` | number | No | Number of templates to skip |
|
|
119
|
+
|
|
120
|
+
### Flows
|
|
121
|
+
|
|
122
|
+
#### `kelpi_create_flow`
|
|
123
|
+
Create a new automation flow.
|
|
124
|
+
|
|
125
|
+
**Parameters:**
|
|
126
|
+
| Name | Type | Required | Description |
|
|
127
|
+
|------|------|----------|-------------|
|
|
128
|
+
| `definition` | object | Yes | Flow definition object |
|
|
129
|
+
| `definition.name` | string | Yes | Flow name |
|
|
130
|
+
| `definition.trigger_type` | string | Yes | "event", "segment", or "manual" |
|
|
131
|
+
| `definition.trigger_event` | string | Conditional | Required if trigger_type is "event" |
|
|
132
|
+
| `definition.steps` | array | No | Flow steps (delays, emails, conditions) |
|
|
133
|
+
|
|
134
|
+
**Example:**
|
|
135
|
+
```
|
|
136
|
+
Create a welcome flow that triggers on user.signup event and sends a welcome email after 1 hour
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
#### `kelpi_list_flows`
|
|
140
|
+
List all flows in your workspace.
|
|
141
|
+
|
|
142
|
+
**Parameters:**
|
|
143
|
+
| Name | Type | Required | Description |
|
|
144
|
+
|------|------|----------|-------------|
|
|
145
|
+
| `status` | string | No | Filter by status: "draft", "active", "archived" |
|
|
146
|
+
| `limit` | number | No | Maximum flows to return (1-100) |
|
|
147
|
+
| `offset` | number | No | Number of flows to skip |
|
|
148
|
+
|
|
149
|
+
#### `kelpi_activate_flow`
|
|
150
|
+
Activate an inactive flow.
|
|
151
|
+
|
|
152
|
+
**Parameters:**
|
|
153
|
+
| Name | Type | Required | Description |
|
|
154
|
+
|------|------|----------|-------------|
|
|
155
|
+
| `flow_id` | string | Yes | UUID of the flow to activate |
|
|
156
|
+
|
|
157
|
+
### Contacts
|
|
158
|
+
|
|
159
|
+
#### `kelpi_create_contact`
|
|
160
|
+
Create a new contact.
|
|
161
|
+
|
|
162
|
+
**Parameters:**
|
|
163
|
+
| Name | Type | Required | Description |
|
|
164
|
+
|------|------|----------|-------------|
|
|
165
|
+
| `email` | string | Yes | Contact's email address |
|
|
166
|
+
| `name` | string | No | Contact's name |
|
|
167
|
+
| `properties` | object | No | Custom properties |
|
|
168
|
+
|
|
169
|
+
### Events
|
|
170
|
+
|
|
171
|
+
#### `kelpi_track_event`
|
|
172
|
+
Track a custom event for a contact.
|
|
173
|
+
|
|
174
|
+
**Parameters:**
|
|
175
|
+
| Name | Type | Required | Description |
|
|
176
|
+
|------|------|----------|-------------|
|
|
177
|
+
| `email` | string | Yes | Contact's email address |
|
|
178
|
+
| `event_name` | string | Yes | Name of the event |
|
|
179
|
+
| `properties` | object | No | Event properties |
|
|
180
|
+
|
|
181
|
+
**Example:**
|
|
182
|
+
```
|
|
183
|
+
Track a "purchase_completed" event for user@example.com with product_id "prod_123"
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### SDK Integration
|
|
187
|
+
|
|
188
|
+
#### `kelpi_get_public_key`
|
|
189
|
+
Get or create a public API key for client-side SDK usage.
|
|
190
|
+
|
|
191
|
+
**Returns:** API key object with the public key for SDK initialization
|
|
192
|
+
|
|
193
|
+
#### `kelpi_get_sdk_snippet`
|
|
194
|
+
Generate SDK integration code for your application.
|
|
195
|
+
|
|
196
|
+
**Parameters:**
|
|
197
|
+
| Name | Type | Required | Description |
|
|
198
|
+
|------|------|----------|-------------|
|
|
199
|
+
| `framework` | string | Yes | "react", "nextjs", "vanilla", "node", or "express" |
|
|
200
|
+
|
|
201
|
+
**Example:**
|
|
202
|
+
```
|
|
203
|
+
Generate a React SDK snippet for Kelpi integration
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Example Workflows
|
|
207
|
+
|
|
208
|
+
### Onboarding Flow Setup
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
1. "Log in to Kelpi"
|
|
212
|
+
2. "Create a welcome email template with subject 'Welcome!' and personalized greeting"
|
|
213
|
+
3. "Create a flow that triggers on user.signup and sends the welcome email after 30 minutes"
|
|
214
|
+
4. "Activate the welcome flow"
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### SDK Integration
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
1. "Get my Kelpi public key"
|
|
221
|
+
2. "Generate a React SDK snippet"
|
|
222
|
+
3. "Create a test contact with email test@example.com"
|
|
223
|
+
4. "Track a signup event for test@example.com"
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Error Handling
|
|
227
|
+
|
|
228
|
+
The Kelpi MCP Server provides user-friendly error messages with actionable hints:
|
|
229
|
+
|
|
230
|
+
| Error | Hint |
|
|
231
|
+
|-------|------|
|
|
232
|
+
| "Authentication required" | Run kelpi_login first to authenticate |
|
|
233
|
+
| "API key is invalid or expired" | Run kelpi_login to get a new API key |
|
|
234
|
+
| "Resource not found" | Check that the ID is correct |
|
|
235
|
+
| "Resource already exists" | Use a different identifier or update the existing resource |
|
|
236
|
+
| "Validation error" | Fix the validation errors and try again |
|
|
237
|
+
|
|
238
|
+
## Development
|
|
239
|
+
|
|
240
|
+
### Setup
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Clone the repository
|
|
244
|
+
git clone https://github.com/kelpi-ai/kelpi.git
|
|
245
|
+
cd kelpi/packages/mcp
|
|
246
|
+
|
|
247
|
+
# Install dependencies
|
|
248
|
+
pnpm install
|
|
249
|
+
|
|
250
|
+
# Build
|
|
251
|
+
pnpm build
|
|
252
|
+
|
|
253
|
+
# Run tests
|
|
254
|
+
pnpm test
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Testing
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Run all tests
|
|
261
|
+
pnpm test
|
|
262
|
+
|
|
263
|
+
# Run tests in watch mode
|
|
264
|
+
pnpm test:watch
|
|
265
|
+
|
|
266
|
+
# Run tests with coverage
|
|
267
|
+
pnpm test:coverage
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Project Structure
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
packages/mcp/
|
|
274
|
+
src/
|
|
275
|
+
lib/
|
|
276
|
+
api-client.ts # HTTP client with retry logic
|
|
277
|
+
config.ts # Configuration management
|
|
278
|
+
errors.ts # Custom error classes
|
|
279
|
+
error-formatter.ts # User-friendly error formatting
|
|
280
|
+
tool-registry.ts # MCP tool registration
|
|
281
|
+
tools/
|
|
282
|
+
auth/ # Login and status tools
|
|
283
|
+
flows/ # Flow management tools
|
|
284
|
+
templates/ # Template management tools
|
|
285
|
+
contacts/ # Contact management tools
|
|
286
|
+
events/ # Event tracking tools
|
|
287
|
+
sdk/ # SDK integration tools
|
|
288
|
+
server.ts # MCP server implementation
|
|
289
|
+
index.ts # Package entry point
|
|
290
|
+
__tests__/
|
|
291
|
+
unit/ # Unit tests
|
|
292
|
+
integration/ # Integration tests
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
## Contributing
|
|
296
|
+
|
|
297
|
+
1. Fork the repository
|
|
298
|
+
2. Create a feature branch
|
|
299
|
+
3. Write tests first (TDD)
|
|
300
|
+
4. Implement your feature
|
|
301
|
+
5. Ensure all tests pass
|
|
302
|
+
6. Submit a pull request
|
|
303
|
+
|
|
304
|
+
## License
|
|
305
|
+
|
|
306
|
+
MIT
|
|
307
|
+
|
|
308
|
+
## Support
|
|
309
|
+
|
|
310
|
+
- [Documentation](https://docs.kelpi.io)
|
|
311
|
+
- [GitHub Issues](https://github.com/kelpi-ai/kelpi/issues)
|
|
312
|
+
- [Discord Community](https://discord.gg/kelpi)
|
package/bin/kelpi-mcp
ADDED
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test data factories for MCP integration tests.
|
|
3
|
+
*
|
|
4
|
+
* Provides utilities for creating test contacts, templates, flows, and events.
|
|
5
|
+
* All factories use unique IDs (Date.now() or crypto.randomUUID()) for test isolation.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Generate a unique ID with optional prefix.
|
|
9
|
+
* Uses timestamp + random suffix for uniqueness across test runs.
|
|
10
|
+
*/
|
|
11
|
+
export declare function uniqueId(prefix?: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Generate a unique slug-safe ID.
|
|
14
|
+
* Lowercase, hyphen-separated for use in template slugs etc.
|
|
15
|
+
*/
|
|
16
|
+
export declare function uniqueSlug(prefix?: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Generate a unique email address.
|
|
19
|
+
*/
|
|
20
|
+
export declare function uniqueEmail(prefix?: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Contact data shape matching the API response
|
|
23
|
+
*/
|
|
24
|
+
export interface ContactData {
|
|
25
|
+
id: string;
|
|
26
|
+
workspace_id: string;
|
|
27
|
+
email?: string;
|
|
28
|
+
external_id?: string;
|
|
29
|
+
properties?: Record<string, unknown>;
|
|
30
|
+
created_at: string;
|
|
31
|
+
updated_at: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Options for creating a test contact
|
|
35
|
+
*/
|
|
36
|
+
export interface CreateContactOptions {
|
|
37
|
+
email?: string;
|
|
38
|
+
external_id?: string;
|
|
39
|
+
properties?: Record<string, unknown>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create a test contact directly in the database.
|
|
43
|
+
* Use this for setting up test preconditions.
|
|
44
|
+
*
|
|
45
|
+
* @param workspaceId - Workspace to create contact in
|
|
46
|
+
* @param options - Contact properties
|
|
47
|
+
* @returns Created contact
|
|
48
|
+
*/
|
|
49
|
+
export declare function createTestContact(workspaceId: string, options?: CreateContactOptions): Promise<ContactData>;
|
|
50
|
+
/**
|
|
51
|
+
* Build contact input for API requests.
|
|
52
|
+
* Does not create the contact, just returns the request body.
|
|
53
|
+
*
|
|
54
|
+
* @param options - Contact options
|
|
55
|
+
* @returns API request body
|
|
56
|
+
*/
|
|
57
|
+
export declare function buildContactInput(options?: CreateContactOptions): CreateContactOptions;
|
|
58
|
+
/**
|
|
59
|
+
* Get a contact by ID from the database.
|
|
60
|
+
*
|
|
61
|
+
* @param workspaceId - Workspace ID
|
|
62
|
+
* @param contactId - Contact ID
|
|
63
|
+
* @returns Contact or null
|
|
64
|
+
*/
|
|
65
|
+
export declare function getContactById(workspaceId: string, contactId: string): Promise<ContactData | null>;
|
|
66
|
+
/**
|
|
67
|
+
* Get all contacts in a workspace.
|
|
68
|
+
*
|
|
69
|
+
* @param workspaceId - Workspace ID
|
|
70
|
+
* @returns Array of contacts
|
|
71
|
+
*/
|
|
72
|
+
export declare function getContactsInWorkspace(workspaceId: string): Promise<ContactData[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Template data shape matching the API response
|
|
75
|
+
* Note: API uses 'default' (not 'default_value') for variable defaults
|
|
76
|
+
*/
|
|
77
|
+
export interface TemplateData {
|
|
78
|
+
id: string;
|
|
79
|
+
workspace_id: string;
|
|
80
|
+
slug: string;
|
|
81
|
+
name: string;
|
|
82
|
+
subject: string;
|
|
83
|
+
body_html: string;
|
|
84
|
+
body_text?: string;
|
|
85
|
+
variables?: Array<{
|
|
86
|
+
name: string;
|
|
87
|
+
default?: string;
|
|
88
|
+
required?: boolean;
|
|
89
|
+
}>;
|
|
90
|
+
created_at: string;
|
|
91
|
+
updated_at: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Options for creating a test template
|
|
95
|
+
* Note: API uses 'default' (not 'default_value') for variable defaults
|
|
96
|
+
*/
|
|
97
|
+
export interface CreateTemplateOptions {
|
|
98
|
+
slug?: string;
|
|
99
|
+
name?: string;
|
|
100
|
+
subject?: string;
|
|
101
|
+
body_html?: string;
|
|
102
|
+
body_text?: string;
|
|
103
|
+
variables?: Array<{
|
|
104
|
+
name: string;
|
|
105
|
+
default?: string;
|
|
106
|
+
required?: boolean;
|
|
107
|
+
}>;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Create a test template directly in the database.
|
|
111
|
+
* Use this for setting up test preconditions.
|
|
112
|
+
*
|
|
113
|
+
* @param workspaceId - Workspace to create template in
|
|
114
|
+
* @param options - Template properties
|
|
115
|
+
* @returns Created template
|
|
116
|
+
*/
|
|
117
|
+
export declare function createTestTemplate(workspaceId: string, options?: CreateTemplateOptions): Promise<TemplateData>;
|
|
118
|
+
/**
|
|
119
|
+
* Build template input for API requests.
|
|
120
|
+
* Does not create the template, just returns the request body.
|
|
121
|
+
*
|
|
122
|
+
* @param options - Template options
|
|
123
|
+
* @returns API request body
|
|
124
|
+
*/
|
|
125
|
+
export declare function buildTemplateInput(options?: CreateTemplateOptions): {
|
|
126
|
+
slug: string;
|
|
127
|
+
name: string;
|
|
128
|
+
subject: string;
|
|
129
|
+
body_html: string;
|
|
130
|
+
variables?: Array<{
|
|
131
|
+
name: string;
|
|
132
|
+
default?: string;
|
|
133
|
+
required?: boolean;
|
|
134
|
+
}>;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Get a template by ID from the database.
|
|
138
|
+
*
|
|
139
|
+
* @param workspaceId - Workspace ID
|
|
140
|
+
* @param templateId - Template ID
|
|
141
|
+
* @returns Template or null
|
|
142
|
+
*/
|
|
143
|
+
export declare function getTemplateById(workspaceId: string, templateId: string): Promise<TemplateData | null>;
|
|
144
|
+
/**
|
|
145
|
+
* Get a template by slug from the database.
|
|
146
|
+
*
|
|
147
|
+
* @param workspaceId - Workspace ID
|
|
148
|
+
* @param slug - Template slug
|
|
149
|
+
* @returns Template or null
|
|
150
|
+
*/
|
|
151
|
+
export declare function getTemplateBySlug(workspaceId: string, slug: string): Promise<TemplateData | null>;
|
|
152
|
+
/**
|
|
153
|
+
* Get all templates in a workspace.
|
|
154
|
+
*
|
|
155
|
+
* @param workspaceId - Workspace ID
|
|
156
|
+
* @returns Array of templates
|
|
157
|
+
*/
|
|
158
|
+
export declare function getTemplatesInWorkspace(workspaceId: string): Promise<TemplateData[]>;
|
|
159
|
+
/**
|
|
160
|
+
* Flow status type
|
|
161
|
+
*/
|
|
162
|
+
export type FlowStatus = 'draft' | 'active' | 'archived';
|
|
163
|
+
/**
|
|
164
|
+
* Flow trigger type
|
|
165
|
+
* Note: API only supports 'event' and 'segment', NOT 'manual'
|
|
166
|
+
*/
|
|
167
|
+
export type FlowTriggerType = 'event' | 'segment';
|
|
168
|
+
/**
|
|
169
|
+
* Flow step action type
|
|
170
|
+
*/
|
|
171
|
+
export type FlowStepActionType = 'delay' | 'email' | 'condition' | 'webhook';
|
|
172
|
+
/**
|
|
173
|
+
* Flow step data
|
|
174
|
+
*/
|
|
175
|
+
export interface FlowStepData {
|
|
176
|
+
id: string;
|
|
177
|
+
flow_id: string;
|
|
178
|
+
step_order: number;
|
|
179
|
+
action_type: FlowStepActionType;
|
|
180
|
+
delay_seconds?: number;
|
|
181
|
+
template_id?: string;
|
|
182
|
+
condition_filter?: Record<string, unknown>;
|
|
183
|
+
created_at: string;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Flow data shape matching the API response
|
|
187
|
+
*/
|
|
188
|
+
export interface FlowData {
|
|
189
|
+
id: string;
|
|
190
|
+
workspace_id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
slug: string;
|
|
193
|
+
trigger_type: FlowTriggerType;
|
|
194
|
+
trigger_event?: string;
|
|
195
|
+
entry_filter?: Record<string, unknown>;
|
|
196
|
+
status: FlowStatus;
|
|
197
|
+
created_at: string;
|
|
198
|
+
updated_at: string;
|
|
199
|
+
activated_at?: string;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Options for creating a test flow
|
|
203
|
+
*/
|
|
204
|
+
export interface CreateFlowOptions {
|
|
205
|
+
name?: string;
|
|
206
|
+
trigger_type?: FlowTriggerType;
|
|
207
|
+
trigger_event?: string;
|
|
208
|
+
entry_filter?: {
|
|
209
|
+
logic: 'AND' | 'OR';
|
|
210
|
+
conditions: unknown[];
|
|
211
|
+
};
|
|
212
|
+
status?: FlowStatus;
|
|
213
|
+
steps?: Array<{
|
|
214
|
+
step_id?: string;
|
|
215
|
+
step_order: number;
|
|
216
|
+
action_type: FlowStepActionType;
|
|
217
|
+
delay_seconds?: number;
|
|
218
|
+
template_id?: string;
|
|
219
|
+
condition_filter?: {
|
|
220
|
+
logic: 'AND' | 'OR';
|
|
221
|
+
conditions: unknown[];
|
|
222
|
+
};
|
|
223
|
+
}>;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Create a test flow directly in the database.
|
|
227
|
+
* Use this for setting up test preconditions.
|
|
228
|
+
*
|
|
229
|
+
* @param workspaceId - Workspace to create flow in
|
|
230
|
+
* @param options - Flow properties
|
|
231
|
+
* @returns Created flow
|
|
232
|
+
*/
|
|
233
|
+
export declare function createTestFlow(workspaceId: string, options?: CreateFlowOptions): Promise<FlowData>;
|
|
234
|
+
/**
|
|
235
|
+
* Build flow definition input for API requests.
|
|
236
|
+
* Does not create the flow, just returns the request body.
|
|
237
|
+
*
|
|
238
|
+
* @param options - Flow options
|
|
239
|
+
* @returns API request body for flow definition
|
|
240
|
+
*/
|
|
241
|
+
export declare function buildFlowDefinition(options?: CreateFlowOptions): {
|
|
242
|
+
name: string;
|
|
243
|
+
trigger_type: FlowTriggerType;
|
|
244
|
+
trigger_event?: string;
|
|
245
|
+
entry_filter?: {
|
|
246
|
+
logic: 'AND' | 'OR';
|
|
247
|
+
conditions: unknown[];
|
|
248
|
+
};
|
|
249
|
+
steps?: Array<{
|
|
250
|
+
step_id: string;
|
|
251
|
+
step_order: number;
|
|
252
|
+
action_type: FlowStepActionType;
|
|
253
|
+
delay_seconds?: number;
|
|
254
|
+
template_id?: string;
|
|
255
|
+
condition_filter?: {
|
|
256
|
+
logic: 'AND' | 'OR';
|
|
257
|
+
conditions: unknown[];
|
|
258
|
+
};
|
|
259
|
+
}>;
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* Get a flow by ID from the database.
|
|
263
|
+
*
|
|
264
|
+
* @param workspaceId - Workspace ID
|
|
265
|
+
* @param flowId - Flow ID
|
|
266
|
+
* @returns Flow or null
|
|
267
|
+
*/
|
|
268
|
+
export declare function getFlowById(workspaceId: string, flowId: string): Promise<FlowData | null>;
|
|
269
|
+
/**
|
|
270
|
+
* Get flow steps for a flow.
|
|
271
|
+
*
|
|
272
|
+
* @param flowId - Flow ID
|
|
273
|
+
* @returns Array of flow steps
|
|
274
|
+
*/
|
|
275
|
+
export declare function getFlowSteps(flowId: string): Promise<FlowStepData[]>;
|
|
276
|
+
/**
|
|
277
|
+
* Get all flows in a workspace.
|
|
278
|
+
*
|
|
279
|
+
* @param workspaceId - Workspace ID
|
|
280
|
+
* @param status - Optional status filter
|
|
281
|
+
* @returns Array of flows
|
|
282
|
+
*/
|
|
283
|
+
export declare function getFlowsInWorkspace(workspaceId: string, status?: FlowStatus): Promise<FlowData[]>;
|
|
284
|
+
/**
|
|
285
|
+
* Event data shape matching the database schema
|
|
286
|
+
* Note: Database uses 'event_type', API schemas use 'event.name'
|
|
287
|
+
*/
|
|
288
|
+
export interface EventData {
|
|
289
|
+
id: string;
|
|
290
|
+
workspace_id: string;
|
|
291
|
+
contact_id: string;
|
|
292
|
+
event_type: string;
|
|
293
|
+
properties?: Record<string, unknown>;
|
|
294
|
+
timestamp: string;
|
|
295
|
+
created_at: string;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Options for creating a test event
|
|
299
|
+
*/
|
|
300
|
+
export interface CreateEventOptions {
|
|
301
|
+
event_type?: string;
|
|
302
|
+
properties?: Record<string, unknown>;
|
|
303
|
+
timestamp?: string;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Create a test event directly in the database.
|
|
307
|
+
* Requires an existing contact.
|
|
308
|
+
*
|
|
309
|
+
* @param workspaceId - Workspace ID
|
|
310
|
+
* @param contactId - Contact ID for the event
|
|
311
|
+
* @param options - Event properties
|
|
312
|
+
* @returns Created event
|
|
313
|
+
*/
|
|
314
|
+
export declare function createTestEvent(workspaceId: string, contactId: string, options?: CreateEventOptions): Promise<EventData>;
|
|
315
|
+
/**
|
|
316
|
+
* Build event input for API track requests.
|
|
317
|
+
* Does not create the event, just returns the request body.
|
|
318
|
+
*
|
|
319
|
+
* Note: API uses nested format:
|
|
320
|
+
* {
|
|
321
|
+
* contact: { user_id, email? },
|
|
322
|
+
* event: { name, properties? }
|
|
323
|
+
* }
|
|
324
|
+
*
|
|
325
|
+
* @param contactIdentifier - Email or user_id for the contact
|
|
326
|
+
* @param options - Event options
|
|
327
|
+
* @returns API request body
|
|
328
|
+
*/
|
|
329
|
+
export declare function buildEventInput(contactIdentifier: {
|
|
330
|
+
email?: string;
|
|
331
|
+
user_id?: string;
|
|
332
|
+
}, options?: CreateEventOptions): {
|
|
333
|
+
contact: {
|
|
334
|
+
user_id?: string;
|
|
335
|
+
email?: string;
|
|
336
|
+
};
|
|
337
|
+
event: {
|
|
338
|
+
name: string;
|
|
339
|
+
properties?: Record<string, unknown>;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
/**
|
|
343
|
+
* Get events for a contact.
|
|
344
|
+
*
|
|
345
|
+
* @param contactId - Contact ID
|
|
346
|
+
* @returns Array of events
|
|
347
|
+
*/
|
|
348
|
+
export declare function getEventsForContact(contactId: string): Promise<EventData[]>;
|
|
349
|
+
/**
|
|
350
|
+
* Get all events in a workspace.
|
|
351
|
+
*
|
|
352
|
+
* @param workspaceId - Workspace ID
|
|
353
|
+
* @returns Array of events
|
|
354
|
+
*/
|
|
355
|
+
export declare function getEventsInWorkspace(workspaceId: string): Promise<EventData[]>;
|
|
356
|
+
/**
|
|
357
|
+
* Create a complete flow with template for testing email automation.
|
|
358
|
+
*
|
|
359
|
+
* @param workspaceId - Workspace ID
|
|
360
|
+
* @param options - Optional overrides
|
|
361
|
+
* @returns Created flow and template
|
|
362
|
+
*/
|
|
363
|
+
export declare function createFlowWithTemplate(workspaceId: string, options?: {
|
|
364
|
+
flowName?: string;
|
|
365
|
+
triggerEvent?: string;
|
|
366
|
+
templateSlug?: string;
|
|
367
|
+
}): Promise<{
|
|
368
|
+
flow: FlowData;
|
|
369
|
+
template: TemplateData;
|
|
370
|
+
}>;
|
|
371
|
+
/**
|
|
372
|
+
* Create a contact with events for testing event-based workflows.
|
|
373
|
+
*
|
|
374
|
+
* @param workspaceId - Workspace ID
|
|
375
|
+
* @param eventTypes - Array of event type names to create
|
|
376
|
+
* @returns Created contact and events
|
|
377
|
+
*/
|
|
378
|
+
export declare function createContactWithEvents(workspaceId: string, eventTypes?: string[]): Promise<{
|
|
379
|
+
contact: ContactData;
|
|
380
|
+
events: EventData[];
|
|
381
|
+
}>;
|
|
382
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/__tests__/integration-api/fixtures.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,MAAM,SAAK,GAAG,MAAM,CAI5C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,SAAS,GAAG,MAAM,CAIlD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,SAAS,GAAG,MAAM,CAEnD;AAMD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,WAAW,CAAC,CAkBtB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,O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