# Capture cookies for CookieComply

Guide for AI assistants: https://cookie-comply.com/skills/cookiecomply/agent-capture.md  

Human setup: https://cookie-comply.com/integrations  

## Goal

Produce a before/after cookie capture, then send it to CookieComply for analysis.

## Browser steps

Use Playwright MCP, Browser Use, or any real browser tool.

1. Start a **fresh** browser session (no existing cookies for that site).
2. Open the URL; wait until the page is usable.
3. Read all cookies → this is **before** consent.
4. Click **Accept** / **Allow all** / **Agree** / **Zustimmen** (prefer the button’s visible name).
5. Wait 1–2 seconds so tags can fire.
6. Read all cookies again → this is **after** consent.
7. If you cannot find Accept, stop and ask the human. Do not invent cookies.

For each cookie, keep at least: `name`, `domain`, `value`, `path`, `secure`, `httpOnly`, `sameSite`.

## Send to CookieComply

```http
POST https://cookie-comply.com/api/v1/analyze
Authorization: Bearer <token from env COOKIECOMPLY_API_KEY>
Content-Type: application/json
Idempotency-Key: <unique id for this run>

{
  "url": "https://example.com",
  "cookies": {
    "before": [ … ],
    "after": [ … ]
  }
}
```

This uses **one scan** from the workspace. Needs a full-access connection token.

## After analysis

- Summarize GDPR / ePrivacy risks in plain language for legal or marketing.
- Optionally export a report or list other scans in the workspace.

## Safety

- Keep the access token in env / MCP config — never in the chat transcript.
- Always use a fresh browser for the “before” snapshot.
