@cookiemunch/mcp 0.4.0 → 0.4.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/CHANGELOG.md +37 -0
- package/LICENSE +21 -0
- package/dist/bin.cjs +10 -7
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +2 -2
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-SKCEQX3L.js → chunk-WGUF6SJH.js} +11 -7
- package/dist/chunk-WGUF6SJH.js.map +1 -0
- package/dist/index.cjs +11 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -1
- package/package.json +16 -8
- package/dist/chunk-SKCEQX3L.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Changelog: @cookiemunch/mcp
|
|
2
|
+
|
|
3
|
+
Every published release, newest first. Dates are the day the version was cut. Each release tracks the same-numbered `@cookiemunch/sdk`.
|
|
4
|
+
|
|
5
|
+
## 0.4.1 (2026-10-22)
|
|
6
|
+
|
|
7
|
+
- Added: `apply_cookie_preset` takes `referally` (`cookieDomain`, `cookieDays`, `category`).
|
|
8
|
+
- Added: requests send `User-Agent: cookiemunch-mcp/<version>`.
|
|
9
|
+
|
|
10
|
+
## 0.4.0 (2026-10-19)
|
|
11
|
+
|
|
12
|
+
- Added: tools for site PATCH, integration health, `provision` and partner links.
|
|
13
|
+
- Added: executor preset and canary tools; declaration preset tools and observed-cookie removal.
|
|
14
|
+
|
|
15
|
+
## 0.3.0 (2026-10-15)
|
|
16
|
+
|
|
17
|
+
- Added: `retire_cookie` and `unretire_cookie`; `scan_site` can wait for the result, including a scan already running.
|
|
18
|
+
|
|
19
|
+
## 0.2.0 (2026-10-15)
|
|
20
|
+
|
|
21
|
+
- Added: executor webhook test and delivery log with dry runs.
|
|
22
|
+
- Added: `purposes` and `dryRun` on declared cookies; rights-page identity tools.
|
|
23
|
+
- Fixed: design-warning headers say what happened; notices are not blamed on Accept.
|
|
24
|
+
|
|
25
|
+
## 0.1.2 (2026-10-15)
|
|
26
|
+
|
|
27
|
+
- Changed: the package builds standalone from its public repository and is published with npm provenance.
|
|
28
|
+
|
|
29
|
+
## 0.1.1 (2026-10-14)
|
|
30
|
+
|
|
31
|
+
- Added: tools to declare, bulk-declare and undeclare cookies and to apply an import.
|
|
32
|
+
- Added: `preview_site_config` (dry run) and design warnings leading every config tool result.
|
|
33
|
+
- Added: rights-page tools (read, write, preview, publish, versions, rollback) and custom-domain tools.
|
|
34
|
+
|
|
35
|
+
## 0.1.0 (2026-10-14)
|
|
36
|
+
|
|
37
|
+
- First release: the Developer API as MCP tools (`whoami`, sites, config, consent stats and log, DSAR, vendors, RoPA).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cookie Munch
|
|
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/dist/bin.cjs
CHANGED
|
@@ -1614,7 +1614,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1614
1614
|
);
|
|
1615
1615
|
tool(
|
|
1616
1616
|
"list_cookie_presets",
|
|
1617
|
-
"Declaration presets for the platforms a site is built on (atlas, forumulate, chatly, cookiemunch): each one\u2019s parameters, what it has declared on this site, and whether the vendor\u2019s live manifest can be imported yet. Read-only.",
|
|
1617
|
+
"Declaration presets for the platforms a site is built on (atlas, forumulate, chatly, cookiemunch, referally): each one\u2019s parameters, what it has declared on this site, and whether the vendor\u2019s live manifest can be imported yet. Read-only.",
|
|
1618
1618
|
{ cbid: import_zod5.z.string() },
|
|
1619
1619
|
(a) => client.sites.cookiePresets(a.cbid)
|
|
1620
1620
|
);
|
|
@@ -1623,24 +1623,26 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1623
1623
|
"Apply (or re-sync) a vendor preset: declares exactly what that platform writes \u2014 cookies and browser storage, with domain and lifetime \u2014 marked as declared by that vendor. Re-applying removes keys the vendor no longer writes. Names the owner declared are kept (skipped). Atlas needs frontendApiHost (and crossSubdomainCookies, default true); Chatly needs publicId.",
|
|
1624
1624
|
{
|
|
1625
1625
|
cbid: import_zod5.z.string(),
|
|
1626
|
-
vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch"]),
|
|
1626
|
+
vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch", "referally"]),
|
|
1627
1627
|
frontendApiHost: import_zod5.z.string().optional().describe("Atlas: your frontend API host, e.g. auth.example.com."),
|
|
1628
1628
|
crossSubdomainCookies: import_zod5.z.boolean().optional().describe("Atlas: default true \u2014 the cookies live on the parent domain."),
|
|
1629
1629
|
publicId: import_zod5.z.string().optional().describe("Chatly: the channel public id (ch_web_\u2026)."),
|
|
1630
1630
|
dragging: import_zod5.z.boolean().optional().describe("Chatly: the launcher can be dragged (adds the drag-position key)."),
|
|
1631
|
-
category: import_zod5.z.string().optional().describe("Chatly: the category for its keys
|
|
1631
|
+
category: import_zod5.z.string().optional().describe("Chatly: the category for its keys (default necessary). Referally: default the site's referrals category, else marketing."),
|
|
1632
|
+
cookieDomain: import_zod5.z.string().optional().describe("Referally: the domain aff.js sets referally_ctx on, e.g. .example.com. Default the site domain."),
|
|
1633
|
+
cookieDays: import_zod5.z.number().int().min(1).max(400).optional().describe("Referally: how long the cookie lives, 1 to 400 days. Default 60."),
|
|
1632
1634
|
dryRun: dryRunArg
|
|
1633
1635
|
},
|
|
1634
1636
|
(a) => {
|
|
1635
1637
|
const params = {};
|
|
1636
|
-
for (const k of ["frontendApiHost", "crossSubdomainCookies", "publicId", "dragging", "category"]) if (a[k] !== void 0) params[k] = a[k];
|
|
1638
|
+
for (const k of ["frontendApiHost", "crossSubdomainCookies", "publicId", "dragging", "category", "cookieDomain", "cookieDays"]) if (a[k] !== void 0) params[k] = a[k];
|
|
1637
1639
|
return client.sites.applyCookiePreset(a.cbid, a.vendor, params, a.dryRun ? { dryRun: true } : void 0);
|
|
1638
1640
|
}
|
|
1639
1641
|
);
|
|
1640
1642
|
tool(
|
|
1641
1643
|
"remove_cookie_preset",
|
|
1642
1644
|
"Remove every declaration a vendor preset made on this site.",
|
|
1643
|
-
{ cbid: import_zod5.z.string(), vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch"]), dryRun: dryRunArg },
|
|
1645
|
+
{ cbid: import_zod5.z.string(), vendor: import_zod5.z.enum(["atlas", "forumulate", "chatly", "cookiemunch", "referally"]), dryRun: dryRunArg },
|
|
1644
1646
|
(a) => client.sites.removeCookiePreset(a.cbid, a.vendor, a.dryRun ? { dryRun: true } : void 0)
|
|
1645
1647
|
);
|
|
1646
1648
|
tool(
|
|
@@ -1998,8 +2000,9 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1998
2000
|
}
|
|
1999
2001
|
|
|
2000
2002
|
// src/index.ts
|
|
2003
|
+
var MCP_VERSION = "0.4.1";
|
|
2001
2004
|
function createCookieMunchMcp(opts) {
|
|
2002
|
-
const client = opts.client ?? (0, import_sdk.createCookieMunch)({ apiKey: opts.apiKey, baseUrl: opts.baseUrl });
|
|
2005
|
+
const client = opts.client ?? (0, import_sdk.createCookieMunch)({ apiKey: opts.apiKey, baseUrl: opts.baseUrl, userAgent: opts.userAgent ?? `cookiemunch-mcp/${MCP_VERSION}` });
|
|
2003
2006
|
const server = new import_mcp.McpServer({ name: "cookiemunch", version: "1.0.0" });
|
|
2004
2007
|
registerTools(server, client);
|
|
2005
2008
|
return server;
|
|
@@ -2013,7 +2016,7 @@ async function main() {
|
|
|
2013
2016
|
process.exit(1);
|
|
2014
2017
|
}
|
|
2015
2018
|
const baseUrl = process.env.COOKIEMUNCH_BASE_URL ?? "https://api.cookiemunch.net";
|
|
2016
|
-
const server = createCookieMunchMcp({ apiKey, baseUrl });
|
|
2019
|
+
const server = createCookieMunchMcp({ apiKey, baseUrl, ...process.env.COOKIEMUNCH_USER_AGENT ? { userAgent: process.env.COOKIEMUNCH_USER_AGENT } : {} });
|
|
2017
2020
|
const transport = new import_stdio.StdioServerTransport();
|
|
2018
2021
|
await server.connect(transport);
|
|
2019
2022
|
}
|