Turn On AI Agent Access for a Drupal Site

Applies to: Codeless, FlexLab (Drupal)

Overview

AI agent access lets Claude, Cursor and Claude Code read and edit content on one Drupal environment through FlexSite. It is off by default and is turned on per environment, so you can allow it on dev and keep it off on production.

It is available on Codeless (Drupal CMS) and FlexLab Drupal 11 environments. It is not available on WordPress or Drupal 7.

Key concepts

  • Agent user: turning it on creates a non-admin Drupal user named flexsite_agent. Assistants work on the site through that user, so their changes are easy to tell apart in the revision history.
  • Your role still applies: the assistant can only do what your FlexSite role on the project allows. Publishing needs the admin role.
  • Beta: the Drupal MCP modules it uses are alpha and beta releases. FlexSite pins the versions it has tested.

Steps — Codeless

  1. Open the project, then the environment.
  2. Find the AI agent access card. The environment must be ready.
  3. Select Turn on. FlexSite takes a database backup first, then sets up access.
  4. When the card shows On, assistants connected to your FlexSite account can work on this environment.

Steps — FlexLab

On FlexLab the AI packages go into your repository first, so they ship with your code.

  1. On the environment’s AI agent access card, select Show setup steps. It shows the commands for your branch.
  2. Make sure the site runs Drupal 11.4 or later and Drush 13.8 or later.
  3. Add the packages: composer require flexsite/fs_ai:^1.0 flexsite/fs_mcp:^1.0 --with-all-dependencies
  4. Commit, push to the environment’s branch, and wait for the deployment to finish.
  5. Select Finish setup on the card. FlexSite takes a database backup and sets up access.

If you use configuration management with drush deploy, follow the optional steps in the setup dialog so a config import does not reset access.

Check that it works

Ask your assistant: “Which of my FlexSite environments have AI agent access?” Each environment is listed with whether access is on, whether it is production, and what your role allows there.