@cookiemunch/mcp 0.4.1 → 0.5.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/CHANGELOG.md +7 -0
- package/dist/bin.cjs +65 -1
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-WGUF6SJH.js → chunk-IQLCPEWI.js} +66 -2
- package/dist/chunk-IQLCPEWI.js.map +1 -0
- package/dist/index.cjs +65 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-WGUF6SJH.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Every published release, newest first. Dates are the day the version was cut. Each release tracks the same-numbered `@cookiemunch/sdk`.
|
|
4
4
|
|
|
5
|
+
## 0.5.0 (2026-10-23)
|
|
6
|
+
|
|
7
|
+
- Added: `get_org_controller`, `set_org_controller`, `remove_org_controller`.
|
|
8
|
+
- Added: `get_consent_sync_secret`, `rotate_consent_sync_secret`, `remove_consent_sync_secret`.
|
|
9
|
+
- Added: `mint_preference_center_token`.
|
|
10
|
+
- Changed: built on `@cookiemunch/sdk` 0.5.0.
|
|
11
|
+
|
|
5
12
|
## 0.4.1 (2026-10-22)
|
|
6
13
|
|
|
7
14
|
- Added: `apply_cookie_preset` takes `referally` (`cookieDomain`, `cookieDays`, `category`).
|
package/dist/bin.cjs
CHANGED
|
@@ -1515,6 +1515,21 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1515
1515
|
{ subjectId: import_zod5.z.string() },
|
|
1516
1516
|
(a) => client.preferences.get(a.subjectId)
|
|
1517
1517
|
);
|
|
1518
|
+
tool(
|
|
1519
|
+
"mint_preference_center_token",
|
|
1520
|
+
"Mint a hosted preference-centre token for one visitor (POST /v1/preference-center/tokens), for a page to pass to CookieMunch.setSubjectToken. Give exactly one of email (resolved as the emailed preference link resolves it; an unknown address is subject_not_found) or subjectId. The token is a credential that opens that person\u2019s subscriptions and profile until expiresAt: never paste it into a shared URL, a ticket or a log, and keep ttlSeconds short (default 3600, max 86400). Needs subscriptions:write and profile:write, plus identity:read by email.",
|
|
1521
|
+
{
|
|
1522
|
+
cbid: import_zod5.z.string().describe("A site of your organisation."),
|
|
1523
|
+
email: import_zod5.z.string().optional().describe("The visitor\u2019s address. Give this or subjectId, not both."),
|
|
1524
|
+
subjectId: import_zod5.z.string().optional().describe("The subject id. Give this or email, not both."),
|
|
1525
|
+
ttlSeconds: import_zod5.z.number().int().min(1).max(86400).optional()
|
|
1526
|
+
},
|
|
1527
|
+
(a) => client.preferenceCenter.mintToken({
|
|
1528
|
+
cbid: a.cbid,
|
|
1529
|
+
...a.email !== void 0 ? { email: a.email } : { subjectId: a.subjectId },
|
|
1530
|
+
...a.ttlSeconds !== void 0 ? { ttlSeconds: a.ttlSeconds } : {}
|
|
1531
|
+
})
|
|
1532
|
+
);
|
|
1518
1533
|
tool(
|
|
1519
1534
|
"issue_api_key",
|
|
1520
1535
|
"Issue a new API key. The secret is returned once and never again. Prefer the least privilege the job needs: `scopes` limits what it can do, `cbids` locks it to specific sites (it then cannot reach anything org-wide), `expiresInDays` retires it. Omitting all three mints a full-access, org-wide, non-expiring key.",
|
|
@@ -1744,6 +1759,37 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1744
1759
|
return { removed: true };
|
|
1745
1760
|
}
|
|
1746
1761
|
);
|
|
1762
|
+
tool(
|
|
1763
|
+
"get_org_controller",
|
|
1764
|
+
"The organisation\u2019s own data-controller identity: who every rights notice names, before any site config controller block. `set: false` when there is none. Read-only.",
|
|
1765
|
+
{},
|
|
1766
|
+
() => client.org.controller.get()
|
|
1767
|
+
);
|
|
1768
|
+
tool(
|
|
1769
|
+
"set_org_controller",
|
|
1770
|
+
"Set the organisation\u2019s data-controller identity. Replaces it: a field left out is removed. Needed for a notice on a rights request filed without a cbid when the organisation has several sites. Needs an unscoped key or rights:write. Audited.",
|
|
1771
|
+
{
|
|
1772
|
+
legalName: import_zod5.z.string().describe("Required: the legal name of the data controller."),
|
|
1773
|
+
contactEmail: import_zod5.z.string().optional().describe("Where people reach the controller about their data."),
|
|
1774
|
+
address: import_zod5.z.string().optional(),
|
|
1775
|
+
dpoContact: import_zod5.z.string().optional().describe("The Data Protection Officer: a name, an email address, or both.")
|
|
1776
|
+
},
|
|
1777
|
+
(a) => client.org.controller.set({
|
|
1778
|
+
legalName: a.legalName,
|
|
1779
|
+
...a.contactEmail !== void 0 ? { contactEmail: a.contactEmail } : {},
|
|
1780
|
+
...a.address !== void 0 ? { address: a.address } : {},
|
|
1781
|
+
...a.dpoContact !== void 0 ? { dpoContact: a.dpoContact } : {}
|
|
1782
|
+
})
|
|
1783
|
+
);
|
|
1784
|
+
tool(
|
|
1785
|
+
"remove_org_controller",
|
|
1786
|
+
"Remove the organisation\u2019s data-controller identity. Notices then name the request\u2019s site config controller block; a request without a cbid in an organisation with several sites gets no notice.",
|
|
1787
|
+
{},
|
|
1788
|
+
async () => {
|
|
1789
|
+
await client.org.controller.remove();
|
|
1790
|
+
return { removed: true };
|
|
1791
|
+
}
|
|
1792
|
+
);
|
|
1747
1793
|
const CAPTCHA_OFF = "Off removes spam protection beyond the hidden spam-trap field, the rate limits and the email code: expect more spam requests. Own keys are recommended.";
|
|
1748
1794
|
const captchaInput = {
|
|
1749
1795
|
mode: import_zod5.z.enum(["own", "off"]).describe(`own: your own captcha provider keys (recommended). off: no captcha. ${CAPTCHA_OFF}`),
|
|
@@ -1759,6 +1805,24 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1759
1805
|
...a.secret !== void 0 ? { secret: a.secret } : {},
|
|
1760
1806
|
...a.minScore !== void 0 ? { minScore: a.minScore } : {}
|
|
1761
1807
|
});
|
|
1808
|
+
tool(
|
|
1809
|
+
"get_consent_sync_secret",
|
|
1810
|
+
"Whether hosted consent sync is set up for a site: `configured`, `secretLast4`, `createdAt`. Never returns the secret. Read-only.",
|
|
1811
|
+
{ cbid: import_zod5.z.string() },
|
|
1812
|
+
(a) => client.consentSyncSecret.get(a.cbid)
|
|
1813
|
+
);
|
|
1814
|
+
tool(
|
|
1815
|
+
"rotate_consent_sync_secret",
|
|
1816
|
+
"Mint a site\u2019s consent-sync signing secret, or rotate it. The answer carries `secret` this once; the site owner\u2019s server signs consent-sync tokens with it (mintConsentSyncToken in @cookiemunch/sdk). Rotating stops the old secret at once, so every page holding a token signed with it stops syncing until it gets a new token. Never put the secret in a page. Needs sites:write and consent:write.",
|
|
1817
|
+
{ cbid: import_zod5.z.string() },
|
|
1818
|
+
(a) => client.consentSyncSecret.rotate(a.cbid)
|
|
1819
|
+
);
|
|
1820
|
+
tool(
|
|
1821
|
+
"remove_consent_sync_secret",
|
|
1822
|
+
"Remove a site\u2019s consent-sync secret: hosted consent sync stops until a new one is minted. Needs sites:write and consent:write.",
|
|
1823
|
+
{ cbid: import_zod5.z.string() },
|
|
1824
|
+
(a) => client.consentSyncSecret.remove(a.cbid)
|
|
1825
|
+
);
|
|
1762
1826
|
tool(
|
|
1763
1827
|
"get_rights_captcha",
|
|
1764
1828
|
"The captcha on a site\u2019s hosted rights page: its own setting, else the organisation default, else off (`source` says which). Never returns the secret. Read-only.",
|
|
@@ -2000,7 +2064,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
2000
2064
|
}
|
|
2001
2065
|
|
|
2002
2066
|
// src/index.ts
|
|
2003
|
-
var MCP_VERSION = "0.
|
|
2067
|
+
var MCP_VERSION = "0.5.0";
|
|
2004
2068
|
function createCookieMunchMcp(opts) {
|
|
2005
2069
|
const client = opts.client ?? (0, import_sdk.createCookieMunch)({ apiKey: opts.apiKey, baseUrl: opts.baseUrl, userAgent: opts.userAgent ?? `cookiemunch-mcp/${MCP_VERSION}` });
|
|
2006
2070
|
const server = new import_mcp.McpServer({ name: "cookiemunch", version: "1.0.0" });
|