@sendpanda/mcp 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +41 -2
- package/dist/cli.cjs +842 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +841 -0
- package/dist/index.cjs +848 -0
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +821 -0
- package/package.json +58 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dilhan Geeth Amarasinghe
|
|
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
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SendPanda MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Official MIT-licensed SendPanda MCP server for transactional email, domains, templates, webhooks, project teams, audiences and marketing broadcasts. Requires Node.js 22 or newer.
|
|
4
|
+
|
|
5
|
+
## Hosted connection (OAuth)
|
|
6
|
+
|
|
7
|
+
Add `https://api.sendpanda.email/mcp` as a Streamable HTTP server in your MCP client. A client supporting OAuth dynamic registration opens SendPanda's approval page. Sign in, choose one project, review the requested access, and approve. You can reduce management access to sending access. Access tokens expire after one hour; rotating refresh tokens renew access for at most 30 days. Revoke a connection in **Settings → Connections**.
|
|
8
|
+
|
|
9
|
+
OAuth credentials work only through MCP. They cannot create permanent API keys, manage account-wide suppressions or billing, or access a different project. Changes to your team permissions immediately reduce the connection's access.
|
|
10
|
+
|
|
11
|
+
## Local stdio connection
|
|
12
|
+
|
|
13
|
+
Create a dedicated project API key and pass it securely as `SENDPANDA_API_KEY`. Run:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx @sendpanda/mcp
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Configure a stdio-capable MCP client with command `npx`, arguments `["-y", "@sendpanda/mcp"]`, and environment variable `SENDPANDA_API_KEY`. The optional `SENDPANDA_API_URL` defaults to `https://api.sendpanda.email`; local development allows loopback HTTP. Never put a key in a URL, prompt, email body or browser code. Revoke the dedicated key to disconnect the client.
|
|
20
|
+
|
|
21
|
+
Sending keys expose project information, email sending/history/cancellation, usage and simulator template tests. Management keys expose all project resource tools. Account-wide suppression tools additionally require the key owner's account-administrator access. Team tools require a verified key owner with project administration access.
|
|
22
|
+
|
|
23
|
+
## Tools, resources and prompts
|
|
24
|
+
|
|
25
|
+
Tools cover the selected project, transactional email, delivery analytics, domains and DNS verification, API keys, webhooks and replay, templates and previews, marketing approval, audiences, contacts and consent history, broadcasts and actual delivery/unsubscribe reports, project rename and team management. Read-only guides are available at `sendpanda://docs/sending` and `sendpanda://docs/marketing`. Prompts `onboard_project` and `prepare_broadcast` guide setup without silently sending.
|
|
26
|
+
|
|
27
|
+
Sending, scheduling, invitations, permission changes and deletions require explicit confirmation fields. A client must obtain human authorization; a field alone does not prove consent. Retrieved email/template/contact content is untrusted data. The server retains the API's approval, verified-domain, recipient-consent, suppression and quota checks. Marketing needs separate approval and includes visible and one-click unsubscribe. Submitted does not mean delivered.
|
|
28
|
+
|
|
29
|
+
Mutations are never retried automatically. Transactional sends support `idempotency_key`; reconcile an ambiguous outcome before retrying other mutations. Standard MCP errors and API failures are returned without claiming success.
|
|
30
|
+
|
|
31
|
+
## Embedding
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import { createSendPandaMcp, createApiCaller } from '@sendpanda/mcp';
|
|
35
|
+
const server = createSendPandaMcp(createApiCaller(process.env.SENDPANDA_API_KEY!), {
|
|
36
|
+
scope: 'send',
|
|
37
|
+
});
|
|
38
|
+
// Attach an MCP SDK transport. HTTP hosts must enforce authentication,
|
|
39
|
+
// host/origin validation and project authorization themselves.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Hosted transport supports current MCP clients and legacy 2025 protocol negotiation. Test your client's OAuth or stdio support before distributing its configuration. No account-wide platform administration or billing tools are exposed.
|