ConsentLayer
Guides

Replit Integration

Replit Agent connects to external tools through MCP connectors. Add the ConsentLayer connector once, and the Agent can handle cookie consent end-to-end on any of your Replit Apps — provision the site, scan it for trackers, write the banner snippet into your code, and verify the deployment.

1. Add the ConsentLayer connector

Click the badge to open Replit with the ConsentLayer connector pre-filled:

Add to Replit

Review the pre-filled details and click Test & save:

FieldValue
Display nameConsentLayer
Server URLhttps://api.consentlayer.com/mcp

ConsentLayer uses browser-based OAuth — no API keys. When Replit tests the connection, sign in to ConsentLayer (or create a free account) in the window that opens. The connector is saved to your Replit account, so it's available in every Replit App you own.

Adding it manually

Go to replit.com/integrations, click + Add MCP server, enter the display name and server URL from the table above, then click Test & save.

Open your Replit App and paste this into the Agent chat, swapping in your app's public domain:

Set up ConsentLayer cookie consent on this app using the ConsentLayer connector.
Call setup_site with my deployed domain, add the returned <script> snippet to the
<head> of every page without defer or async, then redeploy. After the deploy, call
check_installation and report the compliance score and remaining action items.

The Agent handles the whole flow:

StepToolWhat it does
1setup_siteProvisions the site, scans it for trackers, auto-configures consent categories, and returns the install snippet with your real project key
2The Agent places the snippet in the <head> of every page (no defer, no async) and redeploys
3check_installationVerifies the tag on the live site and returns the compliance score with remaining action items

Use your deployed domain

setup_site and check_installation work against your app's public URL. Use your deployment domain (your-app.replit.app or your custom domain), not the temporary dev URL — deploy the app first if you haven't yet.

3. Keep iterating with the Agent

Once connected, banner and consent changes are just prompts away:

"Change my consent banner to a floating style in the bottom-right corner, matching my app's colors."

"Rescan my site and sort any new trackers into the right consent categories."

"Show me my consent stats for the last 30 days."

The full tool list — scanner, cookie library, banner config, categories, geolocation groups — is documented in the AI Agent Integration guide.

Important notes

  • The <script> tag must be placed in <head> without defer or async — it needs to run synchronously to block tracking scripts before they execute.
  • The connector is account-wide: add it once and every Replit App can use it.
  • Replit Agent fetches the available tools automatically after the connector is saved — no further configuration needed.