sendpro-flowmailer-mcp 0.1.1
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 +19 -0
- package/LICENSE +21 -0
- package/README.md +295 -0
- package/dist/config.d.ts +11 -0
- package/dist/config.js +45 -0
- package/dist/config.js.map +1 -0
- package/dist/flowmailer-client.d.ts +40 -0
- package/dist/flowmailer-client.js +191 -0
- package/dist/flowmailer-client.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/tools.d.ts +25 -0
- package/dist/tools.js +377 -0
- package/dist/tools.js.map +1 -0
- package/docs/configuration.md +38 -0
- package/docs/releasing.md +85 -0
- package/docs/repository-health.md +110 -0
- package/docs/tools.md +34 -0
- package/package.json +73 -0
- package/server.json +59 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import "dotenv/config";
|
|
3
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
|
+
import { loadConfig } from "./config.js";
|
|
6
|
+
import { FlowMailerClient } from "./flowmailer-client.js";
|
|
7
|
+
import { registerTools } from "./tools.js";
|
|
8
|
+
async function main() {
|
|
9
|
+
const config = loadConfig();
|
|
10
|
+
const server = new McpServer({
|
|
11
|
+
name: "sendpro-flowmailer-mcp",
|
|
12
|
+
version: "0.1.1"
|
|
13
|
+
}, {
|
|
14
|
+
instructions: "Unofficial MCP server for Spotler SendPro, formerly FlowMailer. Use read-only tools for investigation. Mutating SendPro API calls are unavailable when READ_ONLY/SENDPRO_READ_ONLY is true."
|
|
15
|
+
});
|
|
16
|
+
registerTools(server, new FlowMailerClient(config), config);
|
|
17
|
+
const transport = new StdioServerTransport();
|
|
18
|
+
await server.connect(transport);
|
|
19
|
+
process.on("SIGINT", async () => {
|
|
20
|
+
await server.close();
|
|
21
|
+
process.exit(0);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
main().catch((error) => {
|
|
25
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
26
|
+
console.error(`SendPro MCP server failed to start: ${message}`);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B;QACE,IAAI,EAAE,wBAAwB;QAC9B,OAAO,EAAE,OAAO;KACjB,EACD;QACE,YAAY,EACV,6LAA6L;KAChM,CACF,CAAC;IAEF,aAAa,CAAC,MAAM,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;QAC9B,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,CAAC,uCAAuC,OAAO,EAAE,CAAC,CAAC;IAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/tools.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { FlowMailerConfig } from "./config.js";
|
|
3
|
+
import type { FlowMailerClient, HttpMethod } from "./flowmailer-client.js";
|
|
4
|
+
type ToolHandler = (args: Record<string, unknown>) => Promise<ToolResult>;
|
|
5
|
+
interface ToolResult {
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
content: Array<{
|
|
8
|
+
type: "text";
|
|
9
|
+
text: string;
|
|
10
|
+
}>;
|
|
11
|
+
structuredContent: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export interface KnownEndpoint {
|
|
14
|
+
method: HttpMethod;
|
|
15
|
+
path: string;
|
|
16
|
+
description: string;
|
|
17
|
+
mutates: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function listKnownEndpoints(): KnownEndpoint[];
|
|
20
|
+
export declare function listToolNames(options: {
|
|
21
|
+
readOnly: boolean;
|
|
22
|
+
}): string[];
|
|
23
|
+
export declare function registerTools(server: McpServer, client: FlowMailerClient, config: FlowMailerConfig): void;
|
|
24
|
+
export declare function createToolHandlers(client: FlowMailerClient, config: FlowMailerConfig): Record<string, ToolHandler>;
|
|
25
|
+
export {};
|
package/dist/tools.js
ADDED
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const jsonValueSchema = z.lazy(() => z.union([z.string(), z.number(), z.boolean(), z.null(), z.array(jsonValueSchema), z.record(z.string(), jsonValueSchema)]));
|
|
3
|
+
const objectSchema = z.record(z.string(), jsonValueSchema);
|
|
4
|
+
const methodSchema = z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
5
|
+
const accountIdSchema = z.string().min(1).optional().describe("Override FLOWMAILER_ACCOUNT_ID for this call.");
|
|
6
|
+
const requestSchema = z.object({
|
|
7
|
+
method: methodSchema.default("GET"),
|
|
8
|
+
path: z
|
|
9
|
+
.string()
|
|
10
|
+
.min(1)
|
|
11
|
+
.describe("Relative SendPro API path, e.g. /{account_id}/messages or /545/messages. Absolute URLs are rejected."),
|
|
12
|
+
accountId: accountIdSchema,
|
|
13
|
+
matrix: objectSchema.optional().describe("Matrix parameters appended to the final path segment, e.g. daterange."),
|
|
14
|
+
query: objectSchema.optional().describe("Query string parameters."),
|
|
15
|
+
body: jsonValueSchema.optional().describe("JSON request body for mutating API calls."),
|
|
16
|
+
range: z.string().optional().describe("Range header, e.g. items=:10 or items=0-10.")
|
|
17
|
+
});
|
|
18
|
+
const readOnlyRequestSchema = requestSchema.extend({
|
|
19
|
+
method: z.literal("GET").default("GET")
|
|
20
|
+
});
|
|
21
|
+
const listMessagesSchema = z.object({
|
|
22
|
+
accountId: accountIdSchema,
|
|
23
|
+
count: z.number().int().positive().max(1000).default(10).describe("Number of messages for the ref_range header."),
|
|
24
|
+
reference: z.string().optional().describe("Reference token from Next-Range. Omit for the first page."),
|
|
25
|
+
daterange: z.string().optional().describe("ISO8601 date range: start,end."),
|
|
26
|
+
flowIds: z.array(z.string()).optional().describe("Flow IDs to filter on."),
|
|
27
|
+
addEvents: z.boolean().optional(),
|
|
28
|
+
addHeaders: z.boolean().optional(),
|
|
29
|
+
addOnlineLink: z.boolean().optional(),
|
|
30
|
+
addTags: z.boolean().optional(),
|
|
31
|
+
sortField: z.enum(["INSERTED", "SUBMITTED"]).optional(),
|
|
32
|
+
sortOrder: z.enum(["ASC", "DESC"]).optional()
|
|
33
|
+
});
|
|
34
|
+
const messageIdSchema = z.object({
|
|
35
|
+
accountId: accountIdSchema,
|
|
36
|
+
messageId: z.string().min(1),
|
|
37
|
+
addTags: z.boolean().optional()
|
|
38
|
+
});
|
|
39
|
+
const archiveSchema = z.object({
|
|
40
|
+
accountId: accountIdSchema,
|
|
41
|
+
messageId: z.string().min(1),
|
|
42
|
+
addAttachments: z.boolean().optional(),
|
|
43
|
+
addData: z.boolean().optional()
|
|
44
|
+
});
|
|
45
|
+
const recipientSchema = z.object({
|
|
46
|
+
accountId: accountIdSchema,
|
|
47
|
+
recipient: z.string().min(1)
|
|
48
|
+
});
|
|
49
|
+
const listResourceSchema = z.object({
|
|
50
|
+
accountId: accountIdSchema,
|
|
51
|
+
resource: z.enum([
|
|
52
|
+
"event_flow_rules",
|
|
53
|
+
"event_flow_rules/hierarchy",
|
|
54
|
+
"event_flows",
|
|
55
|
+
"filters",
|
|
56
|
+
"flow_rules",
|
|
57
|
+
"flow_templates",
|
|
58
|
+
"flows",
|
|
59
|
+
"message_events",
|
|
60
|
+
"message_hold",
|
|
61
|
+
"messagestats",
|
|
62
|
+
"sender_domains",
|
|
63
|
+
"sources",
|
|
64
|
+
"templates",
|
|
65
|
+
"undeliveredmessages"
|
|
66
|
+
]),
|
|
67
|
+
daterange: z.string().optional().describe("Matrix daterange where the selected endpoint supports it."),
|
|
68
|
+
range: z.string().optional().describe("Range header where the selected endpoint supports it.")
|
|
69
|
+
});
|
|
70
|
+
const submitMessageSchema = z.object({
|
|
71
|
+
accountId: accountIdSchema,
|
|
72
|
+
body: objectSchema.describe("SendPro SubmitMessage JSON body.")
|
|
73
|
+
});
|
|
74
|
+
const resendMessageSchema = z.object({
|
|
75
|
+
accountId: accountIdSchema,
|
|
76
|
+
messageId: z.string().min(1),
|
|
77
|
+
body: objectSchema.describe("SendPro ResendMessage JSON body.")
|
|
78
|
+
});
|
|
79
|
+
export function listKnownEndpoints() {
|
|
80
|
+
return KNOWN_ENDPOINTS;
|
|
81
|
+
}
|
|
82
|
+
export function listToolNames(options) {
|
|
83
|
+
return getToolDefinitions(options).map((tool) => tool.name);
|
|
84
|
+
}
|
|
85
|
+
export function registerTools(server, client, config) {
|
|
86
|
+
const handlers = createToolHandlers(client, config);
|
|
87
|
+
for (const tool of getToolDefinitions(config)) {
|
|
88
|
+
server.registerTool(tool.name, {
|
|
89
|
+
title: tool.title,
|
|
90
|
+
description: tool.description,
|
|
91
|
+
inputSchema: tool.inputSchema,
|
|
92
|
+
annotations: {
|
|
93
|
+
readOnlyHint: tool.readOnly,
|
|
94
|
+
destructiveHint: !tool.readOnly,
|
|
95
|
+
openWorldHint: true
|
|
96
|
+
}
|
|
97
|
+
}, async (args) => handlers[tool.name]?.(args));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
export function createToolHandlers(client, config) {
|
|
101
|
+
return {
|
|
102
|
+
flowmailer_request: async (args) => toToolResult(await client.request(toRawRequest(args))),
|
|
103
|
+
flowmailer_endpoint_catalog: async () => toToolResult({
|
|
104
|
+
status: 200,
|
|
105
|
+
headers: {},
|
|
106
|
+
data: { endpoints: KNOWN_ENDPOINTS }
|
|
107
|
+
}),
|
|
108
|
+
flowmailer_list_messages: async (args) => toToolResult(await client.request({
|
|
109
|
+
method: "GET",
|
|
110
|
+
path: "/{account_id}/messages",
|
|
111
|
+
accountId: args.accountId,
|
|
112
|
+
matrix: {
|
|
113
|
+
daterange: args.daterange,
|
|
114
|
+
flow_ids: args.flowIds
|
|
115
|
+
},
|
|
116
|
+
query: {
|
|
117
|
+
addevents: args.addEvents,
|
|
118
|
+
addheaders: args.addHeaders,
|
|
119
|
+
addonlinelink: args.addOnlineLink,
|
|
120
|
+
addtags: args.addTags,
|
|
121
|
+
sortfield: args.sortField,
|
|
122
|
+
sortorder: args.sortOrder
|
|
123
|
+
},
|
|
124
|
+
range: buildReferenceRange(args.reference, args.count)
|
|
125
|
+
})),
|
|
126
|
+
flowmailer_get_message: async (args) => toToolResult(await client.request({
|
|
127
|
+
method: "GET",
|
|
128
|
+
path: "/{account_id}/messages/{message_id}".replace("{message_id}", encodeURIComponent(args.messageId)),
|
|
129
|
+
accountId: args.accountId,
|
|
130
|
+
query: {
|
|
131
|
+
addtags: args.addTags
|
|
132
|
+
}
|
|
133
|
+
})),
|
|
134
|
+
flowmailer_get_message_archive: async (args) => toToolResult(await client.request({
|
|
135
|
+
method: "GET",
|
|
136
|
+
path: "/{account_id}/messages/{message_id}/archive".replace("{message_id}", encodeURIComponent(args.messageId)),
|
|
137
|
+
accountId: args.accountId,
|
|
138
|
+
query: {
|
|
139
|
+
addattachments: args.addAttachments,
|
|
140
|
+
adddata: args.addData
|
|
141
|
+
}
|
|
142
|
+
})),
|
|
143
|
+
flowmailer_get_message_error_archive: async (args) => toToolResult(await client.request({
|
|
144
|
+
method: "GET",
|
|
145
|
+
path: "/{account_id}/messages/{message_id}/error_archive".replace("{message_id}", encodeURIComponent(args.messageId)),
|
|
146
|
+
accountId: args.accountId,
|
|
147
|
+
query: {
|
|
148
|
+
addattachments: args.addAttachments,
|
|
149
|
+
adddata: args.addData
|
|
150
|
+
}
|
|
151
|
+
})),
|
|
152
|
+
flowmailer_get_recipient: async (args) => toToolResult(await client.request({
|
|
153
|
+
method: "GET",
|
|
154
|
+
path: "/{account_id}/recipient/{recipient}".replace("{recipient}", encodeURIComponent(args.recipient)),
|
|
155
|
+
accountId: args.accountId
|
|
156
|
+
})),
|
|
157
|
+
flowmailer_list_resource: async (args) => toToolResult(await client.request({
|
|
158
|
+
method: "GET",
|
|
159
|
+
path: `/{account_id}/${args.resource}`,
|
|
160
|
+
accountId: args.accountId,
|
|
161
|
+
matrix: {
|
|
162
|
+
daterange: args.daterange
|
|
163
|
+
},
|
|
164
|
+
range: args.range
|
|
165
|
+
})),
|
|
166
|
+
flowmailer_submit_message: async (args) => {
|
|
167
|
+
assertWritable(config);
|
|
168
|
+
return toToolResult(await client.request({
|
|
169
|
+
method: "POST",
|
|
170
|
+
path: "/{account_id}/messages/submit",
|
|
171
|
+
accountId: args.accountId,
|
|
172
|
+
body: args.body
|
|
173
|
+
}));
|
|
174
|
+
},
|
|
175
|
+
flowmailer_simulate_message: async (args) => {
|
|
176
|
+
assertWritable(config);
|
|
177
|
+
return toToolResult(await client.request({
|
|
178
|
+
method: "POST",
|
|
179
|
+
path: "/{account_id}/messages/simulate",
|
|
180
|
+
accountId: args.accountId,
|
|
181
|
+
body: args.body
|
|
182
|
+
}));
|
|
183
|
+
},
|
|
184
|
+
flowmailer_resend_message: async (args) => {
|
|
185
|
+
assertWritable(config);
|
|
186
|
+
return toToolResult(await client.request({
|
|
187
|
+
method: "POST",
|
|
188
|
+
path: "/{account_id}/messages/{message_id}/resend".replace("{message_id}", encodeURIComponent(args.messageId)),
|
|
189
|
+
accountId: args.accountId,
|
|
190
|
+
body: args.body
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function getToolDefinitions(options) {
|
|
196
|
+
const readTools = [
|
|
197
|
+
{
|
|
198
|
+
name: "flowmailer_request",
|
|
199
|
+
title: "FlowMailer Request",
|
|
200
|
+
description: "Call any relative FlowMailer SendPro API endpoint. In READ_ONLY mode, only GET requests are allowed.",
|
|
201
|
+
inputSchema: options.readOnly ? readOnlyRequestSchema : requestSchema,
|
|
202
|
+
readOnly: options.readOnly
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "flowmailer_endpoint_catalog",
|
|
206
|
+
title: "FlowMailer Endpoint Catalog",
|
|
207
|
+
description: "List the SendPro endpoints known by this unofficial MCP server.",
|
|
208
|
+
inputSchema: z.object({}),
|
|
209
|
+
readOnly: true
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "flowmailer_list_messages",
|
|
213
|
+
title: "List FlowMailer Messages",
|
|
214
|
+
description: "List messages using SendPro's reference range paging.",
|
|
215
|
+
inputSchema: listMessagesSchema,
|
|
216
|
+
readOnly: true
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: "flowmailer_get_message",
|
|
220
|
+
title: "Get FlowMailer Message",
|
|
221
|
+
description: "Get a SendPro message by id.",
|
|
222
|
+
inputSchema: messageIdSchema,
|
|
223
|
+
readOnly: true
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: "flowmailer_get_message_archive",
|
|
227
|
+
title: "Get Message Archive",
|
|
228
|
+
description: "List archived message content for a message.",
|
|
229
|
+
inputSchema: archiveSchema,
|
|
230
|
+
readOnly: true
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: "flowmailer_get_message_error_archive",
|
|
234
|
+
title: "Get Message Error Archive",
|
|
235
|
+
description: "Get archived error content for a message.",
|
|
236
|
+
inputSchema: archiveSchema,
|
|
237
|
+
readOnly: true
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: "flowmailer_get_recipient",
|
|
241
|
+
title: "Get Recipient",
|
|
242
|
+
description: "Get SendPro recipient information.",
|
|
243
|
+
inputSchema: recipientSchema,
|
|
244
|
+
readOnly: true
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: "flowmailer_list_resource",
|
|
248
|
+
title: "List FlowMailer Resource",
|
|
249
|
+
description: "List common account resources such as flows, templates, sources, sender domains, or stats.",
|
|
250
|
+
inputSchema: listResourceSchema,
|
|
251
|
+
readOnly: true
|
|
252
|
+
}
|
|
253
|
+
];
|
|
254
|
+
if (options.readOnly) {
|
|
255
|
+
return readTools;
|
|
256
|
+
}
|
|
257
|
+
return [
|
|
258
|
+
...readTools,
|
|
259
|
+
{
|
|
260
|
+
name: "flowmailer_submit_message",
|
|
261
|
+
title: "Submit FlowMailer Message",
|
|
262
|
+
description: "Submit an email or SMS message via SendPro.",
|
|
263
|
+
inputSchema: submitMessageSchema,
|
|
264
|
+
readOnly: false
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "flowmailer_simulate_message",
|
|
268
|
+
title: "Simulate FlowMailer Message",
|
|
269
|
+
description: "Simulate an email or SMS message via SendPro.",
|
|
270
|
+
inputSchema: submitMessageSchema,
|
|
271
|
+
readOnly: false
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
name: "flowmailer_resend_message",
|
|
275
|
+
title: "Resend FlowMailer Message",
|
|
276
|
+
description: "Resend a SendPro message by id.",
|
|
277
|
+
inputSchema: resendMessageSchema,
|
|
278
|
+
readOnly: false
|
|
279
|
+
}
|
|
280
|
+
];
|
|
281
|
+
}
|
|
282
|
+
function toRawRequest(args) {
|
|
283
|
+
return {
|
|
284
|
+
method: args.method ?? "GET",
|
|
285
|
+
path: args.path,
|
|
286
|
+
accountId: args.accountId,
|
|
287
|
+
matrix: args.matrix,
|
|
288
|
+
query: args.query,
|
|
289
|
+
body: args.body,
|
|
290
|
+
range: args.range
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
function toToolResult(response) {
|
|
294
|
+
return {
|
|
295
|
+
content: [
|
|
296
|
+
{
|
|
297
|
+
type: "text",
|
|
298
|
+
text: JSON.stringify(response, null, 2)
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
structuredContent: response
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
function buildReferenceRange(reference, count = 10) {
|
|
305
|
+
return reference ? `items=${reference}:${count}` : `items=:${count}`;
|
|
306
|
+
}
|
|
307
|
+
function assertWritable(config) {
|
|
308
|
+
if (config.readOnly) {
|
|
309
|
+
throw new Error("READ_ONLY is enabled; mutating FlowMailer tools are disabled");
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
const KNOWN_ENDPOINTS = [
|
|
313
|
+
{ method: "GET", path: "/{account_id}/event_flow_rules", description: "Get flow rule list for all event flows", mutates: false },
|
|
314
|
+
{ method: "GET", path: "/{account_id}/event_flow_rules/hierarchy", description: "Get hierarchical flow rule list for all event flows", mutates: false },
|
|
315
|
+
{ method: "GET", path: "/{account_id}/event_flows", description: "List event flows per account", mutates: false },
|
|
316
|
+
{ method: "POST", path: "/{account_id}/event_flows", description: "Create a new event flow", mutates: true },
|
|
317
|
+
{ method: "DELETE", path: "/{account_id}/event_flows/{event_flow_id}", description: "Delete event flow by id", mutates: true },
|
|
318
|
+
{ method: "GET", path: "/{account_id}/event_flows/{event_flow_id}", description: "Get event flow by id", mutates: false },
|
|
319
|
+
{ method: "PUT", path: "/{account_id}/event_flows/{event_flow_id}", description: "Save event flow", mutates: true },
|
|
320
|
+
{ method: "GET", path: "/{account_id}/event_flows/{event_flow_id}/rule", description: "Get conditions for an event flow", mutates: false },
|
|
321
|
+
{ method: "PUT", path: "/{account_id}/event_flows/{event_flow_id}/rule", description: "Set conditions for an event flow", mutates: true },
|
|
322
|
+
{ method: "GET", path: "/{account_id}/filters", description: "List filters per account", mutates: false },
|
|
323
|
+
{ method: "DELETE", path: "/{account_id}/filters/{filter_id}", description: "Delete a recipient from the filter", mutates: true },
|
|
324
|
+
{ method: "GET", path: "/{account_id}/flow_rules", description: "Get flow rule list for all flows", mutates: false },
|
|
325
|
+
{ method: "GET", path: "/{account_id}/flow_templates", description: "List flow templates per account", mutates: false },
|
|
326
|
+
{ method: "GET", path: "/{account_id}/flows", description: "List flows per account", mutates: false },
|
|
327
|
+
{ method: "POST", path: "/{account_id}/flows", description: "Create a new flow", mutates: true },
|
|
328
|
+
{ method: "DELETE", path: "/{account_id}/flows/{flow_id}", description: "Delete flow by id", mutates: true },
|
|
329
|
+
{ method: "GET", path: "/{account_id}/flows/{flow_id}", description: "Get flow by id", mutates: false },
|
|
330
|
+
{ method: "PUT", path: "/{account_id}/flows/{flow_id}", description: "Save flow", mutates: true },
|
|
331
|
+
{ method: "GET", path: "/{account_id}/flows/{flow_id}/messages", description: "List messages per flow", mutates: false },
|
|
332
|
+
{ method: "GET", path: "/{account_id}/flows/{flow_id}/rule", description: "Get flow conditions for a flow", mutates: false },
|
|
333
|
+
{ method: "PUT", path: "/{account_id}/flows/{flow_id}/rule", description: "Set conditions for a flow", mutates: true },
|
|
334
|
+
{ method: "GET", path: "/{account_id}/flows/{flow_id}/stats", description: "Get time-based message statistics for a flow", mutates: false },
|
|
335
|
+
{ method: "GET", path: "/{account_id}/message_events", description: "List message events", mutates: false },
|
|
336
|
+
{ method: "GET", path: "/{account_id}/message_hold", description: "List messages which could not be processed", mutates: false },
|
|
337
|
+
{ method: "GET", path: "/{account_id}/message_hold/{message_id}", description: "Get a held message by id", mutates: false },
|
|
338
|
+
{ method: "GET", path: "/{account_id}/messages", description: "List messages", mutates: false },
|
|
339
|
+
{ method: "POST", path: "/{account_id}/messages/simulate", description: "Simulate an email or SMS message", mutates: true },
|
|
340
|
+
{ method: "POST", path: "/{account_id}/messages/submit", description: "Send an email or SMS message", mutates: true },
|
|
341
|
+
{ method: "GET", path: "/{account_id}/messages/{message_id}", description: "Get message by id", mutates: false },
|
|
342
|
+
{ method: "GET", path: "/{account_id}/messages/{message_id}/archive", description: "List archived message content", mutates: false },
|
|
343
|
+
{ method: "GET", path: "/{account_id}/messages/{message_id}/archive/{flow_step_id}/attachment/{content_id}", description: "Fetch an archived attachment", mutates: false },
|
|
344
|
+
{ method: "GET", path: "/{account_id}/messages/{message_id}/error_archive", description: "Get message error archive", mutates: false },
|
|
345
|
+
{ method: "POST", path: "/{account_id}/messages/{message_id}/resend", description: "Resend message by id", mutates: true },
|
|
346
|
+
{ method: "GET", path: "/{account_id}/messagestats", description: "Get time-based message statistics for the account", mutates: false },
|
|
347
|
+
{ method: "GET", path: "/{account_id}/recipient/{recipient}", description: "Get information about a recipient", mutates: false },
|
|
348
|
+
{ method: "GET", path: "/{account_id}/recipient/{recipient}/messages", description: "List messages per recipient", mutates: false },
|
|
349
|
+
{ method: "GET", path: "/{account_id}/sender/{sender}/messages", description: "List messages per sender", mutates: false },
|
|
350
|
+
{ method: "GET", path: "/{account_id}/sender_domains", description: "List sender domains by account", mutates: false },
|
|
351
|
+
{ method: "POST", path: "/{account_id}/sender_domains", description: "Create sender domain", mutates: true },
|
|
352
|
+
{ method: "GET", path: "/{account_id}/sender_domains/by_domain/{domain}", description: "Get sender domain by domain name", mutates: false },
|
|
353
|
+
{ method: "POST", path: "/{account_id}/sender_domains/validate", description: "Validate but do not save a sender domain", mutates: true },
|
|
354
|
+
{ method: "DELETE", path: "/{account_id}/sender_domains/{domain_id}", description: "Delete sender domain", mutates: true },
|
|
355
|
+
{ method: "GET", path: "/{account_id}/sender_domains/{domain_id}", description: "Get sender domain by id", mutates: false },
|
|
356
|
+
{ method: "PUT", path: "/{account_id}/sender_domains/{domain_id}", description: "Save sender domain", mutates: true },
|
|
357
|
+
{ method: "GET", path: "/{account_id}/sources", description: "List source systems per account", mutates: false },
|
|
358
|
+
{ method: "POST", path: "/{account_id}/sources", description: "Create a new source", mutates: true },
|
|
359
|
+
{ method: "DELETE", path: "/{account_id}/sources/{source_id}", description: "Delete a source", mutates: true },
|
|
360
|
+
{ method: "GET", path: "/{account_id}/sources/{source_id}", description: "Get a source by id", mutates: false },
|
|
361
|
+
{ method: "PUT", path: "/{account_id}/sources/{source_id}", description: "Update a source", mutates: true },
|
|
362
|
+
{ method: "GET", path: "/{account_id}/sources/{source_id}/messages", description: "List messages per source", mutates: false },
|
|
363
|
+
{ method: "GET", path: "/{account_id}/sources/{source_id}/stats", description: "Get source statistics", mutates: false },
|
|
364
|
+
{ method: "GET", path: "/{account_id}/sources/{source_id}/users", description: "List credentials per source system", mutates: false },
|
|
365
|
+
{ method: "POST", path: "/{account_id}/sources/{source_id}/users", description: "Create credentials for a source", mutates: true },
|
|
366
|
+
{ method: "DELETE", path: "/{account_id}/sources/{source_id}/users/{user_id}", description: "Delete credentials", mutates: true },
|
|
367
|
+
{ method: "GET", path: "/{account_id}/sources/{source_id}/users/{user_id}", description: "Get credentials for a source", mutates: false },
|
|
368
|
+
{ method: "PUT", path: "/{account_id}/sources/{source_id}/users/{user_id}", description: "Update credentials for a source", mutates: true },
|
|
369
|
+
{ method: "GET", path: "/{account_id}/tag/{tag}/messages", description: "List messages per tag", mutates: false },
|
|
370
|
+
{ method: "GET", path: "/{account_id}/templates", description: "List templates by account", mutates: false },
|
|
371
|
+
{ method: "POST", path: "/{account_id}/templates", description: "Create template", mutates: true },
|
|
372
|
+
{ method: "DELETE", path: "/{account_id}/templates/{template_id}", description: "Delete template by id", mutates: true },
|
|
373
|
+
{ method: "GET", path: "/{account_id}/templates/{template_id}", description: "Get template by id", mutates: false },
|
|
374
|
+
{ method: "PUT", path: "/{account_id}/templates/{template_id}", description: "Save template", mutates: true },
|
|
375
|
+
{ method: "GET", path: "/{account_id}/undeliveredmessages", description: "List undeliverable messages", mutates: false }
|
|
376
|
+
];
|
|
377
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6BxB,MAAM,eAAe,GAAyB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CACxD,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,CAAC,CAAC,CAC1H,CAAC;AACF,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,CAAC;AAC3D,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEvE,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ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EAAE,2BAA2B,EAAE,OAAO,EAAE,KAAK,EAAE;IAC5G,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE;IAClG,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,uCAAuC,EAAE,WAAW,EAAE,uBAAuB,EAAE,OAAO,EAAE,IAAI,EAAE;IACxH,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,uCAAuC,EAAE,WAAW,EAAE,oBAAoB,EAAE,OAAO,EAAE,KAAK,EAAE;IACnH,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,uCAAuC,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE;IAC7G,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,mCAAmC,EAAE,WAAW,EAAE,6BAA6B,EAAE,OAAO,EAAE,KAAK,EAAE;CACzH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
The server reads configuration from environment variables. Values passed by an MCP client take precedence over `.env` files loaded by `dotenv`.
|
|
4
|
+
|
|
5
|
+
## Required
|
|
6
|
+
|
|
7
|
+
| Variable | Description |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| `SENDPRO_ACCOUNT_ID` | SendPro account id. |
|
|
10
|
+
| `SENDPRO_CLIENT_ID` | OAuth client id. |
|
|
11
|
+
| `SENDPRO_CLIENT_SECRET` | OAuth client secret. |
|
|
12
|
+
|
|
13
|
+
## Optional
|
|
14
|
+
|
|
15
|
+
| Variable | Default | Description |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| `SENDPRO_READ_ONLY` | `true` | Allows only read requests when true. |
|
|
18
|
+
| `READ_ONLY` | | Generic read-only override. |
|
|
19
|
+
| `SENDPRO_API_BASE_URL` | `https://api.flowmailer.net` | SendPro API base URL. |
|
|
20
|
+
| `SENDPRO_AUTH_BASE_URL` | `https://login.flowmailer.net` | OAuth base URL. |
|
|
21
|
+
| `SENDPRO_API_MEDIA_TYPE` | `application/vnd.flowmailer.v1.12+json` | SendPro vendor media type. |
|
|
22
|
+
|
|
23
|
+
## Aliases
|
|
24
|
+
|
|
25
|
+
`SPOTLER_SENDPRO_*` and legacy `FLOWMAILER_*` aliases are supported for credential and read-only variables.
|
|
26
|
+
|
|
27
|
+
## Creating Credentials
|
|
28
|
+
|
|
29
|
+
SendPro uses OAuth2 client credentials. Create or locate credentials in the SendPro dashboard under the account setup area for sources/source systems and source credentials/users. Use a dedicated source or credential pair for MCP access where possible.
|
|
30
|
+
|
|
31
|
+
The official API documentation confirms:
|
|
32
|
+
|
|
33
|
+
- `POST https://login.flowmailer.net/oauth/token` requests an access token.
|
|
34
|
+
- `client_id` and `client_secret` are required form fields.
|
|
35
|
+
- `grant_type` must be `client_credentials`.
|
|
36
|
+
- Source credential endpoints are exposed under `/{account_id}/sources/{source_id}/users`.
|
|
37
|
+
|
|
38
|
+
Keep `SENDPRO_READ_ONLY=true` for routine use.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Releasing
|
|
2
|
+
|
|
3
|
+
This project uses semantic versioning and GitHub Releases.
|
|
4
|
+
|
|
5
|
+
## Version Numbers
|
|
6
|
+
|
|
7
|
+
Use `MAJOR.MINOR.PATCH`:
|
|
8
|
+
|
|
9
|
+
- `PATCH`, such as `0.1.1`, for bug fixes, documentation updates worth publishing, dependency maintenance, and non-breaking polish.
|
|
10
|
+
- `MINOR`, such as `0.2.0`, for new backwards-compatible tools, endpoint coverage, or configuration options.
|
|
11
|
+
- `MAJOR`, such as `1.0.0`, for breaking tool schemas, renamed environment variables without aliases, changed defaults that can affect behavior, or removed capabilities.
|
|
12
|
+
|
|
13
|
+
While the package is pre-`1.0.0`, still treat changes carefully. A breaking change should usually move at least the minor version, for example `0.1.0` to `0.2.0`.
|
|
14
|
+
|
|
15
|
+
## Tags and Releases
|
|
16
|
+
|
|
17
|
+
A Git tag marks the exact commit for a version, for example `v0.1.0`.
|
|
18
|
+
|
|
19
|
+
A GitHub Release is built from a tag and adds human-readable release notes plus downloadable source archives. The release is what users see on GitHub; the tag is what Git, npm Git installs, and automation can target.
|
|
20
|
+
|
|
21
|
+
## Checklist
|
|
22
|
+
|
|
23
|
+
1. Make sure `main` is clean and up to date.
|
|
24
|
+
2. Use the repository Node version from `.node-version`:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node --version
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Release tooling expects Node 24. Older Node 20 builds can fail in Vitest/Rolldown before publishing.
|
|
31
|
+
|
|
32
|
+
3. Update `CHANGELOG.md`.
|
|
33
|
+
4. Run:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm run check
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
5. Choose the right version bump:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm run version:patch
|
|
43
|
+
npm run version:minor
|
|
44
|
+
npm run version:major
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
These wrap `npm version` and create a commit plus matching Git tag.
|
|
48
|
+
|
|
49
|
+
6. Push the commit and tag:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git push origin main --follow-tags
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
7. Create a GitHub Release from the tag:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
gh release create vX.Y.Z --title "vX.Y.Z" --notes-file CHANGELOG.md
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
For small releases, writing concise release notes manually is better than pasting the full changelog.
|
|
62
|
+
|
|
63
|
+
8. Publish to npm:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npm publish --access public
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
For future releases, prefer the GitHub Actions release workflow with npm trusted publishing enabled for this repository. Trusted publishing uses OIDC and npm generates provenance automatically for public packages. The workflow skips versions that are already present on npm.
|
|
70
|
+
|
|
71
|
+
9. Verify install:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx -y sendpro-flowmailer-mcp
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Remembering to Version
|
|
78
|
+
|
|
79
|
+
Do not publish or create a release from an unversioned commit. For this repo, a release always means all three line up:
|
|
80
|
+
|
|
81
|
+
- `package.json` version
|
|
82
|
+
- Git tag, such as `v0.1.0`
|
|
83
|
+
- GitHub Release, such as `v0.1.0`
|
|
84
|
+
|
|
85
|
+
If only code changed on `main`, no release version is needed yet. If users should install a new stable version, create a version tag and release.
|