@kaminari-ad/mcp 0.2.0 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -7,6 +7,96 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.2] - 2026-05-20
11
+
12
+ Minor release — adds one-click install paths for Cursor and Claude
13
+ Desktop. No tool surface change, no breaking API behaviour change.
14
+
15
+ ### Added
16
+
17
+ - **Claude Desktop `.mcpb` extension bundle.** Each tag release now
18
+ builds a single-file `kaminari-ad-mcp.mcpb` (via the new
19
+ `tsup.mcpb.config.ts` + `mcpb pack`) and uploads it to the GitHub
20
+ Release. Stable download URL:
21
+ <https://github.com/kaminari-ad/mcp/releases/latest/download/kaminari-ad-mcp.mcpb>.
22
+ Double-click installs into Claude Desktop with a config form for
23
+ the API key and a ToS-acceptance checkbox.
24
+ - **Cursor one-click install badge.** README and the Kaminari Ad
25
+ marketing site link the official Cursor "Install in Cursor" badge
26
+ to a trampoline page (`https://kaminari.ad/mcp/install`) that
27
+ redirects to the `cursor://anysphere.cursor-deeplink/mcp/install`
28
+ URL with the npx-based stdio config pre-encoded.
29
+ - **`server.json`** for [registry.modelcontextprotocol.io][mcp-reg]
30
+ listing. Surface (npm stdio package, env vars) mirrors what the
31
+ README documents.
32
+
33
+ [mcp-reg]: https://registry.modelcontextprotocol.io
34
+
35
+ ## [0.2.1] - 2026-05-18
36
+
37
+ Patch release — clear Node-version error message, correct `engines`
38
+ declaration, and the default API URL is now the real API host. No
39
+ tool surface change.
40
+
41
+ ### Fixed
42
+
43
+ - **Default `KAMINARI_AD_API_URL` pointed at the wrong host.**
44
+ v0.2.0 defaulted to `https://kaminari.ad`, which is the marketing
45
+ landing page — `kaminari.ad` does NOT serve `/api/v1/*` routes
46
+ (returns HTTP 404 for every tool call). The actual API host is
47
+ `https://app.kaminari.ad` (note the `app.` subdomain).
48
+ Users who set `KAMINARI_AD_API_URL` explicitly were unaffected;
49
+ users who relied on the default got 404 on every tool call. The
50
+ internal `gen-api-types` script already used the correct host
51
+ (`app.kaminari.ad`) for OpenAPI generation — only the runtime
52
+ default drifted. Now corrected here, in `.env.example`, and pinned
53
+ by a unit test against future regressions.
54
+ - **Cryptic `webidl.util.markAsUncloneable is not a function`
55
+ startup crash on Node < 22.19.** The underlying `undici@8.x`
56
+ removed feature probes in v8.0.3 and now imports `markAsUncloneable`
57
+ unconditionally — that symbol only exists on Node 22.19+. v0.2.0
58
+ declared `engines.node = ">=22.13.0"`, so npm warned but did not
59
+ block install on Node 22.13–22.18 or Node 20; users hit the
60
+ cryptic webidl error at first invocation.
61
+ - `engines.node` bumped to `>=22.19.0` to match the real floor.
62
+ Consumers with `engine-strict=true` (or `npm install
63
+ --engine-strict`) are now blocked at install time with a clear
64
+ `EBADENGINE` message.
65
+ - New runtime preflight in `bin.ts::main()` catches the case where
66
+ install slipped through (npx pulls fresh on every run; npx does
67
+ not honour `engine-strict` by default). Prints a clean message
68
+ and exits with code 2, BEFORE any dynamic import pulls undici:
69
+
70
+ ```
71
+ @kaminari-ad/mcp requires Node.js >=22.19.0 (you have v20.x.x).
72
+ The underlying undici 8.x HTTP client uses markAsUncloneable
73
+ from node:worker_threads, available only on Node 22.19+.
74
+ Older Node crashes at import time with the cryptic message
75
+ `webidl.util.markAsUncloneable is not a function`.
76
+
77
+ Please upgrade Node and re-run: https://nodejs.org/en/download
78
+ ```
79
+
80
+ ### Internal
81
+
82
+ - `tsup.config.ts` flipped to `splitting: true`. Required for the
83
+ preflight to actually run before undici loads: without splitting
84
+ esbuild inlines every dynamic `await import("./presentation/...")`
85
+ call into the top-level bundle, eagerly importing undici/MCP SDK/
86
+ pino at startup. With splitting on, transport bootstraps stay as
87
+ separate chunks loaded only after `main()` runs the Node check.
88
+ - `scripts/check-bundle-size.ts` rewritten to aggregate every
89
+ runtime `.js` chunk under `dist/` instead of just `dist/bin.js`.
90
+ With splitting on, `bin.js` is a thin ~5 KB preflight + dispatch
91
+ shim and the actual shipping cost lives in the transport / vendor
92
+ chunks. Total artifact: 173 KB across 5 chunks (smaller than
93
+ v0.2.0's 218 KB monolithic bundle thanks to tree-shaking now seeing
94
+ each chunk in isolation). Limit unchanged at 500 KB.
95
+ - `src/shared/check-node-version.ts` — pure function extracted from
96
+ `bin.ts` so the version preflight can be unit-tested without
97
+ `process.exit` side effects. Test pins all boundary cases (22.18 /
98
+ 22.19 / 22.20 / 23.x / 20.x / prerelease tags / garbage input).
99
+
10
100
  ## [0.2.0] - 2026-05-17
