@codespar/mcp-sendgrid 0.2.0 → 0.2.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/README.md CHANGED
@@ -9,21 +9,30 @@ SendGrid is Twilio-owned (acquired 2019). Together with [`@codespar/mcp-twilio`]
9
9
 
10
10
  Agents building commerce notification flows — order confirmations, shipping updates, abandoned-cart nudges, promos — can now cover every channel through two packages.
11
11
 
12
- ## Tools
12
+ ## Tools (20)
13
13
 
14
14
  | Tool | Purpose |
15
- |------|---------|
16
- | `send_mail` | `POST /mail/send` — personalizations, content, attachments, scheduling |
17
- | `send_template` | `POST /mail/send` using a dynamic template (`d-...`) — convenience wrapper |
18
- | `add_contact` | `PUT /marketing/contacts` upsert contacts (async job), assign to lists |
19
- | `list_contacts` | `GET /marketing/contacts` — sample of contacts |
20
- | `delete_contact` | `DELETE /marketing/contacts?ids=...` — delete by id or wipe all |
21
- | `search_contacts` | `POST /marketing/contacts/search` — SGQL (SendGrid SQL-like) query |
22
- | `list_templates` | `GET /templates` dynamic (default) or legacy transactional templates |
23
- | `create_template` | `POST /templates` create a transactional template |
24
- | `list_suppressions` | `GET /asm/groups/{group_id}/suppressions` suppressed emails for a group |
25
- | `add_suppression` | `POST /asm/groups/{group_id}/suppressions` — add suppressions |
26
- | `get_stats` | `GET /stats` sent / delivered / opens / clicks aggregated by day/week/month |
15
+ |---|---|
16
+ | `send_mail` | Send an email via POST /mail/send. |
17
+ | `send_template` | Convenience wrapper for POST /mail/send with a dynamic template. |
18
+ | `add_contact` | Upsert contacts in Marketing Campaigns via PUT /marketing/contacts. |
19
+ | `list_contacts` | List Marketing Campaigns contacts via GET /marketing/contacts. |
20
+ | `delete_contact` | Delete contacts by id via DELETE /marketing/contacts?ids=.... |
21
+ | `search_contacts` | Search contacts with an SGQL query via POST /marketing/contacts/search. |
22
+ | `get_contact` | Retrieve a single Marketing Campaigns contact by id via GET /marketing/contacts/{id}. |
23
+ | `list_lists` | List all Marketing Campaigns contact lists via GET /marketing/lists. |
24
+ | `create_list` | Create a Marketing Campaigns contact list via POST /marketing/lists. |
25
+ | `delete_list` | Delete a Marketing Campaigns contact list via DELETE /marketing/lists/{id}. |
26
+ | `list_templates` | List transactional templates via GET /templates. |
27
+ | `create_template` | Create a transactional template via POST /templates. |
28
+ | `list_suppressions` | List all suppressed recipients for an unsubscribe group via GET /asm/groups/{group_id}/suppressions. |
29
+ | `add_suppression` | Add recipients to a suppression group via POST /asm/groups/{group_id}/suppressions. |
30
+ | `list_unsubscribe_groups` | List all unsubscribe groups on the account via GET /asm/groups. |
31
+ | `get_bounces` | Retrieve bounced recipients via GET /suppression/bounces. |
32
+ | `delete_bounce` | Remove a bounced address from the bounce suppression list via DELETE /suppression/bounces/{email}. |
33
+ | `cancel_scheduled_send` | Cancel or pause a scheduled send by batch_id via POST /user/scheduled_sends. |
34
+ | `get_event_webhook_settings` | Retrieve the Event Webhook configuration via GET /user/webhooks/event/settings. |
35
+ | `get_stats` | Global email stats via GET /stats. |
27
36
 
28
37
  ## Install
29
38
 
package/dist/index.js CHANGED
@@ -92,7 +92,7 @@ function buildQuery(params) {
92
92
  const s = q.toString();
93
93
  return s ? `?${s}` : "";
94
94
  }
95
- const server = new Server({ name: "mcp-sendgrid", version: "0.2.0" }, { capabilities: { tools: {} } });
95
+ const server = new Server({ name: "mcp-sendgrid", version: "0.2.1" }, { capabilities: { tools: {} } });
96
96
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
97
97
  tools: [
98
98
  {
@@ -518,7 +518,7 @@ async function main() {
518
518
  const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
519
519
  t.onclose = () => { if (t.sessionId)
520
520
  transports.delete(t.sessionId); };
521
- const s = new Server({ name: "mcp-sendgrid", version: "0.2.0" }, { capabilities: { tools: {} } });
521
+ const s = new Server({ name: "mcp-sendgrid", version: "0.2.1" }, { capabilities: { tools: {} } });
522
522
  server._requestHandlers.forEach((v, k) => s._requestHandlers.set(k, v));
523
523
  server._notificationHandlers?.forEach((v, k) => s._notificationHandlers.set(k, v));
524
524
  await s.connect(t);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codespar/mcp-sendgrid",
3
- "version": "0.2.0",
4
- "description": "MCP server for SendGrid global transactional + marketing email (Twilio-owned). Pairs with @codespar/mcp-twilio for full messaging coverage.",
3
+ "version": "0.2.1",
4
+ "description": "MCP server for SendGrid \u2014 global transactional + marketing email (Twilio-owned). Pairs with @codespar/mcp-twilio for full messaging coverage.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "bin": {
package/server.json CHANGED
@@ -7,12 +7,12 @@
7
7
  "source": "github",
8
8
  "subfolder": "packages/communication/sendgrid"
9
9
  },
10
- "version": "0.2.0",
10
+ "version": "0.2.1",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "@codespar/mcp-sendgrid",
15
- "version": "0.2.0",
15
+ "version": "0.2.1",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },
package/src/index.ts CHANGED
@@ -105,7 +105,7 @@ function buildQuery(params: Record<string, unknown>): string {
105
105
  }
106
106
 
107
107
  const server = new Server(
108
- { name: "mcp-sendgrid", version: "0.2.0" },
108
+ { name: "mcp-sendgrid", version: "0.2.1" },
109
109
  { capabilities: { tools: {} } }
110
110
  );
111
111
 
@@ -512,7 +512,7 @@ async function main() {
512
512
  if (!sid && isInitializeRequest(req.body)) {
513
513
  const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
514
514
  t.onclose = () => { if (t.sessionId) transports.delete(t.sessionId); };
515
- const s = new Server({ name: "mcp-sendgrid", version: "0.2.0" }, { capabilities: { tools: {} } });
515
+ const s = new Server({ name: "mcp-sendgrid", version: "0.2.1" }, { capabilities: { tools: {} } });
516
516
  (server as unknown as { _requestHandlers: Map<unknown, unknown> })._requestHandlers.forEach((v, k) => (s as unknown as { _requestHandlers: Map<unknown, unknown> })._requestHandlers.set(k, v));
517
517
  (server as unknown as { _notificationHandlers?: Map<unknown, unknown> })._notificationHandlers?.forEach((v, k) => (s as unknown as { _notificationHandlers: Map<unknown, unknown> })._notificationHandlers.set(k, v));
518
518
  await s.connect(t);