@mailkite/mcp 0.9.0 → 0.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailkite/mcp",
3
- "version": "0.9.0",
3
+ "version": "0.10.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.9.0"
43
+ "mailkite": "^0.10.0"
44
44
  }
45
45
  }
package/spec/TODO.md ADDED
@@ -0,0 +1,36 @@
1
+ # Spec TODO — propagate pending changes
2
+
3
+ Visible checklist for spec changes that are **documented in `api.json` but not yet fully
4
+ propagated** to the hand-written SDKs / plugin / registries. Clear an item once it ships.
5
+
6
+ ## `listMessages` + `listListContacts` — optional `before` / `limit` paging
7
+
8
+ **Status (2026-06-28):** documented in `api.json` (method `summary` + a structured
9
+ `optionalQuery` field) and live on the API (`GET /api/messages`, `GET /api/lists/:id/contacts`
10
+ honor `before`/`limit`; response stays a **bare array**, default = pre-pagination behavior).
11
+
12
+ ### ✅ Done
13
+
14
+ - [x] All **6 server SDKs** expose optional `before`/`limit` (idiomatic per language: positional
15
+ optional in node/python/ruby/php, boxed-nullable overloads in java, functional options
16
+ `mailkite.Before()/Limit()` in go). Backward compatible — no-arg calls unchanged.
17
+ - [x] Each conformance runner forwards them + `cases.json` exercises real values;
18
+ `cd sdks/conformance && node run.mjs` → **55/55 across all 6**.
19
+ - [x] **CLI** `messages list --before --limit`.
20
+ - [x] SDK docs regenerated (`node sdks/scripts/build-sdk-docs.mjs`) — server-SDK method pages list
21
+ the optional params (client libs intentionally skipped; they don't expose them, see below).
22
+
23
+ ### ⏳ Still deferred (kept optional + low-value / blocked)
24
+
25
+ These need optional-query-param support that doesn't exist yet, and the API tree is mid-refactor
26
+ (another agent), so the hosted-MCP redeploy is held.
27
+
28
+ - [ ] Add optional-query support to `sdks/clients/codegen.mjs` so the **4 client libs**
29
+ (TS/Kotlin/Flutter/Swift) emit `before?`/`limit?`, then regen.
30
+ - [ ] Both MCP servers expose them as **optional** tool inputs — needs `tools.ts` +
31
+ `sdks/mcp/server.mjs` to stop forcing `in:"query"` args into `required`. Hosted MCP also
32
+ needs `cd api && npm run deploy` from a clean tree.
33
+ - [ ] Claude Code **plugin** (`plugin/`) refresh if it pins tool schemas.
34
+
35
+ > Until those land, MCP/client-lib users reach `before`/`limit` via the low-level `request()`
36
+ > escape hatch (`GET /api/messages?before=…&limit=…`).
package/spec/api.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailkite",
3
- "version": "0.9.0",
3
+ "version": "0.10.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": {
@@ -305,12 +305,16 @@
305
305
  },
306
306
  {
307
307
  "name": "listMessages",
308
- "summary": "List stored messages.",
308
+ "summary": "List stored messages, newest first. Optionally page with `before` (a `received_at` cursor) and `limit`; omit both for the default newest 100. Response is a bare array — paginate by passing the last row's `received_at` as the next `before`.",
309
309
  "http": {
310
310
  "method": "GET",
311
311
  "path": "/api/messages"
312
312
  },
313
313
  "args": [],
314
+ "optionalQuery": [
315
+ { "name": "before", "type": "integer", "description": "Cursor: return only messages with `received_at` strictly less than this (epoch ms). Omit for the first page." },
316
+ { "name": "limit", "type": "integer", "description": "Max rows to return, 1–200. Omitted = newest 100 (the pre-pagination default)." }
317
+ ],
314
318
  "returns": "any"
315
319
  },
316
320
  {
@@ -421,7 +425,7 @@
421
425
  },
422
426
  {
423
427
  "name": "listListContacts",
424
- "summary": "List the contacts that are members of a list.",
428
+ "summary": "List the contacts that are members of a list, newest first. Optionally page with `before` (a `last_seen_at`/`created_at` cursor) and `limit`. Response is a bare array — paginate by passing the last row's `last_seen_at` (or `created_at`) as the next `before`.",
425
429
  "http": {
426
430
  "method": "GET",
427
431
  "path": "/api/lists/{id}/contacts"
@@ -432,6 +436,10 @@
432
436
  "in": "path"
433
437
  }
434
438
  ],
439
+ "optionalQuery": [
440
+ { "name": "before", "type": "integer", "description": "Cursor: return only members with `last_seen_at` (or `created_at`) strictly less than this (epoch ms). Omit for the first page." },
441
+ { "name": "limit", "type": "integer", "description": "Max rows to return (default 100, max 500)." }
442
+ ],
435
443
  "returns": "any"
436
444
  },
437
445
  {
package/spec/cases.json CHANGED
@@ -630,7 +630,10 @@
630
630
  {
631
631
  "name": "list_messages",
632
632
  "method": "listMessages",
633
- "args": {},
633
+ "args": {
634
+ "before": 1717000000000,
635
+ "limit": 50
636
+ },
634
637
  "request": {
635
638
  "method": "GET",
636
639
  "path": "/api/messages"
@@ -824,7 +827,9 @@
824
827
  "name": "list_list_contacts",
825
828
  "method": "listListContacts",
826
829
  "args": {
827
- "id": "lst_1"
830
+ "id": "lst_1",
831
+ "before": 1717000000000,
832
+ "limit": 25
828
833
  },
829
834
  "request": {
830
835
  "method": "GET",