@cookiemunch/mcp 0.0.0-stage → 0.1.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 +84 -2
- package/dist/bin.cjs +1394 -0
- package/dist/bin.cjs.map +1 -0
- package/dist/bin.js +23 -0
- package/dist/bin.js.map +1 -0
- package/dist/chunk-G5TN4KJA.js +1376 -0
- package/dist/chunk-G5TN4KJA.js.map +1 -0
- package/dist/index.cjs +1401 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +48 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/package.json +37 -3
package/README.md
CHANGED
|
@@ -1,3 +1,85 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @cookiemunch/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A [Model Context Protocol](https://modelcontextprotocol.io) server that exposes the
|
|
4
|
+
Cookie Munch Developer API (the `/v1` surface) as MCP tools, built on top of
|
|
5
|
+
[`@cookiemunch/sdk`](../sdk). Point an MCP client (Claude Desktop, Claude Code, …)
|
|
6
|
+
at it and an assistant can manage sites, read consent analytics, and drive privacy
|
|
7
|
+
operations on your behalf.
|
|
8
|
+
|
|
9
|
+
## How it authenticates
|
|
10
|
+
|
|
11
|
+
The server reads an API key from the environment and derives your organization from
|
|
12
|
+
it server-side — you never pass an `orgId`.
|
|
13
|
+
|
|
14
|
+
| Env var | Required | Default |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| `COOKIEMUNCH_API_KEY` | yes | — |
|
|
17
|
+
| `COOKIEMUNCH_BASE_URL` | no | `http://localhost:8787` |
|
|
18
|
+
|
|
19
|
+
Generate a key from the dashboard (it looks like `fck_…`).
|
|
20
|
+
|
|
21
|
+
## Tools
|
|
22
|
+
|
|
23
|
+
| Tool | Description |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `whoami` | Identity tied to the API key (orgId, plan, key prefix). |
|
|
26
|
+
| `list_sites` | List all sites (cbids) in your org. |
|
|
27
|
+
| `create_site` | Create a site (cbid auto-generated if omitted). |
|
|
28
|
+
| `get_site_config` | Get a site's banner/consent config. |
|
|
29
|
+
| `update_site_config` | Upsert (merge) a site's config. |
|
|
30
|
+
| `get_consent_stats` | Aggregated per-day consent statistics. |
|
|
31
|
+
| `get_consent_log` | Recent anonymised consent records. |
|
|
32
|
+
| `list_dsar` | List Data Subject Access Requests. |
|
|
33
|
+
| `create_dsar` | Open a new DSAR. |
|
|
34
|
+
| `advance_dsar` | Move a DSAR to a new status. |
|
|
35
|
+
| `list_vendors` | Vendors with computed risk scores. |
|
|
36
|
+
| `list_ropa` | Records of Processing Activities. |
|
|
37
|
+
|
|
38
|
+
## Client configuration
|
|
39
|
+
|
|
40
|
+
### Claude Desktop / Claude Code
|
|
41
|
+
|
|
42
|
+
Add to your MCP servers config (`claude_desktop_config.json`, or via
|
|
43
|
+
`claude mcp add`):
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"mcpServers": {
|
|
48
|
+
"cookiemunch": {
|
|
49
|
+
"command": "npx",
|
|
50
|
+
"args": ["-y", "@cookiemunch/mcp"],
|
|
51
|
+
"env": {
|
|
52
|
+
"COOKIEMUNCH_API_KEY": "fck_your_key_here",
|
|
53
|
+
"COOKIEMUNCH_BASE_URL": "https://cmp.example.com"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Or, from a local checkout after `pnpm --filter @cookiemunch/mcp build`:
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"cookiemunch": {
|
|
66
|
+
"command": "node",
|
|
67
|
+
"args": ["/absolute/path/to/packages/mcp/dist/bin.js"],
|
|
68
|
+
"env": {
|
|
69
|
+
"COOKIEMUNCH_API_KEY": "fck_your_key_here",
|
|
70
|
+
"COOKIEMUNCH_BASE_URL": "https://cmp.example.com"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Programmatic use
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
import { createCookieMunchMcp } from '@cookiemunch/mcp';
|
|
81
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
82
|
+
|
|
83
|
+
const server = createCookieMunchMcp({ apiKey: process.env.COOKIEMUNCH_API_KEY!, baseUrl: 'https://cmp.example.com' });
|
|
84
|
+
await server.connect(new StdioServerTransport());
|
|
85
|
+
```
|