11
101
 
12
102
  Comprehensive parser-drift sweep across all `/api/v1/*` list
@@ -571,7 +661,9 @@ Initial public release. The first version that ships to npm under
571
661
  need them.
572
662
  - Invoice PDF fetcher — same reason.
573
663
 
574
- [Unreleased]: https://github.com/kaminari-ad/mcp/compare/v0.1.5...HEAD
664
+ [Unreleased]: https://github.com/kaminari-ad/mcp/compare/v0.2.1...HEAD
665
+ [0.2.1]: https://github.com/kaminari-ad/mcp/compare/v0.2.0...v0.2.1
666
+ [0.2.0]: https://github.com/kaminari-ad/mcp/compare/v0.1.5...v0.2.0
575
667
  [0.1.5]: https://github.com/kaminari-ad/mcp/compare/v0.1.0...v0.1.5
576
668
  [0.1.4]: https://github.com/kaminari-ad/mcp/compare/v0.1.0...v0.1.4
577
669
  [0.1.3]: https://github.com/kaminari-ad/mcp/compare/v0.1.0...v0.1.3
package/README.md CHANGED
@@ -1,13 +1,35 @@
1
1
  # `@kaminari-ad/mcp`
2
2
 
3
- Official Model Context Protocol (MCP) server for [Kaminari Ad](https://kaminari.ad) — the ad verification platform from the team behind [Kaminari.Click](https://kaminari.click).
3
+ Official Model Context Protocol (MCP) server for [Kaminari Ad](https://kaminari.ad) — the ad verification platform from the team behind [Kaminari Click](https://kaminari.click).
4
4
 
5
5
  Lets AI agents (Cursor, Claude Desktop, Cline, and any MCP-compatible client) launch scans, inspect results, manage campaigns and policies, and read alerts directly against your Kaminari Ad workspace via your API key.
6
6
 
7
- [![npm](https://img.shields.io/npm/v/@kaminari-ad/mcp.svg)](https://www.npmjs.com/package/@kaminari-ad/mcp)
8
- [![CI](https://github.com/kaminari-ad/mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/kaminari-ad/mcp/actions/workflows/ci.yml)
7
+ [![npm version](https://img.shields.io/npm/v/@kaminari-ad/mcp)](https://www.npmjs.com/package/@kaminari-ad/mcp)
8
+ [![npm downloads](https://img.shields.io/npm/dm/@kaminari-ad/mcp)](https://www.npmjs.com/package/@kaminari-ad/mcp)
9
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
10
+ [![node](https://img.shields.io/node/v/@kaminari-ad/mcp)](https://nodejs.org)
11
+ [![CI](https://github.com/kaminari-ad/mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/kaminari-ad/mcp/actions/workflows/ci.yml)
10
12
  [![Provenance](https://img.shields.io/npm/v/@kaminari-ad/mcp?label=provenance&logo=github)](https://www.npmjs.com/package/@kaminari-ad/mcp)
13
+ [![MCP Registry](https://img.shields.io/badge/MCP_Registry-listed-blue)](https://registry.modelcontextprotocol.io)
14
+
15
+ ## Install (one click)
16
+
17
+ ### Cursor
18
+
19
+ <a href="https://kaminari.ad/mcp/install"><img alt="Install in Cursor" src="https://cursor.com/deeplink/mcp-install-dark.png" height="32" /></a>
20
+
21
+ ### Claude Desktop
22
+
23
+ [**Download `kaminari-ad-mcp.mcpb`**](https://github.com/kaminari-ad/mcp/releases/latest/download/kaminari-ad-mcp.mcpb) → double-click to install. Claude Desktop shows a config form for your API key.
24
+
25
+ ### Claude Code (CLI)
26
+
27
+ ```bash
28
+ claude mcp add kaminari-ad -- npx -y @kaminari-ad/mcp
29
+ export KAMINARI_AD_API_KEY=your-key
30
+ ```
31
+
32
+ Full installation docs — see [Quick start](#quick-start) below.
11
33
 
12
34
  ---
13
35
 
@@ -67,11 +89,11 @@ For cloud agents or clients without a local Node runtime, point at the hosted en
67
89
  83 tools mirroring most of the public `/api/v1` surface of Kaminari Ad. Every tool carries MCP behaviour annotations (`title`, `readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) so MCP clients can warn before destructive actions. Highlights:
68
90
 
69
91
  - **Account** (11) — `get_account`, `update_org`, `list_org_users`, `invite_user`, `update_user_role`, `remove_user`, `transfer_ownership`, `list_org_roles`, `list_api_keys`, `create_api_key`, `revoke_api_key`
70
- - **Scans** (7) — `list_scans`, `get_scan`, `create_scan`, `create_bulk_scans`, `recheck_scans`, `cancel_scan`, `list_scan_tags`
92
+ - **Scans** (6) — `list_scans`, `get_scan`, `create_scan`, `create_bulk_scans`, `recheck_scans`, `cancel_scan`
71
93
  - **Campaigns** (10) — `list_campaigns`, `list_campaigns_picker`, `get_campaign`, `create_campaign`, `update_campaign`, `archive_campaign`, `unarchive_campaign`, `cancel_campaign`, `run_campaign`, `list_campaign_runs`
72
94
  - **Campaign groups** (10) — list/get/create/update/run/cancel/archive/unarchive + `pause_campaign_group_schedule`, `resume_campaign_group_schedule`
73
95
  - **Runs** (3) — `get_run`, `list_run_scans`, `cancel_run` (use `list_campaign_runs` to enumerate runs of a campaign — the API has no standalone `/runs` index)
74
- - **Tags** (4) — `list_tags`, `get_tag_definition`, `update_tag_definition`, `delete_tag_definition`
96
+ - **Tags** (5) — `list_tags`, `get_tag_definition`, `update_tag_definition`, `delete_tag_definition`, `list_scan_tags`
75
97
  - **Custom rules** (6) — `list_custom_rules`, `get_custom_rule`, `create_custom_rule`, `update_custom_rule`, `delete_custom_rule`, `test_custom_rule`
76
98
  - **Policy sets** (6) — `list_policy_sets`, `get_policy_set`, `create_policy_set`, `update_policy_set`, `delete_policy_set`, `request_policy_set_approval`
77
99
  - **Alerts** (3) — `list_alerts`, `update_alert_status`, `get_alert_stats`
@@ -121,7 +143,7 @@ make test-unit # unit only
121
143
  make test-isolation # tenant-isolation suite
122
144
  ```
123
145
 
124
- Or directly with `npm` if you have Node 22 LTS on the host (matches `.nvmrc` / `engines.node`):
146
+ Or directly with `npm` if you have Node `>=22.19.0` on the host (matches `engines.node`; `.nvmrc` pins the minor for dev parity with CI). The package gates strictly at `22.19.0` because `undici@8.x` requires `markAsUncloneable` from `node:worker_threads` (Node 22.19+).
125
147
 
126
148
  ```bash
127
149
  npm ci --legacy-peer-deps