Skip to main content

Set up enforcement

Your memory layer exists. Every AI tool in your stack is still ignoring it. This step changes that.

Pick a connection

preset AI exposes your memory layer to agents three ways. Pick the one that matches where you want enforcement to land:

  • MCP server: for Claude Code, Cursor, Windsurf, VS Code Agent Mode, and Zed. Enforces at generation time. Recommended for most teams.
  • GitHub Action: for PRs. Runs preset validate on every commit and posts a comment with violations and fixes. Good backstop even if some developers don't use MCP.
  • CLI pre-commit hook: for individual machines. Catches violations before they leave the developer's laptop.

You can combine them. MCP for generation, GitHub Action for review, pre-commit as a belt-and-suspenders local gate.

Install the MCP server

For Claude Code (most common):

claude mcp add --transport http preset https://mcp.presetai.dev/mcp

For Cursor, Windsurf, VS Code Agent, and Zed, see the developer quickstarts. Every client has its own one-command install.

The MCP server runs over OAuth: no config files, no API keys to rotate. Your AI tool authenticates once; the memory layer becomes available immediately.

Watch the first enforcement

Open your AI tool and ask it to generate something your design system has a pattern for. A realistic first prompt:

Generate a destructive confirmation dialog for the delete account flow.

A tool connected via MCP now sees your presets before it writes anything. You'll get a response that looks more like this:

Using btn.destructive-confirm from your preset (matched at 94% confidence). It requires a confirmation dialog: I'll include that too.

Compare to the same prompt without preset AI, where the tool invents a button, guesses at a color, and calls the dialog whatever it felt like in the moment.

If the tool tries something forbidden, <button onClick={window.confirm(...)}>, for example, preset AI rejects the generation and redirects. The rejection is visible in the tool's reasoning, not silently swapped.

Raise the bar over time

Start permissive. The default configuration is a floor, not a ceiling: it blocks the worst violations and leaves soft patterns as suggestions. As your team gets comfortable, tighten.

You can:

  • Add forbidden primitives to block specific anti-patterns (hardcoded hex colors, raw <select> elements, inline styles).
  • Write context rules that change behavior based on file location (stricter in src/app/, looser in src/dev/).
  • Route intents to presets (any "submit button" maps to btn.primary).

Every rule lives in your memory layer. When agents read the layer, they read the rules too. A forbidden primitive becomes an instruction the tool incorporates before generation, not a gate it slams into afterward.

What's next

Was this page helpful?

Last reviewed by @jschuyler
All systems operationalDocsDevelopersPlatformPricing
PrivacyTerms© 2026 fndd, LLC