@mailkite/mcp 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -85
- package/package.json +2 -2
- package/spec/api.json +1 -1
package/README.md
CHANGED
|
@@ -1,38 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
>
|
|
19
|
-
>
|
|
20
|
-
>
|
|
21
|
-
|
|
22
|
-
>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
> CI** use, a stdio-only client, a custom `MAILKITE_BASE_URL`, or `verifyWebhook` to run
|
|
29
|
-
> fully locally. Both expose the exact same tools (same `../spec`).
|
|
30
|
-
|
|
31
|
-
## Install / configure
|
|
32
|
-
|
|
33
|
-
Point your MCP client at the server and give it your MailKite credential. The
|
|
34
|
-
token is the same one the SDKs take: an `mk_live_…` API key (for sending) or a
|
|
35
|
-
management session token.
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://mailkite.dev">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://mailkite.dev/brand/logo-email-dark.png">
|
|
5
|
+
<img src="https://mailkite.dev/brand/logo-email.png" alt="MailKite" height="56">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
<h1 align="center">@mailkite/mcp</h1>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<b>Email for every product you ship</b> — receive email as a webhook, send over a verified domain, give an AI agent its own inbox.
|
|
14
|
+
<br>The official <a href="https://mailkite.dev">MailKite</a> library for AI agents (MCP).
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://mailkite.dev/docs">Docs</a> ·
|
|
19
|
+
<a href="https://mailkite.dev/docs/libraries#mcp">Library guide</a> ·
|
|
20
|
+
<a href="https://mailkite.dev">mailkite.dev</a> ·
|
|
21
|
+
<a href="https://mailkite.dev/docs/ai-agents">AI agents</a>
|
|
22
|
+
</p>
|
|
23
|
+
<p align="center"><a href="https://www.npmjs.com/package/@mailkite/mcp"><img src="https://img.shields.io/npm/v/@mailkite/mcp?color=2563eb&label=npm" alt="npm"></a></p>
|
|
24
|
+
|
|
25
|
+
> **Read-only mirror.** This repo is a generated, release-time mirror of the MailKite monorepo (the private source of truth) — development doesn't happen here. Install from npm and open issues against the [MailKite docs](https://mailkite.dev/docs).
|
|
26
|
+
|
|
27
|
+
## Install
|
|
36
28
|
|
|
37
29
|
```json
|
|
38
30
|
{
|
|
@@ -46,63 +38,63 @@ management session token.
|
|
|
46
38
|
}
|
|
47
39
|
```
|
|
48
40
|
|
|
49
|
-
| Env var | Required | Default | Notes |
|
|
50
|
-
| --- | --- | --- | --- |
|
|
51
|
-
| `MAILKITE_API_KEY` | yes | — | Bearer credential (`mk_live_…` API key or session token) |
|
|
52
|
-
| `MAILKITE_BASE_URL` | no | `https://api.mailkite.dev` | Override for local/staging |
|
|
53
|
-
|
|
54
41
|
## Tools
|
|
55
42
|
|
|
56
|
-
One tool per MailKite API
|
|
57
|
-
|
|
58
|
-
| Tool | Operation |
|
|
59
|
-
| --- | --- |
|
|
60
|
-
| `mailkite_send` | Send a message over a verified domain |
|
|
61
|
-
| `mailkite_agent` | Send a message to an inbox agent and get its reply |
|
|
62
|
-
| `mailkite_route` | Route a message to a registered route and run its action |
|
|
63
|
-
| `mailkite_list_domains` | List your domains |
|
|
64
|
-
| `mailkite_create_domain` | Add a domain (returns DNS records) |
|
|
65
|
-
| `mailkite_get_domain` | Get one domain with DNS + webhook |
|
|
66
|
-
| `mailkite_delete_domain` | Remove a domain |
|
|
67
|
-
| `mailkite_verify_domain` | Check DNS and update status |
|
|
68
|
-
| `mailkite_set_webhook` | Set/replace the domain catch-all webhook |
|
|
69
|
-
| `mailkite_delete_webhook` | Remove the domain webhook |
|
|
70
|
-
| `mailkite_test_webhook` | Send a signed test event to the webhook |
|
|
71
|
-
| `mailkite_list_routes` | List inbound routing rules |
|
|
72
|
-
| `mailkite_create_route` | Create a route (match, action, destination) |
|
|
73
|
-
| `mailkite_list_messages` | List stored messages |
|
|
74
|
-
| `mailkite_get_message` | Get a message with deliveries + attachments |
|
|
75
|
-
| `mailkite_retry_delivery` | Re-deliver a stored message to its webhook |
|
|
76
|
-
| `mailkite_verify_webhook` | Verify an `x-mailkite-signature` header (local — no API call) |
|
|
77
|
-
|
|
78
|
-
`mailkite_verify_webhook` is a **local** tool: it runs the SDK's `verifyWebhook`
|
|
79
|
-
in-process (no credential, no network) and returns `{ "valid": true | false }`.
|
|
80
|
-
Every other tool is one MailKite API operation.
|
|
81
|
-
|
|
82
|
-
Each tool's input is a flat object with the real field names (e.g.
|
|
83
|
-
`mailkite_send` takes `from`, `to`, `subject`, `html`, `text`, …). Required
|
|
84
|
-
fields and types are enforced with [`ajv`](https://ajv.js.org) against the same
|
|
85
|
-
JSON Schemas in [`../spec/schemas`](../spec/schemas) that the SDKs and
|
|
86
|
-
conformance harness use — invalid calls are rejected before any HTTP request.
|
|
87
|
-
|
|
88
|
-
## How it works
|
|
43
|
+
One tool per MailKite API method, generated from the shared contract — including `mailkite_send`, `mailkite_semantic_search`, `mailkite_agent`, domain/route/webhook management, and more. Full list + schemas: **https://mailkite.dev/docs/libraries#mcp**.
|
|
89
44
|
|
|
90
|
-
|
|
91
|
-
api.json ──▶ one MCP tool per method (name, description, input schema)
|
|
92
|
-
schemas/* ──▶ ajv validators (validate the call before dispatch)
|
|
93
|
-
Node SDK ──▶ MailKite.request(method, path, body) (auth, HTTP, errors)
|
|
94
|
-
local methods (verifyWebhook) dispatch in-process — no HTTP
|
|
95
|
-
```
|
|
45
|
+
## Use it from an AI agent — MCP + Agent connectors
|
|
96
46
|
|
|
97
|
-
|
|
47
|
+
MailKite speaks the [Model Context Protocol](https://modelcontextprotocol.io): every API method is a tool your AI assistant (Claude, Cursor, …) can call — send mail, manage domains, search the docs, and give an agent its own inbox. Full guide: **[https://mailkite.dev/docs/ai-agents](https://mailkite.dev/docs/ai-agents)**.
|
|
98
48
|
|
|
99
|
-
|
|
49
|
+
**Hosted (recommended) — one-click OAuth, no key to copy:**
|
|
100
50
|
|
|
101
51
|
```bash
|
|
102
|
-
|
|
103
|
-
|
|
52
|
+
claude mcp add --transport http mailkite https://mcp.mailkite.dev/mcp
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
In Claude Code you can also install the plugin:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
/plugin marketplace add mailkite/claude-code
|
|
59
|
+
/plugin install mailkite@mailkite
|
|
104
60
|
```
|
|
105
61
|
|
|
106
|
-
|
|
62
|
+
Any chat/UI agent: *"Add the MCP server at https://mcp.mailkite.dev/mcp and authenticate in the browser when prompted."*
|
|
63
|
+
|
|
64
|
+
**Local (static key, offline / CI):**
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{ "mcpServers": { "mailkite": { "command": "npx", "args": ["-y", "@mailkite/mcp"], "env": { "MAILKITE_API_KEY": "mk_live_…" } } } }
|
|
68
|
+
```
|
|
107
69
|
|
|
108
|
-
|
|
70
|
+
**Give an agent its own inbox.** Route inbound mail to a built-in **inbox agent** (the `agent` route action) and it answers, files, or escalates on its own — see [https://mailkite.dev/docs/ai-agents](https://mailkite.dev/docs/ai-agents).
|
|
71
|
+
|
|
72
|
+
## All MailKite libraries
|
|
73
|
+
|
|
74
|
+
Same contract, every language — pick the one for your stack (full list: [https://mailkite.dev/docs/libraries](https://mailkite.dev/docs/libraries)):
|
|
75
|
+
|
|
76
|
+
| Library | Repo | Distribution |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| MailKite for Node.js | [`mailkite-node`](https://github.com/mailkite/mailkite-node) | npm |
|
|
79
|
+
| MailKite for Python | [`mailkite-python`](https://github.com/mailkite/mailkite-python) | PyPI |
|
|
80
|
+
| MailKite for Ruby | [`mailkite-ruby`](https://github.com/mailkite/mailkite-ruby) | RubyGems |
|
|
81
|
+
| MailKite for Java | [`mailkite-java`](https://github.com/mailkite/mailkite-java) | Maven Central |
|
|
82
|
+
| MailKite for PHP | [`mailkite-php`](https://github.com/mailkite/mailkite-php) | Packagist |
|
|
83
|
+
| MailKite for Go | [`mailkite-go`](https://github.com/mailkite/mailkite-go) | Go modules |
|
|
84
|
+
| @mailkite/cli | [`mailkite-cli`](https://github.com/mailkite/mailkite-cli) | npm |
|
|
85
|
+
| @mailkite/mcp **(this repo)** | [`mailkite-mcp`](https://github.com/mailkite/mailkite-mcp) | npm |
|
|
86
|
+
| @mailkite/client | [`mailkite-js`](https://github.com/mailkite/mailkite-js) | npm |
|
|
87
|
+
| @mailkite/expo | [`mailkite-expo`](https://github.com/mailkite/mailkite-expo) | npm |
|
|
88
|
+
| MailKiteClient | [`mailkite-swift`](https://github.com/mailkite/mailkite-swift) | Swift Package Manager |
|
|
89
|
+
| dev.mailkite:mailkite-client | [`mailkite-kotlin`](https://github.com/mailkite/mailkite-kotlin) | Maven Central |
|
|
90
|
+
| mailkite_client | [`mailkite-flutter`](https://github.com/mailkite/mailkite-flutter) | pub.dev |
|
|
91
|
+
|
|
92
|
+
## Docs & links
|
|
93
|
+
|
|
94
|
+
- 📚 **Documentation:** https://mailkite.dev/docs
|
|
95
|
+
- 📦 **This library's guide:** https://mailkite.dev/docs/libraries#mcp
|
|
96
|
+
- 🤖 **AI agents (MCP + inbox agents):** https://mailkite.dev/docs/ai-agents
|
|
97
|
+
- 🌐 **Website:** https://mailkite.dev
|
|
98
|
+
- 🧭 **All libraries:** https://mailkite.dev/docs/libraries
|
|
99
|
+
|
|
100
|
+
<sub>Generated from the shared MailKite API contract. © MailKite.</sub>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailkite/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Model Context Protocol server for MailKite — exposes the MailKite API to LLM agents as tools. A thin layer over the MailKite Node SDK and the shared sdks/spec contract.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -40,6 +40,6 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
42
42
|
"ajv": "^8.17.1",
|
|
43
|
-
"mailkite": "^0.
|
|
43
|
+
"mailkite": "^0.9.0"
|
|
44
44
|
}
|
|
45
45
|
}
|
package/spec/api.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mailkite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Canonical interface contract for every MailKite SDK. One low-level request() plus one function per endpoint. All languages expose the same shape; only naming adapts to each language's convention (e.g. Go exports PascalCase).",
|
|
5
5
|
"baseUrl": "https://api.mailkite.dev",
|
|
6
6
|
"auth": {
|