@bentonow/bento-mcp 1.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/LICENSE +21 -0
- package/README.md +208 -0
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +808 -0
- package/build/index.js.map +1 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Bento
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Bento MCP Server
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server for [Bento](https://bentonow.com) - the email marketing and analytics platform. This server enables AI assistants like Claude, Cursor, and others to interact with your Bento account.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Subscriber Management** - Create, lookup, and update subscribers
|
|
8
|
+
- **Tagging** - Add and remove tags from subscribers
|
|
9
|
+
- **Event Tracking** - Track custom events and purchases
|
|
10
|
+
- **Field Management** - Manage custom subscriber fields
|
|
11
|
+
- **Email Sending** - Send transactional emails
|
|
12
|
+
- **Broadcasts** - Create and list email campaigns
|
|
13
|
+
- **Statistics** - Get site, segment, and report stats
|
|
14
|
+
- **Experimental** - Email validation, gender guessing, geolocation, and more
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g @bentonow/bento-mcp
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or run directly with npx:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @bentonow/bento-mcp
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Configuration
|
|
29
|
+
|
|
30
|
+
The server requires three environment variables:
|
|
31
|
+
|
|
32
|
+
| Variable | Description |
|
|
33
|
+
|----------|-------------|
|
|
34
|
+
| `BENTO_PUBLISHABLE_KEY` | Your Bento publishable API key |
|
|
35
|
+
| `BENTO_SECRET_KEY` | Your Bento secret API key |
|
|
36
|
+
| `BENTO_SITE_UUID` | Your Bento site UUID |
|
|
37
|
+
|
|
38
|
+
You can find these in your [Bento account settings](https://app.bentonow.com).
|
|
39
|
+
|
|
40
|
+
## Usage with Claude Desktop
|
|
41
|
+
|
|
42
|
+
Add to your Claude Desktop configuration file:
|
|
43
|
+
|
|
44
|
+
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
45
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"bento": {
|
|
51
|
+
"command": "npx",
|
|
52
|
+
"args": ["-y", "@bentonow/bento-mcp"],
|
|
53
|
+
"env": {
|
|
54
|
+
"BENTO_PUBLISHABLE_KEY": "your-publishable-key",
|
|
55
|
+
"BENTO_SECRET_KEY": "your-secret-key",
|
|
56
|
+
"BENTO_SITE_UUID": "your-site-uuid"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Usage with OpenCode
|
|
64
|
+
|
|
65
|
+
Add to your `opencode.json`:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mcp": {
|
|
70
|
+
"bento": {
|
|
71
|
+
"type": "local",
|
|
72
|
+
"command": ["npx", "-y", "@bentonow/bento-mcp"],
|
|
73
|
+
"environment": {
|
|
74
|
+
"BENTO_PUBLISHABLE_KEY": "your-publishable-key",
|
|
75
|
+
"BENTO_SECRET_KEY": "your-secret-key",
|
|
76
|
+
"BENTO_SITE_UUID": "your-site-uuid"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Usage with Cursor
|
|
84
|
+
|
|
85
|
+
Add to your Cursor MCP settings:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"mcpServers": {
|
|
90
|
+
"bento": {
|
|
91
|
+
"command": "npx",
|
|
92
|
+
"args": ["-y", "@bentonow/bento-mcp"],
|
|
93
|
+
"env": {
|
|
94
|
+
"BENTO_PUBLISHABLE_KEY": "your-publishable-key",
|
|
95
|
+
"BENTO_SECRET_KEY": "your-secret-key",
|
|
96
|
+
"BENTO_SITE_UUID": "your-site-uuid"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Available Tools
|
|
104
|
+
|
|
105
|
+
### Subscriber Management
|
|
106
|
+
|
|
107
|
+
| Tool | Description |
|
|
108
|
+
|------|-------------|
|
|
109
|
+
| `bento_get_subscriber` | Look up a subscriber by email or UUID |
|
|
110
|
+
| `bento_create_subscriber` | Create a new subscriber |
|
|
111
|
+
| `bento_upsert_subscriber` | Create or update subscriber with fields and tags |
|
|
112
|
+
| `bento_add_subscriber` | Subscribe a user (triggers automations) |
|
|
113
|
+
| `bento_remove_subscriber` | Unsubscribe a user |
|
|
114
|
+
|
|
115
|
+
### Tagging
|
|
116
|
+
|
|
117
|
+
| Tool | Description |
|
|
118
|
+
|------|-------------|
|
|
119
|
+
| `bento_tag_subscriber` | Add a tag to a subscriber (triggers automations) |
|
|
120
|
+
| `bento_remove_tag` | Remove a tag from a subscriber |
|
|
121
|
+
| `bento_list_tags` | List all tags in your account |
|
|
122
|
+
| `bento_create_tag` | Create a new tag |
|
|
123
|
+
|
|
124
|
+
### Event Tracking
|
|
125
|
+
|
|
126
|
+
| Tool | Description |
|
|
127
|
+
|------|-------------|
|
|
128
|
+
| `bento_track_event` | Track a custom event |
|
|
129
|
+
| `bento_track_purchase` | Track a purchase (for LTV calculations) |
|
|
130
|
+
|
|
131
|
+
### Field Management
|
|
132
|
+
|
|
133
|
+
| Tool | Description |
|
|
134
|
+
|------|-------------|
|
|
135
|
+
| `bento_update_fields` | Update custom fields on a subscriber |
|
|
136
|
+
| `bento_list_fields` | List all custom fields |
|
|
137
|
+
| `bento_create_field` | Create a new custom field |
|
|
138
|
+
|
|
139
|
+
### Email & Broadcasts
|
|
140
|
+
|
|
141
|
+
| Tool | Description |
|
|
142
|
+
|------|-------------|
|
|
143
|
+
| `bento_send_email` | Send a transactional email |
|
|
144
|
+
| `bento_list_broadcasts` | List all broadcasts/campaigns |
|
|
145
|
+
| `bento_create_broadcast` | Create a new broadcast |
|
|
146
|
+
| `bento_batch_import_subscribers` | Bulk import subscribers (up to 1000) |
|
|
147
|
+
|
|
148
|
+
### Statistics
|
|
149
|
+
|
|
150
|
+
| Tool | Description |
|
|
151
|
+
|------|-------------|
|
|
152
|
+
| `bento_get_site_stats` | Get overall site statistics |
|
|
153
|
+
| `bento_get_segment_stats` | Get statistics for a segment |
|
|
154
|
+
| `bento_get_report_stats` | Get statistics for a broadcast/report |
|
|
155
|
+
|
|
156
|
+
### Experimental
|
|
157
|
+
|
|
158
|
+
| Tool | Description |
|
|
159
|
+
|------|-------------|
|
|
160
|
+
| `bento_validate_email` | Validate an email address |
|
|
161
|
+
| `bento_guess_gender` | Guess gender from a first name |
|
|
162
|
+
| `bento_geolocate_ip` | Get location data for an IP address |
|
|
163
|
+
| `bento_check_blacklist` | Check if domain/IP is blacklisted |
|
|
164
|
+
| `bento_moderate_content` | AI content moderation |
|
|
165
|
+
|
|
166
|
+
### Forms
|
|
167
|
+
|
|
168
|
+
| Tool | Description |
|
|
169
|
+
|------|-------------|
|
|
170
|
+
| `bento_get_form_responses` | Get responses for a Bento form |
|
|
171
|
+
|
|
172
|
+
## Example Prompts
|
|
173
|
+
|
|
174
|
+
Once configured, you can ask your AI assistant things like:
|
|
175
|
+
|
|
176
|
+
- "Look up the subscriber john@example.com in Bento"
|
|
177
|
+
- "Add the tag 'premium-user' to jane@example.com"
|
|
178
|
+
- "Track a purchase of $99.99 for order #12345 for customer@example.com"
|
|
179
|
+
- "Show me the site statistics from Bento"
|
|
180
|
+
- "Create a new broadcast email for users tagged as 'newsletter'"
|
|
181
|
+
- "What are all the tags in my Bento account?"
|
|
182
|
+
|
|
183
|
+
## Development
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# Clone the repository
|
|
187
|
+
git clone https://github.com/bentonow/bento-mcp.git
|
|
188
|
+
cd bento-mcp
|
|
189
|
+
|
|
190
|
+
# Install dependencies
|
|
191
|
+
npm install
|
|
192
|
+
|
|
193
|
+
# Build
|
|
194
|
+
npm run build
|
|
195
|
+
|
|
196
|
+
# Run locally
|
|
197
|
+
BENTO_PUBLISHABLE_KEY=xxx BENTO_SECRET_KEY=xxx BENTO_SITE_UUID=xxx npm start
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## License
|
|
201
|
+
|
|
202
|
+
MIT - see [LICENSE](LICENSE)
|
|
203
|
+
|
|
204
|
+
## Links
|
|
205
|
+
|
|
206
|
+
- [Bento](https://bentonow.com) - Email marketing platform
|
|
207
|
+
- [Bento Node SDK](https://github.com/bentonow/bento-node-sdk) - The underlying SDK
|
|
208
|
+
- [Model Context Protocol](https://modelcontextprotocol.io) - MCP specification
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/build/index.js
ADDED
|
@@ -0,0 +1,808 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { Analytics } from "@bentonow/bento-node-sdk";
|
|
6
|
+
// Initialize Bento client from environment variables
|
|
7
|
+
function getBentoClient() {
|
|
8
|
+
const publishableKey = process.env.BENTO_PUBLISHABLE_KEY;
|
|
9
|
+
const secretKey = process.env.BENTO_SECRET_KEY;
|
|
10
|
+
const siteUuid = process.env.BENTO_SITE_UUID;
|
|
11
|
+
if (!publishableKey || !secretKey || !siteUuid) {
|
|
12
|
+
throw new Error("Missing required environment variables: BENTO_PUBLISHABLE_KEY, BENTO_SECRET_KEY, BENTO_SITE_UUID");
|
|
13
|
+
}
|
|
14
|
+
return new Analytics({
|
|
15
|
+
authentication: {
|
|
16
|
+
publishableKey,
|
|
17
|
+
secretKey,
|
|
18
|
+
},
|
|
19
|
+
siteUuid,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
// Create MCP server
|
|
23
|
+
const server = new McpServer({
|
|
24
|
+
name: "bento",
|
|
25
|
+
version: "1.0.0",
|
|
26
|
+
});
|
|
27
|
+
// Helper to format responses
|
|
28
|
+
function formatResponse(data) {
|
|
29
|
+
if (data === null || data === undefined) {
|
|
30
|
+
return "No data returned";
|
|
31
|
+
}
|
|
32
|
+
if (typeof data === "boolean") {
|
|
33
|
+
return data ? "Success" : "Operation failed";
|
|
34
|
+
}
|
|
35
|
+
if (typeof data === "number") {
|
|
36
|
+
return `Count: ${data}`;
|
|
37
|
+
}
|
|
38
|
+
return JSON.stringify(data, null, 2);
|
|
39
|
+
}
|
|
40
|
+
// Helper for error handling
|
|
41
|
+
function handleError(error) {
|
|
42
|
+
if (error instanceof Error) {
|
|
43
|
+
return `Error: ${error.message}`;
|
|
44
|
+
}
|
|
45
|
+
return `Error: ${String(error)}`;
|
|
46
|
+
}
|
|
47
|
+
// =============================================================================
|
|
48
|
+
// SUBSCRIBER TOOLS
|
|
49
|
+
// =============================================================================
|
|
50
|
+
server.tool("bento_get_subscriber", "Look up a Bento subscriber by email or UUID. Returns subscriber details including tags, fields, and subscription status.", {
|
|
51
|
+
email: z.string().email().optional().describe("Subscriber email address"),
|
|
52
|
+
uuid: z.string().optional().describe("Subscriber UUID"),
|
|
53
|
+
}, async ({ email, uuid }) => {
|
|
54
|
+
try {
|
|
55
|
+
if (!email && !uuid) {
|
|
56
|
+
return {
|
|
57
|
+
content: [{ type: "text", text: "Either email or uuid is required" }],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const bento = getBentoClient();
|
|
61
|
+
const subscriber = await bento.V1.Subscribers.getSubscribers(email ? { email } : { uuid: uuid });
|
|
62
|
+
return {
|
|
63
|
+
content: [{ type: "text", text: formatResponse(subscriber) }],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
return {
|
|
68
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
server.tool("bento_create_subscriber", "Create a new subscriber in Bento. If the subscriber already exists, returns the existing subscriber.", {
|
|
73
|
+
email: z.string().email().describe("Email address for the new subscriber"),
|
|
74
|
+
}, async ({ email }) => {
|
|
75
|
+
try {
|
|
76
|
+
const bento = getBentoClient();
|
|
77
|
+
const subscriber = await bento.V1.Subscribers.createSubscriber({ email });
|
|
78
|
+
return {
|
|
79
|
+
content: [{ type: "text", text: formatResponse(subscriber) }],
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
return {
|
|
84
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
server.tool("bento_upsert_subscriber", "Create or update a subscriber with custom fields and tags. This is the most flexible way to manage subscribers.", {
|
|
89
|
+
email: z.string().email().describe("Subscriber email address"),
|
|
90
|
+
fields: z
|
|
91
|
+
.record(z.unknown())
|
|
92
|
+
.optional()
|
|
93
|
+
.describe("Custom fields to set on the subscriber (e.g., { firstName: 'John', company: 'Acme' })"),
|
|
94
|
+
tags: z
|
|
95
|
+
.string()
|
|
96
|
+
.optional()
|
|
97
|
+
.describe("Comma-separated list of tags to add (e.g., 'lead,newsletter')"),
|
|
98
|
+
removeTags: z
|
|
99
|
+
.string()
|
|
100
|
+
.optional()
|
|
101
|
+
.describe("Comma-separated list of tags to remove"),
|
|
102
|
+
}, async ({ email, fields, tags, removeTags }) => {
|
|
103
|
+
try {
|
|
104
|
+
const bento = getBentoClient();
|
|
105
|
+
const subscriber = await bento.V1.upsertSubscriber({
|
|
106
|
+
email,
|
|
107
|
+
fields,
|
|
108
|
+
tags,
|
|
109
|
+
remove_tags: removeTags,
|
|
110
|
+
});
|
|
111
|
+
return {
|
|
112
|
+
content: [{ type: "text", text: formatResponse(subscriber) }],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
return {
|
|
117
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
server.tool("bento_add_subscriber", "Subscribe a user to your Bento account. This triggers automations and is processed via the batch API (1-3 min delay).", {
|
|
122
|
+
email: z.string().email().describe("Subscriber email address"),
|
|
123
|
+
fields: z
|
|
124
|
+
.record(z.unknown())
|
|
125
|
+
.optional()
|
|
126
|
+
.describe("Custom fields to set on the subscriber"),
|
|
127
|
+
}, async ({ email, fields }) => {
|
|
128
|
+
try {
|
|
129
|
+
const bento = getBentoClient();
|
|
130
|
+
const result = await bento.V1.addSubscriber({ email, fields });
|
|
131
|
+
return {
|
|
132
|
+
content: [{ type: "text", text: formatResponse(result) }],
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
return {
|
|
137
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
server.tool("bento_remove_subscriber", "Unsubscribe a user from your Bento account. This triggers automations.", {
|
|
142
|
+
email: z.string().email().describe("Subscriber email address to unsubscribe"),
|
|
143
|
+
}, async ({ email }) => {
|
|
144
|
+
try {
|
|
145
|
+
const bento = getBentoClient();
|
|
146
|
+
const result = await bento.V1.removeSubscriber({ email });
|
|
147
|
+
return {
|
|
148
|
+
content: [{ type: "text", text: formatResponse(result) }],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
return {
|
|
153
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
// =============================================================================
|
|
158
|
+
// TAGGING TOOLS
|
|
159
|
+
// =============================================================================
|
|
160
|
+
server.tool("bento_tag_subscriber", "Add a tag to a subscriber. Creates the tag and/or subscriber if they don't exist. Triggers automations (1-3 min delay).", {
|
|
161
|
+
email: z.string().email().describe("Subscriber email address"),
|
|
162
|
+
tagName: z.string().describe("Name of the tag to add"),
|
|
163
|
+
}, async ({ email, tagName }) => {
|
|
164
|
+
try {
|
|
165
|
+
const bento = getBentoClient();
|
|
166
|
+
const result = await bento.V1.tagSubscriber({ email, tagName });
|
|
167
|
+
return {
|
|
168
|
+
content: [{ type: "text", text: formatResponse(result) }],
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
return {
|
|
173
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
server.tool("bento_remove_tag", "Remove a tag from a subscriber.", {
|
|
178
|
+
email: z.string().email().describe("Subscriber email address"),
|
|
179
|
+
tagName: z.string().describe("Name of the tag to remove"),
|
|
180
|
+
}, async ({ email, tagName }) => {
|
|
181
|
+
try {
|
|
182
|
+
const bento = getBentoClient();
|
|
183
|
+
const result = await bento.V1.Commands.removeTag({ email, tagName });
|
|
184
|
+
return {
|
|
185
|
+
content: [{ type: "text", text: formatResponse(result) }],
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
return {
|
|
190
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
server.tool("bento_list_tags", "List all tags in your Bento account.", {}, async () => {
|
|
195
|
+
try {
|
|
196
|
+
const bento = getBentoClient();
|
|
197
|
+
const tags = await bento.V1.Tags.getTags();
|
|
198
|
+
return {
|
|
199
|
+
content: [{ type: "text", text: formatResponse(tags) }],
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
return {
|
|
204
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
server.tool("bento_create_tag", "Create a new tag in your Bento account.", {
|
|
209
|
+
name: z.string().describe("Name of the tag to create"),
|
|
210
|
+
}, async ({ name }) => {
|
|
211
|
+
try {
|
|
212
|
+
const bento = getBentoClient();
|
|
213
|
+
const tags = await bento.V1.Tags.createTag({ name });
|
|
214
|
+
return {
|
|
215
|
+
content: [{ type: "text", text: formatResponse(tags) }],
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
catch (error) {
|
|
219
|
+
return {
|
|
220
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
// =============================================================================
|
|
225
|
+
// EVENT TRACKING TOOLS
|
|
226
|
+
// =============================================================================
|
|
227
|
+
server.tool("bento_track_event", "Track a custom event for a subscriber. Events can trigger automations. Common event types: $pageView, $signup, $login, or any custom event name.", {
|
|
228
|
+
email: z.string().email().describe("Subscriber email address"),
|
|
229
|
+
type: z
|
|
230
|
+
.string()
|
|
231
|
+
.describe("Event type/name (e.g., '$pageView', 'signup_completed', 'feature_used')"),
|
|
232
|
+
fields: z
|
|
233
|
+
.record(z.unknown())
|
|
234
|
+
.optional()
|
|
235
|
+
.describe("Custom fields to update on the subscriber"),
|
|
236
|
+
details: z
|
|
237
|
+
.record(z.unknown())
|
|
238
|
+
.optional()
|
|
239
|
+
.describe("Additional event details (e.g., { url: '/pricing', source: 'campaign' })"),
|
|
240
|
+
}, async ({ email, type, fields, details }) => {
|
|
241
|
+
try {
|
|
242
|
+
const bento = getBentoClient();
|
|
243
|
+
const result = await bento.V1.track({
|
|
244
|
+
email,
|
|
245
|
+
type,
|
|
246
|
+
fields: fields,
|
|
247
|
+
details,
|
|
248
|
+
});
|
|
249
|
+
return {
|
|
250
|
+
content: [{ type: "text", text: formatResponse(result) }],
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
catch (error) {
|
|
254
|
+
return {
|
|
255
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
server.tool("bento_track_purchase", "Track a purchase event for a subscriber. Used for calculating LTV (Lifetime Value). Amount should be in cents (e.g., 9999 = $99.99).", {
|
|
260
|
+
email: z.string().email().describe("Subscriber email address"),
|
|
261
|
+
orderId: z
|
|
262
|
+
.string()
|
|
263
|
+
.describe("Unique order/transaction ID to prevent duplicates"),
|
|
264
|
+
amount: z
|
|
265
|
+
.number()
|
|
266
|
+
.describe("Purchase amount in cents (e.g., 9999 for $99.99)"),
|
|
267
|
+
currency: z
|
|
268
|
+
.string()
|
|
269
|
+
.default("USD")
|
|
270
|
+
.describe("Currency code (default: USD)"),
|
|
271
|
+
cart: z
|
|
272
|
+
.object({
|
|
273
|
+
abandonedCheckoutUrl: z.string().optional(),
|
|
274
|
+
items: z
|
|
275
|
+
.array(z.object({
|
|
276
|
+
productId: z.string().optional(),
|
|
277
|
+
productSku: z.string().optional(),
|
|
278
|
+
productName: z.string().optional(),
|
|
279
|
+
quantity: z.number().optional(),
|
|
280
|
+
productPrice: z.number().optional(),
|
|
281
|
+
}))
|
|
282
|
+
.optional(),
|
|
283
|
+
})
|
|
284
|
+
.optional()
|
|
285
|
+
.describe("Optional cart details including items"),
|
|
286
|
+
}, async ({ email, orderId, amount, currency, cart }) => {
|
|
287
|
+
try {
|
|
288
|
+
const bento = getBentoClient();
|
|
289
|
+
const result = await bento.V1.trackPurchase({
|
|
290
|
+
email,
|
|
291
|
+
purchaseDetails: {
|
|
292
|
+
unique: { key: orderId },
|
|
293
|
+
value: { currency, amount },
|
|
294
|
+
cart: cart
|
|
295
|
+
? {
|
|
296
|
+
abandoned_checkout_url: cart.abandonedCheckoutUrl,
|
|
297
|
+
items: cart.items?.map((item) => ({
|
|
298
|
+
product_id: item.productId,
|
|
299
|
+
product_sku: item.productSku,
|
|
300
|
+
product_name: item.productName,
|
|
301
|
+
quantity: item.quantity,
|
|
302
|
+
product_price: item.productPrice,
|
|
303
|
+
})),
|
|
304
|
+
}
|
|
305
|
+
: undefined,
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
return {
|
|
309
|
+
content: [{ type: "text", text: formatResponse(result) }],
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
catch (error) {
|
|
313
|
+
return {
|
|
314
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
// =============================================================================
|
|
319
|
+
// FIELD TOOLS
|
|
320
|
+
// =============================================================================
|
|
321
|
+
server.tool("bento_update_fields", "Update custom fields on a subscriber. Triggers automations.", {
|
|
322
|
+
email: z.string().email().describe("Subscriber email address"),
|
|
323
|
+
fields: z
|
|
324
|
+
.record(z.unknown())
|
|
325
|
+
.describe("Fields to update (e.g., { firstName: 'John', company: 'Acme', plan: 'pro' })"),
|
|
326
|
+
}, async ({ email, fields }) => {
|
|
327
|
+
try {
|
|
328
|
+
const bento = getBentoClient();
|
|
329
|
+
const result = await bento.V1.updateFields({ email, fields });
|
|
330
|
+
return {
|
|
331
|
+
content: [{ type: "text", text: formatResponse(result) }],
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
catch (error) {
|
|
335
|
+
return {
|
|
336
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
server.tool("bento_list_fields", "List all custom fields defined in your Bento account.", {}, async () => {
|
|
341
|
+
try {
|
|
342
|
+
const bento = getBentoClient();
|
|
343
|
+
const fields = await bento.V1.Fields.getFields();
|
|
344
|
+
return {
|
|
345
|
+
content: [{ type: "text", text: formatResponse(fields) }],
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
catch (error) {
|
|
349
|
+
return {
|
|
350
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
server.tool("bento_create_field", "Create a new custom field in your Bento account. The key is automatically converted to a display name (e.g., 'firstName' becomes 'First Name').", {
|
|
355
|
+
key: z
|
|
356
|
+
.string()
|
|
357
|
+
.describe("Field key in camelCase or snake_case (e.g., 'firstName', 'company_name')"),
|
|
358
|
+
}, async ({ key }) => {
|
|
359
|
+
try {
|
|
360
|
+
const bento = getBentoClient();
|
|
361
|
+
const fields = await bento.V1.Fields.createField({ key });
|
|
362
|
+
return {
|
|
363
|
+
content: [{ type: "text", text: formatResponse(fields) }],
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
catch (error) {
|
|
367
|
+
return {
|
|
368
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
// =============================================================================
|
|
373
|
+
// STATISTICS TOOLS
|
|
374
|
+
// =============================================================================
|
|
375
|
+
server.tool("bento_get_site_stats", "Get overall statistics for your Bento site including subscriber counts, broadcast counts, and engagement rates.", {}, async () => {
|
|
376
|
+
try {
|
|
377
|
+
const bento = getBentoClient();
|
|
378
|
+
const stats = await bento.V1.Stats.getSiteStats();
|
|
379
|
+
return {
|
|
380
|
+
content: [{ type: "text", text: formatResponse(stats) }],
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
catch (error) {
|
|
384
|
+
return {
|
|
385
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
server.tool("bento_get_segment_stats", "Get statistics for a specific segment including subscriber count and engagement metrics.", {
|
|
390
|
+
segmentId: z.string().describe("The segment ID to get stats for"),
|
|
391
|
+
}, async ({ segmentId }) => {
|
|
392
|
+
try {
|
|
393
|
+
const bento = getBentoClient();
|
|
394
|
+
const stats = await bento.V1.Stats.getSegmentStats(segmentId);
|
|
395
|
+
return {
|
|
396
|
+
content: [{ type: "text", text: formatResponse(stats) }],
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
catch (error) {
|
|
400
|
+
return {
|
|
401
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
server.tool("bento_get_report_stats", "Get statistics for a specific email report/broadcast including opens, clicks, and unsubscribes.", {
|
|
406
|
+
reportId: z.string().describe("The report/broadcast ID to get stats for"),
|
|
407
|
+
}, async ({ reportId }) => {
|
|
408
|
+
try {
|
|
409
|
+
const bento = getBentoClient();
|
|
410
|
+
const stats = await bento.V1.Stats.getReportStats(reportId);
|
|
411
|
+
return {
|
|
412
|
+
content: [{ type: "text", text: formatResponse(stats) }],
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
catch (error) {
|
|
416
|
+
return {
|
|
417
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
// =============================================================================
|
|
422
|
+
// EMAIL TOOLS
|
|
423
|
+
// =============================================================================
|
|
424
|
+
server.tool("bento_send_email", "Send a transactional email to a subscriber. The 'from' address must be an authorized Author in your Bento account.", {
|
|
425
|
+
to: z.string().email().describe("Recipient email address"),
|
|
426
|
+
from: z
|
|
427
|
+
.string()
|
|
428
|
+
.email()
|
|
429
|
+
.describe("Sender email address (must be an authorized Author in Bento)"),
|
|
430
|
+
subject: z
|
|
431
|
+
.string()
|
|
432
|
+
.describe("Email subject line (can include {{ personalization }} tags)"),
|
|
433
|
+
htmlBody: z
|
|
434
|
+
.string()
|
|
435
|
+
.describe("HTML content of the email (can include {{ personalization }} tags)"),
|
|
436
|
+
transactional: z
|
|
437
|
+
.boolean()
|
|
438
|
+
.default(true)
|
|
439
|
+
.describe("If true, sends even to unsubscribed users (use for receipts, password resets, etc.)"),
|
|
440
|
+
personalizations: z
|
|
441
|
+
.record(z.string())
|
|
442
|
+
.optional()
|
|
443
|
+
.describe("Key-value pairs for personalization tags (e.g., { name: 'John', orderNumber: '12345' })"),
|
|
444
|
+
}, async ({ to, from, subject, htmlBody, transactional, personalizations }) => {
|
|
445
|
+
try {
|
|
446
|
+
const bento = getBentoClient();
|
|
447
|
+
const result = await bento.V1.Batch.sendTransactionalEmails({
|
|
448
|
+
emails: [
|
|
449
|
+
{
|
|
450
|
+
to,
|
|
451
|
+
from,
|
|
452
|
+
subject,
|
|
453
|
+
html_body: htmlBody,
|
|
454
|
+
transactional,
|
|
455
|
+
personalizations,
|
|
456
|
+
},
|
|
457
|
+
],
|
|
458
|
+
});
|
|
459
|
+
return {
|
|
460
|
+
content: [
|
|
461
|
+
{
|
|
462
|
+
type: "text",
|
|
463
|
+
text: result > 0 ? "Email sent successfully" : "Failed to send email",
|
|
464
|
+
},
|
|
465
|
+
],
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
catch (error) {
|
|
469
|
+
return {
|
|
470
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
// =============================================================================
|
|
475
|
+
// BROADCAST TOOLS
|
|
476
|
+
// =============================================================================
|
|
477
|
+
server.tool("bento_list_broadcasts", "List all email broadcasts/campaigns in your Bento account.", {}, async () => {
|
|
478
|
+
try {
|
|
479
|
+
const bento = getBentoClient();
|
|
480
|
+
const broadcasts = await bento.V1.Broadcasts.getBroadcasts();
|
|
481
|
+
return {
|
|
482
|
+
content: [{ type: "text", text: formatResponse(broadcasts) }],
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
catch (error) {
|
|
486
|
+
return {
|
|
487
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
server.tool("bento_create_broadcast", "Create a new email broadcast/campaign. The broadcast will be created as a draft.", {
|
|
492
|
+
name: z.string().describe("Internal name for the broadcast"),
|
|
493
|
+
subject: z
|
|
494
|
+
.string()
|
|
495
|
+
.describe("Email subject line (can include {{ personalization }} tags)"),
|
|
496
|
+
content: z.string().describe("Email content (HTML, plain text, or markdown)"),
|
|
497
|
+
type: z
|
|
498
|
+
.enum(["plain", "html", "markdown"])
|
|
499
|
+
.default("html")
|
|
500
|
+
.describe("Content type"),
|
|
501
|
+
fromName: z.string().describe("Sender name"),
|
|
502
|
+
fromEmail: z
|
|
503
|
+
.string()
|
|
504
|
+
.email()
|
|
505
|
+
.describe("Sender email (must be an authorized Author)"),
|
|
506
|
+
inclusiveTags: z
|
|
507
|
+
.string()
|
|
508
|
+
.optional()
|
|
509
|
+
.describe("Comma-separated tags - subscribers must have at least one"),
|
|
510
|
+
exclusiveTags: z
|
|
511
|
+
.string()
|
|
512
|
+
.optional()
|
|
513
|
+
.describe("Comma-separated tags - subscribers with these tags are excluded"),
|
|
514
|
+
segmentId: z.string().optional().describe("Target a specific segment"),
|
|
515
|
+
batchSizePerHour: z
|
|
516
|
+
.number()
|
|
517
|
+
.optional()
|
|
518
|
+
.describe("Limit sending rate (emails per hour)"),
|
|
519
|
+
}, async ({ name, subject, content, type, fromName, fromEmail, inclusiveTags, exclusiveTags, segmentId, batchSizePerHour, }) => {
|
|
520
|
+
try {
|
|
521
|
+
const bento = getBentoClient();
|
|
522
|
+
const broadcasts = await bento.V1.Broadcasts.createBroadcast([
|
|
523
|
+
{
|
|
524
|
+
name,
|
|
525
|
+
subject,
|
|
526
|
+
content,
|
|
527
|
+
type,
|
|
528
|
+
from: { name: fromName, email: fromEmail },
|
|
529
|
+
inclusive_tags: inclusiveTags,
|
|
530
|
+
exclusive_tags: exclusiveTags,
|
|
531
|
+
segment_id: segmentId,
|
|
532
|
+
batch_size_per_hour: batchSizePerHour ?? 1000,
|
|
533
|
+
},
|
|
534
|
+
]);
|
|
535
|
+
return {
|
|
536
|
+
content: [{ type: "text", text: formatResponse(broadcasts) }],
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
catch (error) {
|
|
540
|
+
return {
|
|
541
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
// =============================================================================
|
|
546
|
+
// SEQUENCE & WORKFLOW TOOLS
|
|
547
|
+
// =============================================================================
|
|
548
|
+
server.tool("bento_list_sequences", "List all email sequences in your Bento account. Returns each sequence with its name, ID, and email templates (id, subject, stats). Use this to discover what automated email sequences exist and get template IDs for reading/editing content.", {}, async () => {
|
|
549
|
+
try {
|
|
550
|
+
const bento = getBentoClient();
|
|
551
|
+
const sequences = await bento.V1.Sequences.getSequences();
|
|
552
|
+
return {
|
|
553
|
+
content: [{ type: "text", text: formatResponse(sequences) }],
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
catch (error) {
|
|
557
|
+
return {
|
|
558
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
server.tool("bento_list_workflows", "List all workflows (automation flows) in your Bento account. Returns each workflow with its name, ID, and email templates (id, subject, stats). Use this to discover what automated workflows exist and get template IDs for reading/editing content.", {}, async () => {
|
|
563
|
+
try {
|
|
564
|
+
const bento = getBentoClient();
|
|
565
|
+
const workflows = await bento.V1.Workflows.getWorkflows();
|
|
566
|
+
return {
|
|
567
|
+
content: [{ type: "text", text: formatResponse(workflows) }],
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
catch (error) {
|
|
571
|
+
return {
|
|
572
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
server.tool("bento_get_email_template", "Get the full content of an email template by ID. Returns the template's name, subject, HTML content, and stats. Use this after listing sequences/workflows to read the actual email content for review or editing.", {
|
|
577
|
+
id: z
|
|
578
|
+
.number()
|
|
579
|
+
.describe("The email template ID (numeric ID from the email_templates array in sequences or workflows)"),
|
|
580
|
+
}, async ({ id }) => {
|
|
581
|
+
try {
|
|
582
|
+
const bento = getBentoClient();
|
|
583
|
+
const template = await bento.V1.EmailTemplates.getEmailTemplate({ id });
|
|
584
|
+
return {
|
|
585
|
+
content: [{ type: "text", text: formatResponse(template) }],
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
catch (error) {
|
|
589
|
+
return {
|
|
590
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
server.tool("bento_update_email_template", "Update an email template's subject line and/or HTML content. Use this to improve email copy, fix typos, update designs, or make any changes to emails in sequences or workflows. Changes take effect immediately for future sends.", {
|
|
595
|
+
id: z.number().describe("The email template ID to update"),
|
|
596
|
+
subject: z
|
|
597
|
+
.string()
|
|
598
|
+
.optional()
|
|
599
|
+
.describe("New subject line for the email (can include {{ liquid }} personalization tags)"),
|
|
600
|
+
html: z
|
|
601
|
+
.string()
|
|
602
|
+
.optional()
|
|
603
|
+
.describe("New HTML content for the email body (can include {{ liquid }} personalization tags). Must include {{ visitor.unsubscribe_url }} for compliance."),
|
|
604
|
+
}, async ({ id, subject, html }) => {
|
|
605
|
+
try {
|
|
606
|
+
if (!subject && !html) {
|
|
607
|
+
return {
|
|
608
|
+
content: [
|
|
609
|
+
{ type: "text", text: "Either subject or html (or both) is required to update" },
|
|
610
|
+
],
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
const bento = getBentoClient();
|
|
614
|
+
const template = await bento.V1.EmailTemplates.updateEmailTemplate({
|
|
615
|
+
id,
|
|
616
|
+
subject,
|
|
617
|
+
html,
|
|
618
|
+
});
|
|
619
|
+
return {
|
|
620
|
+
content: [{ type: "text", text: formatResponse(template) }],
|
|
621
|
+
};
|
|
622
|
+
}
|
|
623
|
+
catch (error) {
|
|
624
|
+
return {
|
|
625
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
// =============================================================================
|
|
630
|
+
// BATCH TOOLS
|
|
631
|
+
// =============================================================================
|
|
632
|
+
server.tool("bento_batch_import_subscribers", "Import multiple subscribers at once (up to 1000). Does NOT trigger automations - use for bulk imports only.", {
|
|
633
|
+
subscribers: z
|
|
634
|
+
.array(z.object({
|
|
635
|
+
email: z.string().email(),
|
|
636
|
+
firstName: z.string().optional(),
|
|
637
|
+
lastName: z.string().optional(),
|
|
638
|
+
tags: z.string().optional(),
|
|
639
|
+
}).passthrough())
|
|
640
|
+
.describe("Array of subscribers to import (max 1000)"),
|
|
641
|
+
}, async ({ subscribers }) => {
|
|
642
|
+
try {
|
|
643
|
+
if (subscribers.length > 1000) {
|
|
644
|
+
return {
|
|
645
|
+
content: [
|
|
646
|
+
{ type: "text", text: "Error: Maximum 1000 subscribers per batch" },
|
|
647
|
+
],
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
const bento = getBentoClient();
|
|
651
|
+
const count = await bento.V1.Batch.importSubscribers({
|
|
652
|
+
subscribers: subscribers.map((s) => {
|
|
653
|
+
const { firstName, lastName, ...rest } = s;
|
|
654
|
+
return {
|
|
655
|
+
...rest,
|
|
656
|
+
first_name: firstName,
|
|
657
|
+
last_name: lastName,
|
|
658
|
+
};
|
|
659
|
+
}),
|
|
660
|
+
});
|
|
661
|
+
return {
|
|
662
|
+
content: [
|
|
663
|
+
{ type: "text", text: `Successfully imported ${count} subscribers` },
|
|
664
|
+
],
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
catch (error) {
|
|
668
|
+
return {
|
|
669
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
// =============================================================================
|
|
674
|
+
// EXPERIMENTAL TOOLS
|
|
675
|
+
// =============================================================================
|
|
676
|
+
server.tool("bento_validate_email", "Validate an email address using Bento's email validation service. Checks for syntax, deliverability, and spam traps.", {
|
|
677
|
+
email: z.string().email().describe("Email address to validate"),
|
|
678
|
+
name: z.string().optional().describe("Name associated with the email"),
|
|
679
|
+
ip: z.string().optional().describe("IP address of the user"),
|
|
680
|
+
userAgent: z.string().optional().describe("User agent string"),
|
|
681
|
+
}, async ({ email, name, ip, userAgent }) => {
|
|
682
|
+
try {
|
|
683
|
+
const bento = getBentoClient();
|
|
684
|
+
const isValid = await bento.V1.Experimental.validateEmail({
|
|
685
|
+
email,
|
|
686
|
+
name,
|
|
687
|
+
ip,
|
|
688
|
+
userAgent,
|
|
689
|
+
});
|
|
690
|
+
return {
|
|
691
|
+
content: [
|
|
692
|
+
{
|
|
693
|
+
type: "text",
|
|
694
|
+
text: isValid
|
|
695
|
+
? "Email is valid"
|
|
696
|
+
: "Email appears to be invalid or risky",
|
|
697
|
+
},
|
|
698
|
+
],
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
catch (error) {
|
|
702
|
+
return {
|
|
703
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
});
|
|
707
|
+
server.tool("bento_guess_gender", "Guess the gender based on a first name. Returns gender and confidence score.", {
|
|
708
|
+
name: z.string().describe("First name to analyze"),
|
|
709
|
+
}, async ({ name }) => {
|
|
710
|
+
try {
|
|
711
|
+
const bento = getBentoClient();
|
|
712
|
+
const result = await bento.V1.Experimental.guessGender({ name });
|
|
713
|
+
return {
|
|
714
|
+
content: [{ type: "text", text: formatResponse(result) }],
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
catch (error) {
|
|
718
|
+
return {
|
|
719
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
server.tool("bento_geolocate_ip", "Get geographic location data for an IP address.", {
|
|
724
|
+
ip: z.string().describe("IP address to geolocate"),
|
|
725
|
+
}, async ({ ip }) => {
|
|
726
|
+
try {
|
|
727
|
+
const bento = getBentoClient();
|
|
728
|
+
const location = await bento.V1.Experimental.geoLocateIP(ip);
|
|
729
|
+
return {
|
|
730
|
+
content: [{ type: "text", text: formatResponse(location) }],
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
catch (error) {
|
|
734
|
+
return {
|
|
735
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
server.tool("bento_check_blacklist", "Check if a domain or IP address is on any email blacklists.", {
|
|
740
|
+
domain: z.string().optional().describe("Domain to check"),
|
|
741
|
+
ip: z.string().optional().describe("IP address to check"),
|
|
742
|
+
}, async ({ domain, ip }) => {
|
|
743
|
+
try {
|
|
744
|
+
if (!domain && !ip) {
|
|
745
|
+
return {
|
|
746
|
+
content: [{ type: "text", text: "Either domain or ip is required" }],
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
const bento = getBentoClient();
|
|
750
|
+
const result = await bento.V1.Experimental.getBlacklistStatus(domain ? { domain } : { ipAddress: ip });
|
|
751
|
+
return {
|
|
752
|
+
content: [{ type: "text", text: formatResponse(result) }],
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
catch (error) {
|
|
756
|
+
return {
|
|
757
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
server.tool("bento_moderate_content", "Check content for potential issues using AI content moderation.", {
|
|
762
|
+
content: z.string().describe("Content to moderate"),
|
|
763
|
+
}, async ({ content }) => {
|
|
764
|
+
try {
|
|
765
|
+
const bento = getBentoClient();
|
|
766
|
+
const result = await bento.V1.Experimental.getContentModeration(content);
|
|
767
|
+
return {
|
|
768
|
+
content: [{ type: "text", text: formatResponse(result) }],
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
catch (error) {
|
|
772
|
+
return {
|
|
773
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
774
|
+
};
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
// =============================================================================
|
|
778
|
+
// FORM TOOLS
|
|
779
|
+
// =============================================================================
|
|
780
|
+
server.tool("bento_get_form_responses", "Get all responses for a specific Bento form.", {
|
|
781
|
+
formId: z.string().describe("The form ID to get responses for"),
|
|
782
|
+
}, async ({ formId }) => {
|
|
783
|
+
try {
|
|
784
|
+
const bento = getBentoClient();
|
|
785
|
+
const responses = await bento.V1.Forms.getResponses(formId);
|
|
786
|
+
return {
|
|
787
|
+
content: [{ type: "text", text: formatResponse(responses) }],
|
|
788
|
+
};
|
|
789
|
+
}
|
|
790
|
+
catch (error) {
|
|
791
|
+
return {
|
|
792
|
+
content: [{ type: "text", text: handleError(error) }],
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
});
|
|
796
|
+
// =============================================================================
|
|
797
|
+
// RUN SERVER
|
|
798
|
+
// =============================================================================
|
|
799
|
+
async function main() {
|
|
800
|
+
const transport = new StdioServerTransport();
|
|
801
|
+
await server.connect(transport);
|
|
802
|
+
console.error("Bento MCP Server running on stdio");
|
|
803
|
+
}
|
|
804
|
+
main().catch((error) => {
|
|
805
|
+
console.error("Fatal error:", error);
|
|
806
|
+
process.exit(1);
|
|
807
|
+
});
|
|
808
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,qDAAqD;AACrD,SAAS,cAAc;IACrB,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;IACzD,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAE7C,IAAI,CAAC,cAAc,IAAI,CAAC,SAAS,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CACb,kGAAkG,CACnG,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,SAAS,CAAC;QACnB,cAAc,EAAE;YACd,cAAc;YACd,SAAS;SACV;QACD,QAAQ;KACT,CAAC,CAAC;AACL,CAAC;AAED,oBAAoB;AACpB,MAAM,MA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c,CAAC,SAAS,CAAC,EAAE,CAAC;SAC7D,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;SACtD,CAAC;IACJ,CAAC;AACH,CAAC,CACF,CAAC;AAEF,gFAAgF;AAChF,aAAa;AACb,gFAAgF;AAEhF,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;AACrD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bentonow/bento-mcp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP server for Bento - Email marketing and analytics tools for AI assistants",
|
|
5
|
+
"author": "Bento <support@bentonow.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "build/index.js",
|
|
9
|
+
"bin": {
|
|
10
|
+
"bento-mcp": "./build/index.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"build"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc && chmod +x build/index.js",
|
|
17
|
+
"dev": "tsc --watch",
|
|
18
|
+
"start": "node build/index.js",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"mcp",
|
|
23
|
+
"model-context-protocol",
|
|
24
|
+
"bento",
|
|
25
|
+
"email",
|
|
26
|
+
"marketing",
|
|
27
|
+
"analytics",
|
|
28
|
+
"ai",
|
|
29
|
+
"claude",
|
|
30
|
+
"cursor"
|
|
31
|
+
],
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git://github.com/bentonow/bento-mcp.git"
|
|
35
|
+
},
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/bentonow/bento-mcp/issues"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://bentonow.com",
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=18"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@bentonow/bento-node-sdk": "^1.0.4",
|
|
45
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
46
|
+
"zod": "^3.24.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^22.10.0",
|
|
50
|
+
"typescript": "^5.7.0"
|
|
51
|
+
}
|
|
52
|
+
}
|