---
title: "Connect your AI agent to Zest: we shipped an MCP server"
url: "https://cookiezest.com/blog/zest-mcp-server"
description: "Zest now exposes an MCP server. Your AI agent can read the config schema, look up API methods, and generate a ready-to-paste install snippet. No docs scraping, no hallucinated config keys."
---

We shipped an MCP server for Zest. If your editor or AI assistant supports MCP (Claude Desktop, Claude Code, Cursor, VS Code Copilot, Windsurf), it can now configure Zest for you without you pasting docs into a chat window.

## What is MCP?

Model Context Protocol is an open standard released by Anthropic in late 2024. It gives AI agents a standard way to talk to external tools and data sources, the same way HTTP gave browsers a standard way to talk to servers.

Before MCP, every integration was a one-off. You wrote a custom wrapper for each tool your agent needed to reach. With MCP, you expose a set of tools once and any MCP-compatible client can call them. Anthropic built it for Claude but the spec is open. Cursor, VS Code, Windsurf, and dozens of others picked it up within months.

Think of it as USB for AI. Instead of every agent needing a custom driver for every tool, there is one plug. Your agent discovers what tools are available, calls them, and gets structured data back. No screen scraping, no guessing, no invented API parameters.

## Why we built this

You are setting up cookie consent on a new project. You ask Claude or Cursor to help. The agent has seen Zest before, maybe, in its training data. But versions drift and options change, and it invents a config key that doesn’t exist. Or it links to the docs and you have to read them yourself.

With the MCP server, the agent calls the server directly and gets the exact shape of the config for the version you are installing. It gets a snippet it can verify against the schema.

Cookie consent is a set-up-once-and-forget problem. You don’t want to become an expert in the config schema. You want to tell your agent what you need and get a working snippet back.

## What the tools do

Three tools, all read-only and stateless:

**get\_config\_schema** returns the full JSON Schema for Zest’s configuration. Every option, every type, every allowed value, every default. If you’ve ever wondered “can I set the banner to top-right?” the answer is in the schema.

**get\_api\_reference** returns every public method on the `Zest` object: `init`, `show`, `hide`, `getConsent`, `hasConsent`, `on`, `once`, `resolveGeo`, and the rest. With parameters, return types, and code examples. Plus the full event list (`zest:ready`, `zest:consent`, `zest:change`, `zest:geo`).

**generate\_config** is the fun one. You tell it what you want (“dark theme, bottom-right, German, hide marketing, enable geo”) and it returns a config object with only the non-default options, plus a CDN script tag pinned to the current Zest version. Ready to paste into your `<head>`.

## Real use cases

**Setting up consent on a new project.** “I need a cookie banner for a German website, dark theme, bottom-right, hide marketing, enable geo gating.” The agent calls `generate_config`, hands you a snippet, you paste it. Done.

**Checking whether a feature exists before writing code.** “Does Zest support hiding the marketing category from the settings modal?” The agent calls `get_config_schema`, finds the `hidden` property on categories, and tells you yes, with the exact config key and its default value.

**Wiring up consent-gated analytics.** “Load Google Analytics only after the user accepts analytics cookies.” The agent calls `get_api_reference`, finds `Zest.on('consent', callback)` and `Zest.hasConsent('analytics')`, and writes the event listener with the correct event name and callback signature.

**Migrating from another CMP.** “I’m switching from Cookiebot. Map their config to Zest.” The agent pulls the full schema, compares it against what you had, and generates a Zest config that matches your old setup.

**Auditing an existing installation.** “Check our Zest config against current best practices.” The agent reads the schema, compares it to what’s on your site, and flags anything outdated or suboptimal.

## See it before you ship it

The MCP gives your agent the schema. The [playground](/play/) gives YOU the preview.

Before you paste anything into your website, open the playground and build the banner visually. Pick a position, switch the theme, tweak the accent color, and watch the banner update live. You get a working config and an install snippet you can copy, no agent needed.

Even better: use both. Play with the banner in the playground until it looks right, then ask your agent to wire it into your project. The agent has the schema, you have the preview, and nothing ships until you’ve seen exactly how it will look.

## How to connect

One URL: `https://cookiezest.com/mcp`

**Claude Code (terminal)**. One command:

```
claude mcp add --transport http zest https://cookiezest.com/mcp
```

**Claude Desktop (GUI app)**. Add to `claude_desktop_config.json`:

```
{
  "mcpServers": {
    "zest": {
      "url": "https://cookiezest.com/mcp"
    }
  }
}
```

**Cursor**. Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):

```
{
  "mcpServers": {
    "zest": {
      "url": "https://cookiezest.com/mcp"
    }
  }
}
```

**VS Code Copilot**. Add to `.vscode/mcp.json`. Note: VS Code uses `"servers"` as the root key, not `"mcpServers"`.

```
{
  "servers": {
    "zest": {
      "type": "http",
      "url": "https://cookiezest.com/mcp"
    }
  }
}
```

**Windsurf**. Add to `~/.codeium/windsurf/mcp_config.json`:

```
{
  "mcpServers": {
    "zest": {
      "serverUrl": "https://cookiezest.com/mcp"
    }
  }
}
```

Full setup instructions for every client at [cookiezest.com/docs/mcp/](/docs/mcp/).

## Why this saves you time

The old workflow: open the Zest docs, skim the configuration page, find the option you need, check the type and allowed values, write the config object, realize you forgot a comma, fix it, test it. Repeat for every new project.

The new workflow: tell your agent what you need in plain language. The agent calls the MCP server, gets the exact schema, generates a valid config, and hands you a snippet. You paste it and move on.

No tab with the docs open while you work. No version mismatch between what you’re reading and what you’re installing. The MCP server always serves the schema for the current release, and the playground always shows what that release actually looks like.

## Try it

Connect your agent and ask: “I need a cookie banner for a German website, dark theme, bottom-right, hide marketing, enable geo gating.” The agent will call `generate_config` and hand you a snippet. Paste it, done.

Full documentation at [cookiezest.com/docs/mcp/](/docs/mcp/).

## Related

-   [16KB of JavaScript that replaces your $50/month CMP](/blog/16kb-cmp-replaces-subscription/)
-   [The hidden cost of “free” consent banners: your data](/blog/hidden-cost-free-consent-banners/)
-   [Geo-targeted consent: one banner for GDPR, another for the rest of the world](/blog/geo-targeted-consent-explained/)

—

May the 4th be with you.

Alex @ FreshJuice

## Own your cookie banner.

Zest is free and MIT-licensed, and it doesn't phone home to anyone.  
Drop the script in and you're done.

[Try it free](/play/)